protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            CFun.BindListControl <AvailablesStatus>(RblStatus, false);
            CFun.BindListControl <EnumUPostClass>(RblUPost, false);
            CFun.BindListControl <EnumSexClass>(RblUPostSex, false);

            RblUPostSex.SelectedIndex = 0;
            RblUPost.SelectedIndex    = 1;
            RblStatus.SelectedIndex   = 1;

            int id = CFun.RequestPamInt("id");
            if (id > 0)
            {
                AdmUser cont = new BllAdmUser().GetItem(id);
                if (cont != null)
                {
                    CFun.BindPageData <AdmUser>(this, cont);

                    BtnSave.Text = "修改";
                    initRoleList(cont.GroupIdList);
                }
                else
                {
                    initRoleList("");
                }
            }
            else
            {
                initRoleList("");
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         AdmUser cont = new BllAdmUser().GetItem(base.CurrentUId);
         if (cont != null)
         {
             CFun.BindPageData <AdmUser>(this, cont);
             LabStatus.Text     = Enum.GetName(typeof(AvailablesStatus), cont.Status.Value);
             LabGroupId.Text    = new BllAdmUserGroup().GetGroupName(cont.GroupIdList);
             LabDepartment.Text = Enum.GetName(typeof(EnumUPostClass), cont.UPost);
         }
     }
 }
Beispiel #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         CFun.BindListControl <AvailablesStatus>(RblState, false);
         int id = CFun.RequestPamInt("id");
         if (id > 0)
         {
             CompanyNewsClass cont = new BllCompanyNewsClass().GetItem(id);
             if (cont != null)
             {
                 CFun.BindPageData <CompanyNewsClass>(this, cont);
                 BtnSave.Text = "修改";
             }
         }
     }
 }
Beispiel #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         ArrayList al = new ArrayList();
         int       id = CFun.RequestPamInt("id");
         if (id > 0)
         {
             AdmUserGroup usergroup = new BllAdmUserGroup().GetItem(id);
             if (usergroup != null)
             {
                 int GroupId = (int)usergroup.GroupId;
                 CFun.BindPageData <AdmUserGroup>(this, usergroup);
                 DataTable dt = new BllAdmGroupRoleList().GetItemByGroupId(GroupId);
                 if (dt.Rows.Count > 0)
                 {
                     BtnSave.Text = "修改";
                     for (int i = 0; i < dt.Rows.Count; i++)
                     {
                         string K = dt.Rows[i]["KeyCode"].ToString();
                         al.Add(K);
                     }
                     string roleList = string.Join(",", (string[])al.ToArray(typeof(string)));
                     initRoleList(roleList);
                 }
                 else
                 {
                     initRoleList("");
                 }
             }
             else
             {
                 initRoleList("");
             }
         }
         else
         {
             initRoleList("");
         }
     }
 }
Beispiel #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            CFun.BindListControl <AvailablesStatus>(RblStatus, false);

            int id  = CFun.RequestPamInt("id");
            int pId = CFun.RequestPamInt("parentid");
            if (id > 0)
            {
                AdmUserModule cont = new BllAdmUserModule().GetItem(id);
                if (cont != null)
                {
                    CFun.BindPageData <AdmUserModule>(this, cont);
                    BtnSave.Text = "修改";
                }
            }
            else
            {
                TxtParentId.Text = pId.ToString();
            }
        }
    }
Beispiel #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            CFun.BindListControl <AvailablesStatus>(RblState, false);

            DdlNewsClass.DataSource     = new BllCompanyNewsClass().GetAll("Ld,Title", "state=1", "rank,ld", 0);
            DdlNewsClass.DataTextField  = "Title";
            DdlNewsClass.DataValueField = "Ld";
            DdlNewsClass.DataBind();

            int id = CFun.RequestPamInt("id");
            if (id > 0)
            {
                CompanyNews cont = new BllCompanyNews().GetItem(id);
                if (cont != null)
                {
                    CFun.BindPageData <CompanyNews>(this, cont);
                    BtnSave.Text = "修改";
                }
            }
        }
    }