Beispiel #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            //绑定dd7 ,条件字段
            ZWL.Common.PublicMethod.BindDDL(this.DropDownList7, ZWL.DBUtility.DbHelperSQL.GetSHSL("select top 1 TiaoJianList from ERPForm where FormName='" + ZWL.DBUtility.DbHelperSQL.GetSHSL("select top 1 FormName from ERPWorkFlow where ID=" + Request.QueryString["WorkFlowID"].ToString()) + "'"));

            ZWL.BLL.ERPWorkFlowJieDian Model = new ZWL.BLL.ERPWorkFlowJieDian();
            Model.GetModel(int.Parse(Request.QueryString["ID"].ToString()));

            this.DropDownList3.SelectedValue = Model.IFDelFile;
            this.DropDownList2.SelectedValue = Model.IFEditFile;
            this.DropDownList4.SelectedValue = Model.JieDianAddr;
            this.TextBox2.Text = Model.JieDianName;
            this.TextBox1.Text = Model.JieDianSerils;
            this.TextBox5.Text = Model.JieShuHours.ToString();
            this.TextBox6.Text = Model.JingBanRenYuanList;
            this.TextBox3.Text = Model.NextJieDianSerils;
            this.DropDownList1.SelectedValue = Model.PingShenMoShi;
            this.DropDownList5.SelectedValue = Model.ShengPiUserSetting;

            ZWL.Common.PublicMethod.SetSessionValue("TiaoJiaoList", Model.TiaoJianTiaoZhuan);
            ZWL.Common.PublicMethod.BindDDL(this.DropDownList6, ZWL.Common.PublicMethod.GetSessionValue("TiaoJiaoList"));
        }
    }
Beispiel #2
0
 public void DataBindToGridview()
 {
     ZWL.BLL.ERPWorkFlowJieDian MyModel = new ZWL.BLL.ERPWorkFlowJieDian();
     GVData.DataSource = MyModel.GetList("WorkFlowID=" + Request.QueryString["ID"].ToString() + " order by JieDianSerils asc");
     GVData.DataBind();
     LabPageSum.Text     = Convert.ToString(GVData.PageCount);
     LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1));
     this.GoPage.Text    = LabCurrentPage.Text.ToString();
 }
Beispiel #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            //设置上传的附件为空
            ZWL.Common.PublicMethod.SetSessionValue("WenJianList", "");
            try
            {
                //绑定所有表单   限制使用人
                ZWL.DBUtility.DbHelperSQL.BindDropDownList("select distinct FormName from ERPWorkFlow where FormName in(select FormName from ERPForm where ShiYongUserList='' or ','+ShiYongUserList+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%') order by FormName asc", this.DropDownList1, "FormName", "FormName");

                //获取表单内容
                GetFormContent(this.DropDownList1.SelectedItem.Text);

                //绑定该表单下的所有工作流    限制使用人
                ZWL.DBUtility.DbHelperSQL.BindDropDownList("select ID,WorkFlowName from ERPWorkFlow where (UserList='' and  FormName='" + this.DropDownList1.SelectedItem.Text + "') or (','+UserList+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%' and  FormName='" + this.DropDownList1.SelectedItem.Text + "') order by WorkFlowName asc", this.DropDownList2, "WorkFlowName", "ID");

                //绑定工作名称
                this.TextBox1.Text = ZWL.Common.PublicMethod.GetSessionValue("UserName") + "--" + this.DropDownList2.SelectedItem.Text + "(" + DateTime.Now.ToShortDateString() + ")";

                //绑定下一节点
                string[] NextStrList = ZWL.DBUtility.DbHelperSQL.GetSHSL("select NextJieDianSerils from ERPWorkFlowJieDian where WorkFlowID=" + this.DropDownList2.SelectedItem.Value.ToString() + " and JieDianAddr='开始'").Split(',');
                for (int i = 0; i < NextStrList.Length; i++)
                {
                    ListItem MyItem = new ListItem();
                    MyItem.Value = ZWL.DBUtility.DbHelperSQL.GetSHSL("select ID from ERPWorkFlowJieDian where JieDianSerils='" + NextStrList[i].ToString() + "' and WorkFlowID=" + this.DropDownList2.SelectedItem.Value.ToString());//根据序号和workflowID获得节点ID
                    MyItem.Text  = "节点序号:" + NextStrList[i].ToString() + "--节点名称:" + ZWL.DBUtility.DbHelperSQL.GetSHSL("select JieDianName from ERPWorkFlowJieDian where JieDianSerils='" + NextStrList[i].ToString() + "' and WorkFlowID=" + this.DropDownList2.SelectedItem.Value.ToString());
                    if (MyItem.Value.ToString().Length > 0)
                    {
                        this.DropDownList3.Items.Add(MyItem);
                    }
                }
                //根据选择的节点,绑定人员等信息。
                ZWL.BLL.ERPWorkFlowJieDian MyJieDian = new ZWL.BLL.ERPWorkFlowJieDian();
                MyJieDian.GetModel(int.Parse(this.DropDownList3.SelectedItem.Value.ToString()));
                this.Label2.Text   = MyJieDian.PingShenMoShi + "&nbsp;&nbsp;&nbsp;&nbsp;" + MyJieDian.ShengPiUserSetting;
                this.Label3.Text   = MyJieDian.JingBanRenYuanList;
                this.TextBox5.Text = MyJieDian.JingBanRenYuanList;
                //设定选择审批人员是自由指定还是定向指定
                if (MyJieDian.ShengPiUserSetting == "审批时自由指定")
                {
                    this.TextBox2.Text = "";
                }
                else
                {
                    this.TextBox2.Text = this.DropDownList3.SelectedItem.Value.ToString();
                }
            }
            catch
            { }
        }
    }
