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("");
            }
        }
    }
Esempio n. 2
0
    private string GetValue()
    {
        int roleId = CFun.RequestPamInt("roleid");
        //string name = CFun.RequestPamStr("Name");
        string Sqlwhere = "";

        if (roleId > -1)
        {
            //Sqlwhere = " charindex('"+roleId+"',GroupIdList)>0";
            Sqlwhere = " GroupIdlist like '%," + roleId + ",%'";
        }
        int pageSize = CFun.RequestPamInt("rows");

        if (pageSize <= 0)
        {
            pageSize = CFun.pagesize();
        }

        int pageCurrent = CFun.RequestPamInt("page");

        if (pageCurrent <= 0)
        {
            pageCurrent = 1;
        }
        return(new BllAdmUser().GetAllByPage("*", pageSize, pageCurrent, Sqlwhere, "Ld desc"));
    }
    private string GetValueLogin()
    {
        int    id = CFun.RequestPamInt("id");
        string sTime, eTime;

        sTime = CFun.RequestPamStr("stime");
        eTime = CFun.RequestPamStr("etime");

        string sqlWhere = " uid=" + id.ToString();

        if (CFun.StrIsDate(sTime))
        {
            sqlWhere += " and CreateDate>'" + sTime + "'";
        }
        if (CFun.StrIsDate(eTime))
        {
            sqlWhere += " and CreateDate<'" + eTime + " 23:59:59'";
        }

        int pageSize = CFun.RequestPamInt("rows");

        if (pageSize <= 0)
        {
            pageSize = CFun.pagesize();
        }

        int pageCurrent = CFun.RequestPamInt("page");

        if (pageCurrent <= 0)
        {
            pageCurrent = 1;
        }

        return(new BllAdmLoginHistory().GetAllByPage("*", pageSize, pageCurrent, sqlWhere, "Ld desc"));
    }
Esempio n. 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Id = CFun.RequestPamInt("id").ToString();
         CFun.BindListControl <EnumCCActiveClass>(DdlAct, true);
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        CFun.BindListControl <EnumAdmActClass>(DdlActClass, true);
        int act = CFun.RequestPamInt("act");

        if (act > 0)
        {
            DdlActClass.SelectedValue = act.ToString();
        }
    }
Esempio n. 6
0
    private string DelItem()
    {
        int id = CFun.RequestPamInt("ids");

        if (new BllCompanyNews().DeleteItem(id))
        {
            return("");
        }
        else
        {
            return("1");
        }
    }
Esempio n. 7
0
    private string DelItem()
    {
        int id = CFun.RequestPamInt("ids");

        if (new BllAdmUserModule().DeleteItem(id))
        {
            return("");
        }
        else
        {
            return("1");
        }
    }
Esempio n. 8
0
    private string ModifyCheckCode()
    {
        int     id   = CFun.RequestPamInt("ids");
        AdmUser cont = new AdmUser();

        cont.Ld        = id;
        cont.CheckCode = new Random().Next(1000, 9999);
        if (new BllAdmUser().InsertorUpdateitem(cont))
        {
            return("");
        }
        else
        {
            return("1");
        }
    }
Esempio n. 9
0
    private string GetClass()
    {
        int pageSize = CFun.RequestPamInt("rows");

        if (pageSize <= 0)
        {
            pageSize = CFun.pagesize();
        }

        int pageCurrent = CFun.RequestPamInt("page");

        if (pageCurrent <= 0)
        {
            pageCurrent = 1;
        }
        return(new BllCompanyNewsClass().GetAllByPage("*", pageSize, pageCurrent, "", "Ld desc"));
    }
Esempio n. 10
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 = "修改";
             }
         }
     }
 }
Esempio n. 11
0
    private string GetValue()
    {
        int pageSize = CFun.RequestPamInt("rows");

        if (pageSize <= 0)
        {
            pageSize = CFun.pagesize();
        }

        int pageCurrent = CFun.RequestPamInt("page");

        if (pageCurrent <= 0)
        {
            pageCurrent = 1;
        }
        return(new BllAdmUserGroup().GetAllByPage("*", pageSize, pageCurrent, "", "Ld asc"));
    }
Esempio n. 12
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("");
         }
     }
 }
Esempio n. 13
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 = "修改";
                }
            }
        }
    }
Esempio n. 14
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();
            }
        }
    }
Esempio n. 15
0
    private string GetValue()
    {
        int    parentId = CFun.RequestPamInt("parentid");
        string sqlWhere = " parentid={0} ";

        sqlWhere = String.Format(sqlWhere, parentId);

        int pageSize = CFun.RequestPamInt("rows");

        if (pageSize <= 0)
        {
            pageSize = CFun.pagesize();
        }

        int pageCurrent = CFun.RequestPamInt("page");

        if (pageCurrent <= 0)
        {
            pageCurrent = 1;
        }

        return(new BllAdmUserModule().GetAllByPage("*", pageSize, pageCurrent, sqlWhere, "rank,Ld desc"));
    }
Esempio n. 16
0
    private string GetValue()
    {
        int    classId  = CFun.RequestPamInt("classid");
        string Sqlwhere = "";

        if (classId > 0)
        {
            Sqlwhere = " newsclass=" + classId + "";
        }
        int pageSize = CFun.RequestPamInt("rows");

        if (pageSize <= 0)
        {
            pageSize = CFun.pagesize();
        }

        int pageCurrent = CFun.RequestPamInt("page");

        if (pageCurrent <= 0)
        {
            pageCurrent = 1;
        }
        return(new BllCompanyNews().GetAllByPage("*", pageSize, pageCurrent, Sqlwhere, "Ld desc"));
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     Id = CFun.RequestPamInt("id").ToString();
 }