SOA创建Form表单

public TCComponentForm createTmpForm(String formType, String formName, boolean saveDB) {
		DataManagementService datamanagementservice = DataManagementService
				.getService(session);
		com.teamcenter.services.rac.core._2007_01.DataManagement.FormInfo aforminfo[] = new com.teamcenter.services.rac.core._2007_01.DataManagement.FormInfo[1];
		aforminfo[0] = new com.teamcenter.services.rac.core._2007_01.DataManagement.FormInfo();
		aforminfo[0].clientId = "1";
		aforminfo[0].description = "";
		aforminfo[0].name = formName;
		aforminfo[0].formType = formType;
		aforminfo[0].saveDB = saveDB;
		com.teamcenter.services.rac.core._2007_01.DataManagement.CreateOrUpdateFormsResponse createorupdateformsresponse = datamanagementservice
				.createOrUpdateForms(aforminfo);
		if (createorupdateformsresponse != null
				&& createorupdateformsresponse.serviceData
				.sizeOfPartialErrors() == 0) {
			com.teamcenter.services.rac.core._2007_01.DataManagement.CreateFormsOutput acreateformsoutput[] = createorupdateformsresponse.outputs;
			TCComponentForm mForm = (TCComponentForm) acreateformsoutput[0].form;
			if (mForm != null && mForm.getClientObject() == null){
				mForm.setClientObject("Create_Context");
				return mForm;

			}
		}
		return null;
	}

  

上一篇:论文阅读笔记-----Efficient Tool-Path Planning for Machining Free-Form Surfaces


下一篇:2021-11-18 WinFrom面试题 在Winform中,我们发现在一个Form相关的cs文件有两个,它们的类名都是一样的,只是代码后台类文件中的class之前有partical修饰而已,这是为