Beispiel #4
0
    protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
    {
        this.DropDownList3.Items.Clear();
        //绑定工作名称
        this.TextBox1.Text = ZWL.Common.PublicMethod.GetSessionValue("UserName") + "--" + this.DropDownList2.SelectedItem.Text + "(" + DateTime.Now.ToShortDateString() + ")";

        try
        {
            //绑定下一节点
            string[] NextStrList = ZWL.DBUtility.DbHelperSQL.GetSHSL("select NextJieDianSerils from ERPWorkFlowJieDian where WorkFlowID=" + this.DropDownList2.SelectedItem.Value.ToString() + " and JieDianAddr='开始'").Split(',');
            for (int i = 0; i < NextStrList.Length; i++)
            {
                ListItem MyItem = new ListItem();
                MyItem.Value = ZWL.DBUtility.DbHelperSQL.GetSHSL("select ID from ERPWorkFlowJieDian where JieDianSerils='" + NextStrList[i].ToString() + "' and WorkFlowID=" + this.DropDownList2.SelectedItem.Value.ToString());//根据序号和workflowID获得节点ID
                MyItem.Text  = "节点序号:" + NextStrList[i].ToString() + "--节点名称:" + ZWL.DBUtility.DbHelperSQL.GetSHSL("select JieDianName from ERPWorkFlowJieDian where JieDianSerils='" + NextStrList[i].ToString() + "' and WorkFlowID=" + this.DropDownList2.SelectedItem.Value.ToString());
                if (MyItem.Value.ToString().Length > 0)
                {
                    this.DropDownList3.Items.Add(MyItem);
                }
            }
            //根据选择的节点,绑定人员等信息。
            ZWL.BLL.ERPWorkFlowJieDian MyJieDian = new ZWL.BLL.ERPWorkFlowJieDian();
            MyJieDian.GetModel(int.Parse(this.DropDownList3.SelectedItem.Value.ToString()));
            this.Label2.Text   = MyJieDian.PingShenMoShi + "&nbsp;&nbsp;&nbsp;&nbsp;" + MyJieDian.ShengPiUserSetting;
            this.Label3.Text   = MyJieDian.JingBanRenYuanList;
            this.TextBox5.Text = MyJieDian.JingBanRenYuanList;
            //设定选择审批人员是自由指定还是定向指定
            if (MyJieDian.ShengPiUserSetting == "审批时自由指定")
            {
                this.TextBox2.Text = "";
            }
            else
            {
                this.TextBox2.Text = this.DropDownList3.SelectedItem.Value.ToString();
            }
        }
        catch
        { }
    }
Beispiel #5
0
 protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         //根据选择的节点,绑定人员等信息。
         ZWL.BLL.ERPWorkFlowJieDian MyJieDian = new ZWL.BLL.ERPWorkFlowJieDian();
         MyJieDian.GetModel(int.Parse(this.DropDownList3.SelectedItem.Value.ToString()));
         this.Label2.Text   = MyJieDian.PingShenMoShi + "&nbsp;&nbsp;&nbsp;&nbsp;" + MyJieDian.ShengPiUserSetting;
         this.Label3.Text   = MyJieDian.JingBanRenYuanList;
         this.TextBox5.Text = MyJieDian.JingBanRenYuanList;
         //设定选择审批人员是自由指定还是定向指定
         if (MyJieDian.ShengPiUserSetting == "审批时自由指定")
         {
             this.TextBox2.Text = "";
         }
         else
         {
             this.TextBox2.Text = this.DropDownList3.SelectedItem.Value.ToString();
         }
     }
     catch
     { }
 }
