Example #1
0
    private void BindDropDown()
    {
        //所属流程
        EWF_Flow_AppBLL app = new EWF_Flow_AppBLL((Guid)ViewState["AppID"]);

        lb_AppName.Text = app.Model.Name;

        // 默认下一环节
        ddl_DefaultNextProcess.DataSource = app.GetProcessList();
        ddl_DefaultNextProcess.DataBind();
        ddl_DefaultNextProcess.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));


        ddl_Type.DataSource = DictionaryBLL.GetDicCollections("EWF_Flow_ProcessType");
        ddl_Type.DataBind();
        ddl_Type.SelectedValue = "6";

        ddl_DataObject_Mail.DataSource = app.GetDataObjectList();
        ddl_DataObject_Mail.DataBind();
        ddl_DataObject_Mail.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));

        ddl_RecipientRole_Mail.DataSource = EWF_RoleBLL.GetModelList("");
        ddl_RecipientRole_Mail.DataBind();
        ddl_RecipientRole_Mail.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));
        ddl_RecipientRole_Mail_SelectedIndexChanged(null, null);
    }
Example #2
0
    protected void bt_Save_Click(object sender, EventArgs e)
    {
        if ((Guid)ViewState["Role"] != Guid.Empty)
        {
            EWF_RoleBLL role = new EWF_RoleBLL((Guid)ViewState["Role"]);
            role.Model.Name        = tbx_Name.Text;
            role.Model.Description = tbx_Description.Text;
            role.Update();

            DataTable dt = (DataTable)ViewState["DTDetail"];
            foreach (DataRow dr in dt.Rows)
            {
                switch (dr.RowState)
                {
                case DataRowState.Added:
                    role.Add_DORelational((string)dr["ScrValue"], (int)dr["RecipientStaff"]);
                    break;

                case DataRowState.Deleted:
                    role.Delete_DORelational((string)dr["ScrValue", DataRowVersion.Original], (int)dr["RecipientStaff", DataRowVersion.Original]);
                    break;
                }
            }
        }
        Response.Redirect("RoleList.aspx");
    }
    protected void bt_Save_Click(object sender, EventArgs e)
    {
        if (this.ddl_Type.SelectedValue == "0")
        {
            MessageBox.Show(this, "请选择角色类型!");
            return;
        }
        EWF_RoleBLL role;

        if ((Guid)ViewState["Role"] == Guid.Empty)
        {
            role                   = new EWF_RoleBLL();
            role.Model.Name        = tbx_Name.Text;
            role.Model.Description = tbx_Description.Text;
            role.Model.Type        = int.Parse(ddl_Type.SelectedValue);
            role.Add();
        }
        else
        {
            role                   = new EWF_RoleBLL((Guid)ViewState["Role"]);
            role.Model.Name        = tbx_Name.Text;
            role.Model.Description = tbx_Description.Text;
            role.Update();
        }
        Response.Redirect("RoleList.aspx");
    }
 protected void bt_Save_Click(object sender, EventArgs e)
 {
     if (this.ddl_Type.SelectedValue == "0")
     {
         MessageBox.Show(this, "请选择角色类型!");
         return;
     }
     EWF_RoleBLL role;
     if ((Guid)ViewState["Role"] == Guid.Empty)
     {
         role = new EWF_RoleBLL();
         role.Model.Name = tbx_Name.Text;
         role.Model.Description = tbx_Description.Text;
         role.Model.Type = int.Parse(ddl_Type.SelectedValue);
         role.Add();
     }
     else
     {
         role = new EWF_RoleBLL((Guid)ViewState["Role"]);
         role.Model.Name = tbx_Name.Text;
         role.Model.Description = tbx_Description.Text;
         role.Update();
     }
     Response.Redirect("RoleList.aspx");
 }
    private void BindData()
    {
        EWF_RoleBLL role = new EWF_RoleBLL((Guid)ViewState["Role"]);
        #region 绑定基本信息
        lb_ID.Text = ViewState["Role"].ToString();
        tbx_Name.Text = role.Model.Name;
        tbx_Description.Text = role.Model.Description;
        ddl_Type.SelectedValue = role.Model.Type.ToString();

        switch (role.Model.Type)
        {
            case 1:
                Response.Redirect("RoleStaticList.aspx?Role=" + ViewState["Role"].ToString());
                break;
            case 2:
            case 8:
                Response.Redirect("RolePositionList.aspx?Role=" + ViewState["Role"].ToString());
                break;
            case 3:
                Response.Redirect("RoleDORelationalList.aspx?Role=" + ViewState["Role"].ToString());
                break;
            case 4:
                Response.Redirect("RoleDirector.aspx?Role=" + ViewState["Role"].ToString());
                break;
            case 6:
                Response.Redirect("RoleOrganizeCityManager.aspx?Role=" + ViewState["Role"].ToString());
                break;
        }

        #endregion
    }
    protected void bt_Save_Click(object sender, EventArgs e)
    {
        if ((Guid)ViewState["Role"] != Guid.Empty)
        {
            EWF_RoleBLL role = new EWF_RoleBLL((Guid)ViewState["Role"]);
            role.Model.Name = tbx_Name.Text;
            role.Model.Description = tbx_Description.Text;
            role.Update();

            DataTable dt = (DataTable)ViewState["DTDetail"];
            foreach (DataRow dr in dt.Rows)
            {
                switch (dr.RowState)
                {
                    case DataRowState.Added:
                        role.Add_DORelational((string)dr["ScrValue"], (int)dr["RecipientStaff"]);
                        break;
                    case DataRowState.Deleted:
                        role.Delete_DORelational((string)dr["ScrValue", DataRowVersion.Original], (int)dr["RecipientStaff", DataRowVersion.Original]);
                        break;
                }
            }
        }
        Response.Redirect("RoleList.aspx");
    }
    private void BindDropDown()
    {
        EWF_Flow_AppBLL app = new EWF_Flow_AppBLL((Guid)ViewState["AppID"]);

        lb_AppName.Text = app.Model.Name;

        // 默认下一环节
        ddl_DefaultNextProcess.DataSource = app.GetProcessList();
        ddl_DefaultNextProcess.DataBind();
        ddl_DefaultNextProcess.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));

        //环节类型
        ddl_Type.DataSource = DictionaryBLL.GetDicCollections("EWF_Flow_ProcessType");
        ddl_Type.DataBind();
        this.ddl_Type.SelectedValue = "3";

        ddl_RecipientRole_Decision.DataSource = EWF_RoleBLL.GetModelList("");
        ddl_RecipientRole_Decision.DataBind();
        ddl_RecipientRole_Decision.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));

        ddl_DataObject_Decision.DataSource = app.GetDataObjectList();
        ddl_DataObject_Decision.DataBind();
        ddl_DataObject_Decision.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));

        ddl_PositiveNextProcess.DataSource = app.GetProcessList();
        ddl_PositiveNextProcess.DataBind();
        ddl_PositiveNextProcess.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));

        ddl_NegativeNextProcess.DataSource = app.GetProcessList();
        ddl_NegativeNextProcess.DataBind();
        ddl_NegativeNextProcess.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));
    }
 private void BindGrid()
 {
     string condition = "";
     if (!string.IsNullOrEmpty(tbx_Condition.Text))
     {
         condition = " EWF_Role_Role.Name Like '%" + tbx_Condition.Text + "%'";
     }
     gv_List.BindGrid<EWF_Role>(EWF_RoleBLL.GetModelList(condition));
 }
 protected void ddl_RecipientRole_Decision_SelectedIndexChanged(object sender, EventArgs e)
 {
     this.ddl_DataObject_Decision.SelectedValue = Guid.Empty.ToString();
     if (ddl_RecipientRole_Decision.SelectedValue != Guid.Empty.ToString())
     {
         int roletype = new EWF_RoleBLL(new Guid(ddl_RecipientRole_Decision.SelectedValue)).Model.Type;
         if (roletype == 3 || roletype == 6)
         {
             this.ddl_DataObject_Decision.Enabled = true;
         }
         else
         {
             this.ddl_DataObject_Decision.Enabled = false;
         }
     }
     else
         this.ddl_DataObject_Decision.Enabled = false;
 }
    private void BindData()
    {
        EWF_RoleBLL role = new EWF_RoleBLL((Guid)ViewState["Role"]);
        #region 绑定基本信息
        lb_ID.Text = ViewState["Role"].ToString();
        tbx_Name.Text = role.Model.Name;
        tbx_Description.Text = role.Model.Description;
        ddl_Type.SelectedValue = role.Model.Type.ToString();
        #endregion

        #region 绑定角色关联明细信息
        DataTable dt = role.GetDetailList();
        if (dt.Rows.Count > 0)
        {
            ddl_Level.SelectedValue = dt.Rows[0]["OrganizeCityLevel"].ToString();
        }
        #endregion
    }
    private void BindData()
    {
        EWF_RoleBLL role = new EWF_RoleBLL((Guid)ViewState["Role"]);

        #region 绑定基本信息
        lb_ID.Text             = ViewState["Role"].ToString();
        tbx_Name.Text          = role.Model.Name;
        tbx_Description.Text   = role.Model.Description;
        ddl_Type.SelectedValue = role.Model.Type.ToString();
        #endregion

        #region 绑定角色关联明细信息
        DataTable dt = role.GetDetailList();
        if (dt.Rows.Count > 0)
        {
            ddl_Level.SelectedValue = dt.Rows[0]["OrganizeCityLevel"].ToString();
        }
        #endregion
    }
 protected void ddl_RecipientRole_Decision_SelectedIndexChanged(object sender, EventArgs e)
 {
     this.ddl_DataObject_Decision.SelectedValue = Guid.Empty.ToString();
     if (ddl_RecipientRole_Decision.SelectedValue != Guid.Empty.ToString())
     {
         int roletype = new EWF_RoleBLL(new Guid(ddl_RecipientRole_Decision.SelectedValue)).Model.Type;
         if (roletype == 3 || roletype == 6 || roletype == 9)
         {
             this.ddl_DataObject_Decision.Enabled = true;
         }
         else
         {
             this.ddl_DataObject_Decision.Enabled = false;
         }
     }
     else
     {
         this.ddl_DataObject_Decision.Enabled = false;
     }
 }
