Exemplo n.º 1
0
        }                                                           //系统管理_是否显示用户管理

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                radbtnlistUserType.DataSource     = userTypeManage.GetAllList();
                radbtnlistUserType.DataTextField  = "Description";
                radbtnlistUserType.DataValueField = "UserType";
                radbtnlistUserType.DataBind();
            }
        }
Exemplo n.º 2
0
        }                                                           //系统管理_用户管理_编辑页面
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                User currentUser;
                if ((Request.Params["userid"] != null) && (Request.Params["userid"].ToString() != ""))
                {
                    int userid = int.Parse(Request["userid"]);
                    currentUser = new User(userid);
                    if (currentUser == null)
                    {
                        Response.Write("<script language=javascript>window.alert('" + Resources.Site.TooltipUserExist + "\\');history.back();</script>");
                        return;
                    }

                    dropUserType.DataSource     = userTypeManage.GetAllList();
                    dropUserType.DataTextField  = "Description";
                    dropUserType.DataValueField = "UserType";
                    dropUserType.DataBind();

                    this.lblName.Text = currentUser.UserName;
                    txtTrueName.Text  = currentUser.TrueName;
                    //if (currentUser.Sex != null)
                    //{
                    //    if (currentUser.Sex.Trim().ToUpper() == "1")
                    //        RadioButton1.Checked = true;
                    //    else
                    //        RadioButton2.Checked = true;
                    //}
                    this.txtPhone.Text = currentUser.Phone;
                    txtEmail.Text      = currentUser.Email;
                    if (currentUser.EmployeeID > 0)
                    {
                        txtEmployeeID.Text = currentUser.EmployeeID.ToString();
                    }
                    dropUserType.SelectedValue = currentUser.UserType;
                    chkActive.Checked          = !currentUser.Activity;

                    //for(int i=0;i<this.Dropdepart.Items.Count;i++)
                    //{
                    //    if(this.Dropdepart.Items[i].Value==currentUser.DepartmentID)
                    //    {
                    //        this.Dropdepart.Items[i].Selected=true;
                    //    }
                    //}
                    //this.dropStyle.SelectedIndex = currentUser.Style - 1;
                    //AccountsPrincipal user = new AccountsPrincipal(userid);
                    //BindRoles(user);
                }
            }
        }
Exemplo n.º 3
0
        public void BindData()
        {
            if (!UserPrincipal.HasPermissionID(GetPermidByActID(Act_UpdateData)) && GetPermidByActID(Act_UpdateData) != -1)
            {
                gridView.Columns[2].Visible = false;
            }
            if (!UserPrincipal.HasPermissionID(GetPermidByActID(Act_DelData)) && GetPermidByActID(Act_DelData) != -1)
            {
                gridView.Columns[3].Visible = false;
            }
            DataSet ds = new DataSet();

            ds = userTypeManage.GetAllList();
            gridView.DataSetSource = ds;
        }
Exemplo n.º 4
0
        protected int Act_SetPerData = 27;     //系统管理_用户管理_设置角色

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (!UserPrincipal.HasPermissionID(GetPermidByActID(Act_AddData)) && GetPermidByActID(Act_AddData) != -1)
                {
                    liAdd.Visible = false;
                }



                DropUserType.DataSource     = userTypeManage.GetAllList();
                DropUserType.DataTextField  = "Description";
                DropUserType.DataValueField = "UserType";
                DropUserType.DataBind();
                DropUserType.Items.Insert(0, new ListItem(Resources.SysManage.ListItemAll, ""));
            }
        }