Beispiel #6
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        //判断开始、结束两个节点的唯一性,中间节点必须指定下一节点
        if (this.DropDownList4.SelectedItem.Text == "开始")
        {
            string ExsistID = ZWL.DBUtility.DbHelperSQL.GetSHSL("select ID from ERPWorkFlowJieDian where WorkFlowID=" + Request.QueryString["WorkFlowID"].ToString() + " and JieDianAddr='开始' and ID!=" + Request.QueryString["ID"].ToString());
            if (ExsistID.Trim().Length > 0)
            {
                ZWL.Common.MessageBox.Show(this, "该流程已经存在“开始”节点,请不要重复添加!");
                return;
            }
        }
        if (this.DropDownList4.SelectedItem.Text == "结束")
        {
            string ExsistID = ZWL.DBUtility.DbHelperSQL.GetSHSL("select ID from ERPWorkFlowJieDian where WorkFlowID=" + Request.QueryString["WorkFlowID"].ToString() + " and JieDianAddr='结束' and ID!=" + Request.QueryString["ID"].ToString());
            if (ExsistID.Trim().Length > 0)
            {
                ZWL.Common.MessageBox.Show(this, "该流程已经存在“结束”节点,请不要重复添加!");
                return;
            }
        }

        if (this.DropDownList4.SelectedItem.Text == "中间段" || this.DropDownList4.SelectedItem.Text == "开始")
        {
            string ExsistID = this.TextBox3.Text.Trim();
            if (ExsistID.Trim().Length <= 0)
            {
                ZWL.Common.MessageBox.Show(this, "中间段和开始节点必须指定下一节点序号!");
                return;
            }
        }
        //判断节点序号的唯一性
        string NodeSerils = ZWL.DBUtility.DbHelperSQL.GetSHSL("select ID from ERPWorkFlowJieDian where WorkFlowID=" + Request.QueryString["WorkFlowID"].ToString() + " and JieDianSerils='" + this.TextBox1.Text + "' and ID!=" + Request.QueryString["ID"].ToString());

        if (NodeSerils.Trim().Length > 0)
        {
            ZWL.Common.MessageBox.Show(this, "该节点序号已经存在,请不要重复添加!");
            return;
        }


        ZWL.BLL.ERPWorkFlowJieDian Model = new ZWL.BLL.ERPWorkFlowJieDian();
        Model.ID                 = int.Parse(Request.QueryString["ID"].ToString());
        Model.IFDelFile          = this.DropDownList3.SelectedItem.Text;
        Model.IFEditFile         = this.DropDownList2.SelectedItem.Text;
        Model.JieDianAddr        = this.DropDownList4.SelectedItem.Text;
        Model.JieDianName        = this.TextBox2.Text;
        Model.JieDianSerils      = this.TextBox1.Text;
        Model.JieShuHours        = int.Parse(this.TextBox5.Text.Trim());
        Model.JingBanRenYuanList = this.TextBox6.Text.Trim();
        Model.NextJieDianSerils  = this.TextBox3.Text.Trim();
        Model.PingShenMoShi      = this.DropDownList1.SelectedItem.Text;
        Model.ShengPiUserSetting = this.DropDownList5.SelectedItem.Text;
        Model.TiaoJianTiaoZhuan  = ZWL.Common.PublicMethod.GetSessionValue("TiaoJiaoList");
        Model.WorkFlowID         = int.Parse(Request.QueryString["WorkFlowID"].ToString());
        Model.Update();

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户修改工作流程节点信息(" + this.TextBox2.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "工作流程节点修改成功!", "WorkFlowDesign.aspx?ID=" + Request.QueryString["WorkFlowID"].ToString());
    }
