Esempio n. 1
0
    public void BanLiWork()
    {
        ZWL.BLL.ERPNWorkToDo MyModel = new ZWL.BLL.ERPNWorkToDo();
        MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString()));

        ZWL.BLL.ERPNWorkFlowToDoUser wfuser = new ZWL.BLL.ERPNWorkFlowToDoUser();

        wfuser.ToDoID         = int.Parse(Request.QueryString["ID"].ToString());
        wfuser.NodeID         = int.Parse(this.DropDownList3.SelectedItem.Value.ToString());
        wfuser.WorkFlowID     = int.Parse(MyModel.WorkFlowID.ToString());
        wfuser.ShenPiUserList = ZWL.Common.PublicMethod.WorkWeiTuoUserList(this.TextBox5.Text.Trim());

        if (wfuser.Exists(wfuser.ToDoID, wfuser.NodeID))
        {
            wfuser.UpdateUser();
        }
        else
        {
            wfuser.Add();
        }


        ZWL.Common.MessageBox.ShowAndRedirect(this, "指定下节点审批人成功!", "NowWorkFlow.aspx");
    }
Esempio n. 2
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        //判断开始、结束两个节点的唯一性,中间节点必须指定下一节点
        if (this.DropDownList1.SelectedItem.Text == "开始")
        {
            string ExsistID = ZWL.DBUtility.DbHelperSQL.GetSHSL("select ID from ERPNWorkFlowNode where WorkFlowID=" + Request.QueryString["WorkFlowID"].ToString() + " and NodeAddr='开始' and ID!=" + Request.QueryString["ID"].ToString());
            if (ExsistID.Trim().Length > 0)
            {
                ZWL.Common.MessageBox.Show(this, "该流程已经存在“开始”节点,请不要重复添加!");
                return;
            }
        }
        if (this.DropDownList1.SelectedItem.Text == "结束")
        {
            string ExsistID = ZWL.DBUtility.DbHelperSQL.GetSHSL("select ID from ERPNWorkFlowNode where WorkFlowID=" + Request.QueryString["WorkFlowID"].ToString() + " and NodeAddr='结束' and ID!=" + Request.QueryString["ID"].ToString());
            if (ExsistID.Trim().Length > 0)
            {
                ZWL.Common.MessageBox.Show(this, "该流程已经存在“结束”节点,请不要重复添加!");
                return;
            }
        }

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

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

        //ZWL.BLL.ERPNWorkFlowNode Model = new ZWL.BLL.ERPNWorkFlowNode();

        //Model.ID = int.Parse(Request.QueryString["ID"].ToString());
        //Model.WorkFlowID = int.Parse(Request.QueryString["WorkFlowID"].ToString());
        //Model.NodeSerils = this.txtNodeSerils.Text.ToString().Trim();
        //Model.NodeName = this.txtNodeName.Text.ToString().Trim();
        //Model.NodeAddr = this.DropDownList1.SelectedItem.Text.ToString();
        //Model.NextNode = this.txtNextNode.Text.ToString().Trim();
        //Model.IFCanJump = this.DropDownList2.SelectedItem.Text.ToString();
        //Model.IFCanView = this.DropDownList3.SelectedItem.Text.ToString();
        //Model.IFCanEdit = this.DropDownList4.SelectedItem.Text.ToString();
        //Model.IFCanDel = this.DropDownList5.SelectedItem.Text.ToString();
        //Model.JieShuHours = int.Parse(this.txtJieShuHours.Text.Trim());
        //Model.PSType = this.DropDownList6.SelectedItem.Text.ToString();
        //Model.SPType = this.DropDownList7.SelectedItem.Text.ToString();
        //Model.SPDefaultList = this.txtSPDefaultList.Text.ToString().Trim();

        //Model.Update();

        //update by wangzebin 20130913

        ZWL.BLL.ERPNWorkFlowToDoUser wfuser = new ZWL.BLL.ERPNWorkFlowToDoUser();

        wfuser.ToDoID         = int.Parse(Request.QueryString["ToDoID"].ToString());
        wfuser.NodeID         = int.Parse(Request.QueryString["ID"].ToString());
        wfuser.WorkFlowID     = int.Parse(Request.QueryString["WorkFlowID"].ToString());
        wfuser.ShenPiUserList = this.txtSPDefaultList.Text.ToString().Trim();

        if (wfuser.Exists(wfuser.ToDoID, wfuser.NodeID))
        {
            wfuser.UpdateUser();
        }
        else
        {
            wfuser.Add();
        }


        ZWL.Common.MessageBox.ShowAndRedirect(this, "指定下节点审批人成功!", "NowWorkFlow.aspx");

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

        ZWL.Common.MessageBox.ShowAndRedirect(this, "节点定义信息修改成功!", "NWorkFlowNode.aspx?WorkFlowID=" + Request.QueryString["WorkFLowID"].ToString());
    }