Beispiel #1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            //输入用户变量
            int    Id       = Convert.ToInt32(Request.QueryString["id"]);
            int    flowId   = Convert.ToInt32(Request.QueryString["flowId"]);
            int    stepNo   = Convert.ToInt32(this.txtNodeId.Text);
            string stepName = this.txtNodeName.Text;
            string nodeType = this.ddlNodeType.SelectedValue;

            //验证
            //处理
            Process.MODEL prcsModi = Process.GetCache(Id);//Process.NewDataModel(Id);
            prcsModi.StepNo.set(stepNo);
            prcsModi.Name.set(stepName);
            prcsModi.NodeType.set(nodeType);
            prcsModi.Next_Nodes.set(this.GetNextNodeIdList());
            prcsModi.Notby.set(this.GetNextNodeIdList2());
            int iR = prcsModi.Update();

            //if (stepNo > 1)
            //{
            //    string sSql = String.Format("Update FL_Process set Next_Nodes=(case when Next_Nodes is null then '{2}' when Next_Nodes='' then '{2}' else Next_Nodes+','+'{2}' end) where FlowId={0} and StepNo={1}", flowId, stepNo - 1, stepNo);
            //    ULCode.QDA.XSql.Execute(sSql);
            //}
            //错误
            if (iR != 0)
            {
                string listUrl = this.MenuBar1.CurIndex == 4 ? String.Format("Flow_Prcs_VmlList.aspx?Id={0}", flowId) : String.Format("Flow_Prcs_List.aspx?Id={0}", flowId);
                ULCode.Debug.Confirm(this, "修改步骤成功,是否回到流程设计页?", listUrl, this.Request.Url.ToString());
            }
            else
            {
                ULCode.Debug.Alert(this, "修改步骤失败!");
            }
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            //获取id
            //*******************************************************
            //1.验证用户权限
            if (!this.Master.A_Edit)
            {
                Response.Write("你没有权限访问此功能!");
                Response.End();
                return;
            }
            //2.取得用户变量
            string flowId         = Request.QueryString["flowId"];
            string nodeId         = Request.QueryString["id"];
            string userList       = this.hidden_UserList.Value;
            string dutyList       = this.hidden_RoleList.Value;
            string departmentList = this.hidden_DepartmentList.Value;

            //下面语句是UI开发人员的语句,后台开发人员需删除掉。


            //以下代码由后台开发人员填写
            //3.验证用户变量,包含Request.QueryString及Request.Form
            if (string.IsNullOrEmpty(flowId))
            {
                return;
            }
            if (string.IsNullOrEmpty(nodeId))
            {
                return;
            }
            //4.业务处理过程
            Process.MODEL process = Process.GetCache(Convert.ToInt32(nodeId)); //Process.NewDataModel(nodeId);
            process.Priv_UserList.set(userList);
            process.Priv_DutyList.set(dutyList);
            process.Priv_DeptList.set(departmentList);
            process.UpdateTable.set(drop_UpdateTable.SelectedValue);
            process.UpdateKeyValue.set(keyvalue.Text);
            int row = process.Update();

            //填写主要业务逻辑代码

            //5.(用户及业务对象)统计与状态

            //6.登记日志
            if (row != 0)
            {
                //WX.Main.AddLog(WX.LogType.Default, "经办权限设置成功!", "");
                ULCode.Debug.Alert("经办权限设置成功!", "Flow_Prcs_List.aspx?FlowId=" + flowId);
            }
            else
            {
                ULCode.Debug.Alert(this, "经办权限设置设置失败!");
            }
        }