Exemple #1
0
        private void btnAddOpr_Click(object sender, EventArgs e)
        {
            var tmpFrmOperator = new FrmOperator(WorkConst.STATE_ADD)
            {
                OperId     = BusinessLogic.NewGuid(),
                WorkflowId = NowTask.WorkFlowId
            };

            tmpFrmOperator.ShowDialog();
            var dlr = tmpFrmOperator.DialogResult;

            if (dlr == DialogResult.OK)
            {
                if (tmpFrmOperator.OperDisplay.Length <= 0)
                {
                    MessageBoxHelper.ShowWarningMsg("没有选择处理者!!");
                    return;
                }
                //Text = tmpFrmOperator.OperId;
                var lvi1 = new ListViewItem(tmpFrmOperator.Description, 0);
                lvi1.SubItems.Add(tmpFrmOperator.OperId);
                lvi1.SubItems.Add(tmpFrmOperator.InorExclude ? "包含" : "排除");
                lvi1.SubItems.Add(tmpFrmOperator.OperType.ToString());
                lvi1.SubItems.Add(tmpFrmOperator.Relation.ToString());
                lvi1.SubItems.Add(tmpFrmOperator.OperContent);
                lvi1.SubItems.Add(tmpFrmOperator.OperDisplay);
                lvExOper.Items.Add(lvi1);
            }
        }
Exemple #2
0
        private void btnModifyOpr_Click(object sender, EventArgs e)
        {
            if (lvExOper.SelectedItems.Count > 0)
            {
                var lvi1           = lvExOper.SelectedItems[0];
                var tmpFrmOperator = new FrmOperator(WorkConst.STATE_MOD)
                {
                    Description = lvi1.Text,
                    WorkflowId  = NowTask.WorkFlowId,
                    OperId      = lvi1.SubItems[1].Text
                };
                switch (lvi1.SubItems[2].Text)
                {
                case "包含":
                    tmpFrmOperator.InorExclude = true;
                    break;

                case "排除":
                    tmpFrmOperator.InorExclude = false;
                    break;
                }

                tmpFrmOperator.OperType    = Convert.ToInt16(lvi1.SubItems[3].Text);
                tmpFrmOperator.Relation    = Convert.ToInt16(lvi1.SubItems[4].Text);
                tmpFrmOperator.OperContent = lvi1.SubItems[5].Text;
                tmpFrmOperator.OperDisplay = lvi1.SubItems[6].Text;
                tmpFrmOperator.ShowDialog();
                var dlr = tmpFrmOperator.DialogResult;
                if (dlr == DialogResult.OK)
                {
                    lvi1.Text             = tmpFrmOperator.Description;
                    lvi1.SubItems[1].Text = tmpFrmOperator.OperId;
                    lvi1.SubItems[2].Text = tmpFrmOperator.InorExclude ? "包含" : "排除";
                    lvi1.SubItems[3].Text = tmpFrmOperator.OperType.ToString();
                    lvi1.SubItems[4].Text = tmpFrmOperator.Relation.ToString();
                    lvi1.SubItems[5].Text = tmpFrmOperator.OperContent;
                    lvi1.SubItems[6].Text = tmpFrmOperator.OperDisplay;
                }
            }
        }