Beispiel #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //该节点根据传过来的工作的ID信息,查询到使用的工作流、当前节点信息(全部通过往下流转、一个通过往下流转)
        //根据节点信息、该工作的通过人列表信息、审批人列表信息===>该节点是否应该继续往下流转
        //如果要往下流转则显示页面上的下一节点设置信息,否则用程序跳转回待办事项页面。

        //根据Type参数属性,Type为0时为正常下一节点,Type为1时为绑定所有节点供选择。
        if (!Page.IsPostBack)
        {
            ZWL.BLL.ERPWorkToDo MyModel = new ZWL.BLL.ERPWorkToDo();
            MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString()));
            this.Label1.Text = MyModel.WorkName;
            //判断 当前节点信息(全部通过往下流转、一个通过往下流转)  该工作的通过人列表信息、审批人列表信息
            string SPMoShi = ZWL.DBUtility.DbHelperSQL.GetSHSL("select top 1 PingShenMoShi from ERPWorkFlowJieDian where ID=" + MyModel.JieDianID.ToString());
            if (CheCkIfOk(MyModel.TongGuoRenList, MyModel.ShenPiRenList, SPMoShi) == true)
            {
                //绑定下一个节点
                try
                {
                    //绑定下一节点  正常状态

                    if (Request.QueryString["Type"].ToString().Trim() == "0")
                    {
                        string[] NextStrList = ZWL.DBUtility.DbHelperSQL.GetSHSL("select NextJieDianSerils from ERPWorkFlowJieDian where ID=" + MyModel.JieDianID.ToString()).Split(',');
                        for (int i = 0; i < NextStrList.Length; i++)
                        {
                            ListItem MyItem = new ListItem();
                            MyItem.Value = ZWL.DBUtility.DbHelperSQL.GetSHSL("select ID from ERPWorkFlowJieDian where JieDianSerils='" + NextStrList[i].ToString() + "' and WorkFlowID=" + MyModel.WorkFlowID.ToString());//根据序号和workflowID获得节点ID
                            MyItem.Text  = "节点序号:" + NextStrList[i].ToString() + "--节点名称:" + ZWL.DBUtility.DbHelperSQL.GetSHSL("select JieDianName from ERPWorkFlowJieDian where JieDianSerils='" + NextStrList[i].ToString() + "' and WorkFlowID=" + MyModel.WorkFlowID.ToString());
                            if (MyItem.Value.ToString().Length > 0)
                            {
                                this.DropDownList3.Items.Add(MyItem);
                            }
                        }
                    }
                    else //绑定所有节点(除开始节点)
                    {
                        //清除根据条件决定下一节点选项
                        this.CheckBox1.Checked = false;
                        this.CheckBox1.Enabled = false;


                        DataSet MyDS = ZWL.DBUtility.DbHelperSQL.GetDataSet("select ID,JieDianSerils,JieDianName from ERPWorkFlowJieDian where JieDianAddr!='开始' and WorkFlowID=" + MyModel.WorkFlowID.ToString());
                        for (int jjj = 0; jjj < MyDS.Tables[0].Rows.Count; jjj++)
                        {
                            ListItem MyItem = new ListItem();
                            MyItem.Value = MyDS.Tables[0].Rows[jjj]["ID"].ToString();
                            MyItem.Text  = "节点序号:" + MyDS.Tables[0].Rows[jjj]["JieDianSerils"].ToString() + "--节点名称:" + MyDS.Tables[0].Rows[jjj]["JieDianName"].ToString();
                            if (MyItem.Value.ToString().Length > 0)
                            {
                                this.DropDownList3.Items.Add(MyItem);
                            }
                        }
                    }
                    //根据选择的节点,绑定人员等信息。
                    ZWL.BLL.ERPWorkFlowJieDian MyJieDian = new ZWL.BLL.ERPWorkFlowJieDian();
                    MyJieDian.GetModel(int.Parse(this.DropDownList3.SelectedItem.Value.ToString()));
                    this.Label2.Text   = MyJieDian.PingShenMoShi + "&nbsp;&nbsp;&nbsp;&nbsp;" + MyJieDian.ShengPiUserSetting;
                    this.Label3.Text   = MyJieDian.JingBanRenYuanList;
                    this.TextBox5.Text = MyJieDian.JingBanRenYuanList;
                    //设定选择审批人员是自由指定还是定向指定
                    if (MyJieDian.ShengPiUserSetting == "审批时自由指定")
                    {
                        this.TextBox2.Text = "";
                    }
                    else
                    {
                        this.TextBox2.Text = this.DropDownList3.SelectedItem.Value.ToString();
                    }
                }
                catch
                { }
            }
            else
            {
                ZWL.Common.MessageBox.ShowAndRedirect(this, "该节点工作需要等待其他人办理后才能继续往下流转,请继续等待!", "NowWorkFlow.aspx");
            }
        }
    }