private void treeBusiness_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { if (e.Node.Tag is SYS_BUSINESSROLE) { CurrRole = e.Node.Tag as SYS_BUSINESSROLE; } else if (e.Node.Tag is SYS_BUSINESSMATERIAL) { CurrMaterial = e.Node.Tag as SYS_BUSINESSMATERIAL; } else if (e.Node.Tag is SYS_BUSINESSFORM) { CurrForm = e.Node.Tag as SYS_BUSINESSFORM; } else if (e.Node.Tag is SYS_BUSINESSPROCESS) { CurrProcess = e.Node.Tag as SYS_BUSINESSPROCESS; } else if (e.Node.Tag is SYS_BUSINESS) { CurrBusiness = e.Node.Tag as SYS_BUSINESS; } else if (e.Node.Tag is SYS_BUSINESSGROUP) { CurrBusinessGroup = e.Node.Tag as SYS_BUSINESSGROUP; } else { // 角色,材料,表单,流程文件夹 if (e.Node.Parent.Tag is SYS_BUSINESS) { CurrBusiness = e.Node.Parent.Tag as SYS_BUSINESS; CurrBusinessGroup = e.Node.Parent.Parent.Tag as SYS_BUSINESSGROUP; } } }
private void process_Save(object sender, EventArgs e) { XmlDocument doc = new XmlDocument(); XmlElement layout = doc.CreateElement("processes"); workflowControl.Document.CreateXml(layout); SYS_BUSINESSPROCESS process = CurrProcess; process.LAYOUTCONTENT = Encoding.Default.GetBytes(layout.OuterXml); // BusinessService.SaveBusinessProcess(process); }
public SYS_BUSINESSPROCESS SaveBusinessProcess(SYS_BUSINESSPROCESS process) { if (0 == process.ID) { process.ID = ValueOperator.CreatePk("SYS_BUSINESSPROCESS"); } using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { orm.Save(process); return(process); } }
private void process_Init(object sender, EventArgs e) { /*初使化*/ SYS_BUSINESSPROCESS process = CurrProcess; workflowControl.Document.CurrProcess = CurrProcess; // 在人工活动上要用,表单和角色都与它有关 if (null != process.LAYOUTCONTENT) { string Layout = Encoding.Default.GetString(process.LAYOUTCONTENT); XmlDocument doc = new XmlDocument(); doc.LoadXml(Layout); workflowEngine.Layout = doc.DocumentElement; /**/ workflowEngine.CreateProcess(); } }
public DockBusinessProcess(SYS_BUSINESSPROCESS CurrProcess) { InitializeComponent(); DockActivity da = new DockActivity(); da.TabText = "活动列表"; da.Show(this.dockPanel1, DockState.DockRight); da.CloseButton = false; this.dockPanel1.DockRightPortion = 0.1; DockProcessDesigner dpd = new DockProcessDesigner(); dpd.CurrProcess = CurrProcess; dpd.Show(this.dockPanel1); //重要 da.workflowControl = dpd.workflowControl; da.workflowEngine = dpd.workflowEngine; }
private void cmsiAddProcess_Click(object sender, EventArgs e) { SYS_BUSINESSPROCESS newProcess = new SYS_BUSINESSPROCESS(); newProcess.CREATETIME = DateTime.Now; newProcess.REF_BUSINESS_ID = CurrBusiness.ID; DlgEditBusinessProcess dlg = new DlgEditBusinessProcess(); dlg.Process = newProcess; if (DialogResult.OK == dlg.ShowDialog()) { try { BusinessServcie.SaveBusinessProcess(dlg.Process); RefreshBusinessTree(); MainForm.INFO("添加业务流程成功!"); } catch (Exception ex) { MainForm.ERROR("添加业务流程失败!" + ex.Message); } } }