/// <summary> /// 修改菜单 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void bbi_Edit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Model.WORKFLOWSETADD workflowsetaddMdl = new Model.WORKFLOWSETADD(); workflowsetaddMdl.WORKFLOWNAME = clbc_workflow.Items[clbc_workflow.SelectedIndex].ToString(); if (workflowsetaddMdl.WORKFLOWNAME.Length <= 0 || workflowsetaddMdl.WORKFLOWNAME == null) { MessageBox.Show("请选择需要修改的工作流!", "提示信息"); return; } int id = 0; if (this.gridView1.RowCount <= 0) { return; } id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("SETNO").ToString()); if (id < 1) { MessageBox.Show("请选择需要修改的工作流节点!", "提示信息"); return; } else { workflowsetaddMdl.SETNO = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("SETNO").ToString()); workflowsetaddMdl.NODENAME = this.gridView1.GetFocusedRowCellValue("NODENAME").ToString(); workflowsetaddMdl.NODEORDER = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("NODEORDER").ToString()); workflowsetaddMdl.BEGINTIME = ToolHelper.ConvertToDateTime(this.gridView1.GetFocusedRowCellValue("BEGINTIME").ToString()); workflowsetaddMdl.ENDTIME = ToolHelper.ConvertToDateTime(this.gridView1.GetFocusedRowCellValue("ENDTIME").ToString()); frmWORKFLOWSETADD frm = new frmWORKFLOWSETADD(workflowsetaddMdl, StatusClass.Edit); frm.ShowDialog(); ReadData(workflowsetaddMdl.WORKFLOWNAME); } }
public frmWORKFLOWSETADD(Model.WORKFLOWSETADD workflowsetaddMdl, StatusClass enumStatus) { InitializeComponent(); this.workflowsetaddMdl = workflowsetaddMdl; this.te_workflowname.Text = workflowsetaddMdl.WORKFLOWNAME; this.setno = workflowsetaddMdl.SETNO; this._enumStatus = enumStatus; init(); if (enumStatus == StatusClass.AddNew) { this.Text = "新增工作流节点"; } else { this.Text = "修改工作流节点"; } }
/// <summary> /// 新增菜单 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void bbi_Add_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (this.clbc_workflow.SelectedIndex < 0) { return; } Model.WORKFLOWSETADD workflowsetaddMdl = new Model.WORKFLOWSETADD(); workflowsetaddMdl.WORKFLOWNAME = clbc_workflow.Items[clbc_workflow.SelectedIndex].ToString(); if (workflowsetaddMdl.WORKFLOWNAME.Length <= 0 || workflowsetaddMdl.WORKFLOWNAME == null) { MessageBox.Show("请选择需要修改的工作流!", "提示信息"); return; } else { frmWORKFLOWSETADD frm = new frmWORKFLOWSETADD(workflowsetaddMdl, StatusClass.AddNew); frm.ShowDialog(); ReadData(workflowsetaddMdl.WORKFLOWNAME); } }