Пример #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"));
        }
    }
Пример #2
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
            { }
        }
    }
Пример #3
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
        { }
    }
Пример #4
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
     { }
 }
Пример #5
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");
            }
        }
    }