Example #13
0
    private void BindData()
    {
        EWF_RoleBLL role = new EWF_RoleBLL((Guid)ViewState["Role"]);

        #region 绑定基本信息
        lb_ID.Text             = ViewState["Role"].ToString();
        tbx_Name.Text          = role.Model.Name;
        tbx_Description.Text   = role.Model.Description;
        ddl_Type.SelectedValue = role.Model.Type.ToString();
        #endregion

        #region 绑定角色关联明细信息
        DataTable    dt = role.GetDetailList();
        DataColumn[] pk = { dt.Columns["ScrValue"], dt.Columns["RecipientStaff"] };
        dt.PrimaryKey = pk;
        dt.AcceptChanges();
        ViewState["DTDetail"] = dt;
        BindGrid();
        #endregion
    }
    protected void bt_Save_Click(object sender, EventArgs e)
    {
        if ((Guid)ViewState["Role"] != Guid.Empty && ddl_Level.SelectedValue != "0")
        {
            EWF_RoleBLL role = new EWF_RoleBLL((Guid)ViewState["Role"]);
            role.Model.Name        = tbx_Name.Text;
            role.Model.Description = tbx_Description.Text;
            role.Update();

            DataTable dt = role.GetDetailList();

            if (dt.Rows.Count > 0 && ddl_Level.SelectedValue != dt.Rows[0]["OrganizeCityLevel"].ToString())
            {
                role.Delete_OrganizeCityManager((int)dt.Rows[0]["OrganizeCityLevel"]);
            }

            role.Add_OrganizeCityManager(int.Parse(ddl_Level.SelectedValue));

            Response.Redirect("RoleList.aspx");
        }
    }
    protected void bt_Save_Click(object sender, EventArgs e)
    {
        if ((Guid)ViewState["Role"] != Guid.Empty && ddl_Level.SelectedValue != "0")
        {
            EWF_RoleBLL role = new EWF_RoleBLL((Guid)ViewState["Role"]);
            role.Model.Name = tbx_Name.Text;
            role.Model.Description = tbx_Description.Text;
            role.Update();

            DataTable dt = role.GetDetailList();

            if (dt.Rows.Count > 0 && ddl_Level.SelectedValue != dt.Rows[0]["OrganizeCityLevel"].ToString())
            {
                role.Delete_OrganizeCityManager((int)dt.Rows[0]["OrganizeCityLevel"]);
            }

            role.Add_OrganizeCityManager(int.Parse(ddl_Level.SelectedValue));

            Response.Redirect("RoleList.aspx");
        }
    }
    private void BindData()
    {
        EWF_RoleBLL role = new EWF_RoleBLL((Guid)ViewState["Role"]);

        #region 绑定基本信息
        lb_ID.Text             = ViewState["Role"].ToString();
        tbx_Name.Text          = role.Model.Name;
        tbx_Description.Text   = role.Model.Description;
        ddl_Type.SelectedValue = role.Model.Type.ToString();

        switch (role.Model.Type)
        {
        case 1:
            Response.Redirect("RoleStaticList.aspx?Role=" + ViewState["Role"].ToString());
            break;

        case 2:
        case 8:
            Response.Redirect("RolePositionList.aspx?Role=" + ViewState["Role"].ToString());
            break;

        case 3:
            Response.Redirect("RoleDORelationalList.aspx?Role=" + ViewState["Role"].ToString());
            break;

        case 4:
            Response.Redirect("RoleDirector.aspx?Role=" + ViewState["Role"].ToString());
            break;

        case 6:
            Response.Redirect("RoleOrganizeCityManager.aspx?Role=" + ViewState["Role"].ToString());
            break;
        }

        #endregion
    }
    private void BindData()
    {
        EWF_RoleBLL role = new EWF_RoleBLL((Guid)ViewState["Role"]);
        #region 绑定基本信息
        lb_ID.Text = ViewState["Role"].ToString();
        tbx_Name.Text = role.Model.Name;
        tbx_Description.Text = role.Model.Description;
        ddl_Type.SelectedValue = role.Model.Type.ToString();
        #endregion

        #region 绑定角色关联明细信息
        DataTable dt = role.GetDetailList();
        DataColumn[] pk = { dt.Columns["ScrValue"], dt.Columns["RecipientStaff"] };
        dt.PrimaryKey = pk;
        dt.AcceptChanges();
        ViewState["DTDetail"] = dt;
        BindGrid();
        #endregion
    }