Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["hUserName"] == null)
                {
                    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "ggg", "<script language='javascript'>alert('" + "加载失败" + "');</script>");
                }
                else
                {
                    string username = Session["hUserName"].ToString();
                    GA     gAdmin   = new GA();
                    gAdmin.UserName = username;
                    GAController gAdminCon = new GAController();
                    gAdminCon.GAGetinfo(gAdmin);
                    this.txtStaffID.Text    = gAdmin.StaffID.ToString();
                    this.txtStauffName.Text = gAdmin.UserName;
                    this.txtPassword.Text   = gAdmin.PassWord;
                    switch (gAdmin.StaffType.ToString())
                    {
                    case "9":
                        this.txtAdministratorClass.Text = "未激活";
                        break;

                    case "1":
                        this.txtAdministratorClass.Text = "高级管理员";
                        break;

                    case "2":
                        this.txtAdministratorClass.Text = "订单管理员";
                        break;

                    case "3":
                        this.txtAdministratorClass.Text = "评价管理员";
                        break;

                    case "4":
                        this.txtAdministratorClass.Text = "用户管理员";
                        break;

                    case "5":
                        this.txtAdministratorClass.Text = "商品管理员";
                        break;
                    }

                    this.txtName.Text     = gAdmin.TrueName;
                    this.txtIDcardNO.Text = gAdmin.IdCardNum;
                    this.txtRegister.Text = gAdmin.AddTime;
                }
            }
        }