public static int WorkFlowRoleAdd(Model.WorkFlowRole workrole)
 {
     SqlParameter[] pars = new SqlParameter[] { new SqlParameter("@OID", SqlDbType.VarChar, 255), new SqlParameter("@WID", SqlDbType.Int), new SqlParameter("@WSTEP", SqlDbType.Int), new SqlParameter("@name", SqlDbType.VarChar, 50), new SqlParameter("@value", SqlDbType.VarChar, 50), new SqlParameter("@State", SqlDbType.TinyInt) };
     pars[0].Value = workrole.OID;
     pars[1].Value = workrole.WID;
     pars[2].Value = workrole.WSTEP;
     pars[3].Value = workrole.name;
     pars[4].Value = workrole.value;
     pars[5].Value = workrole.State;
     return(SqlHelper.ExecuteProcess("pro_WorkFlowRole_Add", pars));
 }
    protected void btnAdd_ServerClick(object sender, EventArgs e)
    {
        //创建公文授权
        string addorgan = ",";
        for (int a1 = 0; a1 < this.List_ADDOrgan.Items.Count; a1++)
        {
            if (List_ADDOrgan.Items[a1].Selected == true)
            {
                addorgan += List_ADDOrgan.Items[a1].Value + ",";
            }
        }
        Model.WorkFlowRole addwork = new Model.WorkFlowRole
        {
            OID = addorgan,
            WID = id,
            WSTEP = "0",
            State = "1",
            name = "创建公文",
            value = "0",
        };
        BLL.WorkFlowRole.WorkFlowRoleAdd(addwork);

        //公文流转授权
        string qx = Request.Form["options"].ToString();
        string[] s = qx.Split(new char[] { ';' });
        for (int i = 0; i < s.Length-1; i++)
        {
            ArrayList temp = (ArrayList)str[i];
            Model.WorkFlowRole workrole = new Model.WorkFlowRole { 
                OID= ","+s[i].ToString(),
                WID = id,
                WSTEP = temp[1].ToString(),
                State = "1",
                name= temp[0].ToString(),
                value = temp[2].ToString(),
            };
            BLL.WorkFlowRole.WorkFlowRoleAdd(workrole);
        }

        //发布公文授权
        string publicorgan = ",";
        for (int a2 = 0; a2 < this.List_PublicOrgan.Items.Count; a2++)
        {
            if (List_PublicOrgan.Items[a2].Selected == true)
            {
                publicorgan += List_PublicOrgan.Items[a2].Value + ",";
            }
        }
        Model.WorkFlowRole publicwork = new Model.WorkFlowRole
        {
            OID = publicorgan,
            WID = id,
            WSTEP = "999",
            State = "1",
            name = "发布公文",
            value = "0",
        };
        BLL.WorkFlowRole.WorkFlowRoleAdd(publicwork);

        //查阅公文授权
        string readorgan = ",";
        for (int a3 = 0; a3 < this.List_Read.Items.Count; a3++)
        {
            if (List_Read.Items[a3].Selected == true)
            {
                readorgan += List_Read.Items[a3].Value + ",";
            }
        }
        Model.WorkFlowRole readwork = new Model.WorkFlowRole
        {
            OID = readorgan,
            WID = id,
            WSTEP = "1000",
            State = "1",
            name = "查阅公文",
            value = "0",
        };
        BLL.WorkFlowRole.WorkFlowRoleAdd(readwork);

        UserOperatingManager.InputUserOperating(this.Session["admin"].ToString(), "工作流管理", "工作流授权" + "成功");
        MessageBox.ShowAndRedirect(this, "工作流活动授权成功!", "/workflow/WorkFlowList.aspx");
    }
Beispiel #3
0
 public static int WorkFlowRoleUpdate(Model.WorkFlowRole workrole)
 {
     return(DAL.WorkFlowRole.WorkFlowRoleUpdate(workrole));
 }
Beispiel #4
0
 public static int WorkFlowRoleAdd(Model.WorkFlowRole workrole)
 {
     return(DAL.WorkFlowRole.WorkFlowRoleAdd(workrole));
 }
    protected void btnAdd_ServerClick(object sender, EventArgs e)
    {
        //创建公文授权
        string addorgan = ",";

        for (int a1 = 0; a1 < this.List_ADDOrgan.Items.Count; a1++)
        {
            if (List_ADDOrgan.Items[a1].Selected == true)
            {
                addorgan += List_ADDOrgan.Items[a1].Value + ",";
            }
        }
        Model.WorkFlowRole addwork = new Model.WorkFlowRole
        {
            OID   = addorgan,
            WID   = id,
            WSTEP = "0",
            State = "1",
            name  = "创建公文",
            value = "0",
        };
        BLL.WorkFlowRole.WorkFlowRoleAdd(addwork);

        //公文流转授权
        string qx = Request.Form["options"].ToString();

        string[] s = qx.Split(new char[] { ';' });
        for (int i = 0; i < s.Length - 1; i++)
        {
            ArrayList          temp     = (ArrayList)str[i];
            Model.WorkFlowRole workrole = new Model.WorkFlowRole {
                OID   = "," + s[i].ToString(),
                WID   = id,
                WSTEP = temp[1].ToString(),
                State = "1",
                name  = temp[0].ToString(),
                value = temp[2].ToString(),
            };
            BLL.WorkFlowRole.WorkFlowRoleAdd(workrole);
        }

        //发布公文授权
        string publicorgan = ",";

        for (int a2 = 0; a2 < this.List_PublicOrgan.Items.Count; a2++)
        {
            if (List_PublicOrgan.Items[a2].Selected == true)
            {
                publicorgan += List_PublicOrgan.Items[a2].Value + ",";
            }
        }
        Model.WorkFlowRole publicwork = new Model.WorkFlowRole
        {
            OID   = publicorgan,
            WID   = id,
            WSTEP = "999",
            State = "1",
            name  = "发布公文",
            value = "0",
        };
        BLL.WorkFlowRole.WorkFlowRoleAdd(publicwork);

        //查阅公文授权
        string readorgan = ",";

        for (int a3 = 0; a3 < this.List_Read.Items.Count; a3++)
        {
            if (List_Read.Items[a3].Selected == true)
            {
                readorgan += List_Read.Items[a3].Value + ",";
            }
        }
        Model.WorkFlowRole readwork = new Model.WorkFlowRole
        {
            OID   = readorgan,
            WID   = id,
            WSTEP = "1000",
            State = "1",
            name  = "查阅公文",
            value = "0",
        };
        BLL.WorkFlowRole.WorkFlowRoleAdd(readwork);

        UserOperatingManager.InputUserOperating(this.Session["admin"].ToString(), "工作流管理", "工作流授权" + "成功");
        MessageBox.ShowAndRedirect(this, "工作流活动授权成功!", "/workflow/WorkFlowList.aspx");
    }