Ejemplo n.º 1
0
        public WF_TEMPLATES GetWFTemplatesInfoByWFID(string wftID)
        {
            IWFTemplatesStepService _wfService = ServiceContainer.GetService <WFTemplatesStepService>();
            WF_TEMPLATES            wf         = _wfService.GetWFTemplatesInfoByWFID(wftID);

            return(wf);
        }
Ejemplo n.º 2
0
        private void btnCreate_Click(object sender, EventArgs e)
        {
            if (this.txtWFName.Text == "")
            {
                this.txtWFName.Focus();
                this.txtWFName.SelectAll();
            }
            else
            {
                //判定数据库中是否已经存在同名称的工作流
                if (IsWFTemplateExist())
                {
                    MessageBox.Show("已经存在同名称的工作流,请重新命名!", "工作流提示助手提醒您:", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                    this.txtWFName.Focus();
                    this.txtWFName.SelectAll();
                    return;
                }
                else
                {
                    isModify = false;
                    this.btnNextStepAdd.Text = "保存并添加下一节点";
                    //  this.btnNextStepAdd.Visible = true;
                    this.pnlModify.Visible    = false;
                    this.pnlMain.Enabled      = true;
                    this.gpTotalPanel.Enabled = true;
                    this.txtDefineUser.Text   = CommonFuns.NewInstance.LoginInfo.LoginID;
                    this.txtUsers.Focus();
                    this.radioBtnYes.Checked = true;  //第一次创建的第一个步骤默认为起始节点


                    this.combCurrentStep.SelectedIndex = -1;
                    this.combThroughNext.Text          = "";
                    this.txtComment.Text = "";


                    //保存
                    WF_TEMPLATES tempate = new WF_TEMPLATES();
                    tempate.WFT_ID     = Guid.NewGuid().ToString();
                    tempate.WFT_NAME   = this.txtWFName.Text.ToString();
                    tempate.DEL_FLAG   = "N";
                    tempate.CREATEDATE = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    tempate.CREATEUSER = CommonFuns.NewInstance.LoginInfo.LoginID;
                    try
                    {
                        tempate.Save();
                        currentWFTemplateID = tempate.WFT_ID;
                        ///
                        this.txtWFName.Enabled = false;
                        initialEvent(true, true);
                        combCurrentStep.Focus();
                        pnlBtnTools.Visible = true;
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message.ToString());
                    }
                    finally
                    {
                    }
                }
                //this.combThroughNext.Items.Remove(this.combCurrentStep.SelectedItem);

                // RefreshNextStepNode();
            }
        }
Ejemplo n.º 3
0
        private void btnCreate_Click(object sender, EventArgs e)
        {
            if (this.txtWFName.Text == "")
            {
                this.txtWFName.Focus();
                this.txtWFName.SelectAll();

            }
            else
            {

                //判定数据库中是否已经存在同名称的工作流
                if (IsWFTemplateExist())
                {
                    MessageBox.Show("已经存在同名称的工作流,请重新命名!", "工作流提示助手提醒您:", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                    this.txtWFName.Focus();
                    this.txtWFName.SelectAll();
                    return;
                }
                else
                {

                    isModify = false;
                    this.btnNextStepAdd.Text = "保存并添加下一节点";
                  //  this.btnNextStepAdd.Visible = true;
                    this.pnlModify.Visible = false;
                    this.pnlMain.Enabled = true;
                    this.gpTotalPanel.Enabled = true;
                    this.txtDefineUser.Text = CommonFuns.NewInstance.LoginInfo.LoginID;
                    this.txtUsers.Focus();
                    this.radioBtnYes.Checked = true;  //第一次创建的第一个步骤默认为起始节点

                    this.combCurrentStep.SelectedIndex = -1;
                    this.combThroughNext.Text ="";
                    this.txtComment.Text = "";

                    //保存
                    WF_TEMPLATES tempate = new WF_TEMPLATES();
                    tempate.WFT_ID = Guid.NewGuid().ToString();
                    tempate.WFT_NAME = this.txtWFName.Text.ToString();
                    tempate.DEL_FLAG = "N";
                    tempate.CREATEDATE = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    tempate.CREATEUSER = CommonFuns.NewInstance.LoginInfo.LoginID;
                    try
                    {
                        tempate.Save();
                        currentWFTemplateID = tempate.WFT_ID;
                        ///
                        this.txtWFName.Enabled = false;
                        initialEvent(true, true);
                        combCurrentStep.Focus();
                        pnlBtnTools.Visible = true;

                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message.ToString());
                    }
                    finally
                    {

                    }

                }
                //this.combThroughNext.Items.Remove(this.combCurrentStep.SelectedItem);

                // RefreshNextStepNode();

            }
        }