Exemple #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     LoginCheck.AdminManage();
     mU.Id        = StringDeal.ToInt(Request.QueryString["Id"]);
     mU.GroupId   = StringDeal.ToInt(Request.QueryString["GroupId"]);
     mm.Id        = StringDeal.ToInt(Request.QueryString["Id"]);
     mm.TableName = bU.GetTableName(mU);
     if (!IsPostBack)
     {
         xml             = new XmlDoc();
         xml.xmlfilePath = GetConfig.System("TableXmlPath") + mm.TableName + ".xml";
         dsReader        = bm.ModelReader(mm);
         UserReader();
         BindModel();
         this.GroupTitle.Text = bU.GetUserGroupTitle(mU);
     }
     else
     {
         UserSave();
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginCheck.AdminManage();
        Pages = StringDeal.ToInt(Request.QueryString["Page"]);
        string Action = Request.QueryString["Action"];

        mU.Temp            = Request.Params["Id"];
        mU.GroupId         = StringDeal.ToInt(Request.QueryString["GroupId"]);
        this.InsertId.HRef = "User_Edit.aspx?GroupId=" + mU.GroupId;
        if (!IsPostBack)
        {
            if (Action == "del")
            {
                bU.UserDel(mU);
                Response.Redirect("User_Manage.aspx?GroupId=" + mU.GroupId + "&Page=" + Pages);
            }
            else if (Action == "lock")
            {
                mU.Id = StringDeal.ToInt(Request.QueryString["Id"]);
                if (bU.GetUserLock(mU))
                {
                    mU.IsLock = false;
                }
                else
                {
                    mU.IsLock = true;
                }
                bU.UserLock(mU);
                Response.Redirect("User_Manage.aspx?GroupId=" + mU.GroupId + "&Page=" + Pages);
            }
            mU.UserName          = StringDeal.StrFormat(Request.QueryString["UserName"]);
            mU.Temp              = StringDeal.StrFormat(Request.QueryString["IsLock"]);
            this.GroupTitle.Text = bU.GetUserGroupTitle(mU);
            UserBind();
        }
    }