Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //删除
         if (Request.QueryString["limit"] == "del")
         {
             string ids   = Request.QueryString["id"].ToString();
             int    count = WebCommon.Public.DataTableDel("tbl_Flow", "id in(" + ids + ") and (select count(*) from tbl_flowwork where flowid=tbl_Flow.id and dealflag=0)=0");
             if (count > 0)
             {
                 WebCommon.Script.Redirect(WebCommon.Public.GetFromUrl());
             }
             else
             {
                 WebCommon.Script.AlertAndGoBack("删除失败,请检查该流程是否有工作存在!");
             }
         }
         //更新
         if (Request.QueryString["type"] == "update")
         {
             int id = WebCommon.Public.ToInt(Request.QueryString["id"]);
             WebModels.Tbl_Flow flow = WebBLL.Tbl_FlowManager.GetTbl_FlowById(id);
             flow.FormContent = WebBLL.Tbl_FlowFormManager.GetTbl_FlowFormById(flow.FormID).IF_Content;
             WebBLL.Tbl_FlowManager.UpdateTbl_Flow(flow);
             WebCommon.Script.AlertAndGoBack("更新并同步表单成功!");
         }
         //绑定列表
         Bind();
     }
 }
Пример #2
0
        protected void btn_submit_Click(object sender, EventArgs e)
        {
            WebModels.Tbl_FlowNode node = new WebModels.Tbl_FlowNode();
            node.FlowID        = Convert.ToInt32(this.FlowName.SelectedValue);
            node.NodeNo        = this.NodeNo.Value;
            node.NodeName      = this.NodeName.Value;
            node.NodeStage     = this.NodeStage.SelectedValue;
            node.NodeType      = this.NodeType.SelectedValue;
            node.NodeUser      = WebCommon.Public.ListBoxValuesGet(NodeUser);
            node.NodeUserLimit = this.NodeUserLimit.SelectedValue;
            node.DealFlag      = 0;
            node.DealUser      = WebCommon.Public.GetUserName();
            int count = WebBLL.Tbl_FlowNodeManager.AddTbl_FlowNode(node);

            if (count > 0)
            {
                WebModels.Tbl_Flow tbl_flow = WebBLL.Tbl_FlowManager.GetTbl_FlowById(Convert.ToInt32(FlowName.SelectedValue));
                tbl_flow.FormContent = NodeFormArea.Value;
                WebBLL.Tbl_FlowManager.UpdateTbl_Flow(tbl_flow);
                ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('添加成功!');window.external.reload();window.external.close();", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('添加失败!');", true);
            }
        }
Пример #3
0
        public void Bind()
        {
            int ID = Convert.ToInt32(Request.QueryString["id"]);

            WebModels.Tbl_Flow project = WebBLL.Tbl_FlowManager.GetTbl_FlowById(ID);
            this.FormID.SelectedValue   = project.FormID.ToString();
            this.FlowName.Value         = project.FlowName;
            this.FlowType.SelectedValue = project.FlowType;
            this.Remark.Value           = project.Remark;
            FormID.Items.Insert(0, new ListItem(WebBLL.Tbl_FlowFormManager.GetTbl_FlowFormById(project.FormID).IF_Name, project.FormID.ToString()));
        }
Пример #4
0
        protected void btn_submit_Click(object sender, EventArgs e)
        {
            int ID = Convert.ToInt32(Request.QueryString["id"]);

            WebModels.Tbl_Flow contract = WebBLL.Tbl_FlowManager.GetTbl_FlowById(ID);
            contract.FormID   = Convert.ToInt32(this.FormID.SelectedValue);
            contract.FlowName = this.FlowName.Value;
            contract.FlowType = this.FlowType.SelectedValue;
            contract.Remark   = this.Remark.Value;
            contract.DealUser = WebCommon.Public.GetUserName();
            int count = WebBLL.Tbl_FlowManager.UpdateTbl_Flow(contract);

            if (count > 0)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('修改成功!');window.external.reload();window.external.close();", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('修改失败!');", true);
            }
        }
Пример #5
0
        protected void btn_submit_Click(object sender, EventArgs e)
        {
            WebModels.Tbl_Flow flow = new WebModels.Tbl_Flow();
            flow.FormID      = Convert.ToInt32(this.FormID.SelectedValue);
            flow.FlowName    = this.FlowName.Value;
            flow.FormID      = Convert.ToInt32(FormID.SelectedValue);
            flow.FlowType    = Convert.ToString(this.FlowType.SelectedValue);
            flow.FormContent = WebBLL.Tbl_FlowFormManager.GetTbl_FlowFormById(Convert.ToInt32(FormID.SelectedValue)).IF_Content;
            flow.Remark      = this.Remark.Value;
            flow.DealFlag    = "0";
            flow.DealUser    = WebCommon.Public.GetUserName();
            int count = WebBLL.Tbl_FlowManager.AddTbl_Flow(flow);

            if (count > 0)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('添加成功!');window.external.reload();window.external.close();", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('添加失败!');", true);
            }
        }