コード例 #1
0
ファイル: TaskAlterFm.cs プロジェクト: s7loves/mypowerscgl
        private void btnModifyOpr_Click(object sender, EventArgs e)
        {
            if (lvOper.SelectedItems.Count > 0)
            {
                ListViewItem lvi1 = lvOper.SelectedItems[0];
                fmOperator tmpfmOperator = new fmOperator(WorkConst.STATE_MOD);
                tmpfmOperator.Description = lvi1.Text;
                tmpfmOperator.WorkflowId = NowTask.WorkFlowId;
                tmpfmOperator.OperId = lvi1.SubItems[1].Text;
                if (lvi1.SubItems[2].Text == "包含")
                    tmpfmOperator.InorExclude = true;
                else
                    if (lvi1.SubItems[2].Text == "排除")
                        tmpfmOperator.InorExclude = false;
                tmpfmOperator.OperType = Convert.ToInt16(lvi1.SubItems[3].Text);
                tmpfmOperator.Relation = Convert.ToInt16(lvi1.SubItems[4].Text);
                tmpfmOperator.OperContent = lvi1.SubItems[5].Text;
                tmpfmOperator.OperDisplay = lvi1.SubItems[6].Text;
                tmpfmOperator.ShowDialog();
                DialogResult dlr = tmpfmOperator.DialogResult;
                if (dlr == DialogResult.OK)
                {
                    lvi1.Text = tmpfmOperator.Description;
                    lvi1.SubItems[1].Text = tmpfmOperator.OperId;
                    if (tmpfmOperator.InorExclude)
                        lvi1.SubItems[2].Text = "包含";
                    else
                        lvi1.SubItems[2].Text = "排除";
                    lvi1.SubItems[3].Text = tmpfmOperator.OperType.ToString();
                    lvi1.SubItems[4].Text = tmpfmOperator.Relation.ToString();
                    lvi1.SubItems[5].Text = tmpfmOperator.OperContent;
                    lvi1.SubItems[6].Text = tmpfmOperator.OperDisplay;
                }

            }
        }
コード例 #2
0
ファイル: TaskAlterFm.cs プロジェクト: s7loves/mypowerscgl
 private void btnAddOpr_Click(object sender, EventArgs e)
 {
     fmOperator tmpfmOperator = new fmOperator(WorkConst.STATE_ADD);
     tmpfmOperator.OperId = Guid.NewGuid().ToString();
     tmpfmOperator.WorkflowId = NowTask.WorkFlowId;
     tmpfmOperator.ShowDialog();
     DialogResult dlr = tmpfmOperator.DialogResult;
     if (dlr == DialogResult.OK)
     {
         if (tmpfmOperator.OperDisplay.Length <= 0)
         {
             MsgBox.ShowWarningMessageBox ("没有选择处理者!!");
             return;
         }
         //Text = tmpfmOperator.OperId;
         ListViewItem lvi1 = new ListViewItem(tmpfmOperator.Description, 0);
         lvi1.SubItems.Add(tmpfmOperator.OperId);
         if (tmpfmOperator.InorExclude)
             lvi1.SubItems.Add("包含");
         else
             lvi1.SubItems.Add("排除");
         lvi1.SubItems.Add(tmpfmOperator.OperType.ToString());
         lvi1.SubItems.Add(tmpfmOperator.Relation.ToString());
         lvi1.SubItems.Add(tmpfmOperator.OperContent);
         lvi1.SubItems.Add(tmpfmOperator.OperDisplay);
         lvOper.Items.Add(lvi1);
     }
 }