Exemplo n.º 1
0
        public frmUserAdd(CUserInfo _user, bool _bAdd, int ID, string sName, string sRole)
        {
            InitializeComponent();
            nUserInfo = _user;
            ArrayList ListRole = nUserInfo.GetAllRole();

            if (ListRole != null)
            {
                foreach (string rowArray in ListRole)
                {
                    comboBox1.Items.Add(rowArray);
                }
            }
            bAdd = _bAdd;
            if (_bAdd)
            {
                comboBox1.SelectedIndex = 0;
                textUserID.Text         = ID.ToString();
                this.Text = "添加用户";
            }
            else
            {
                textUserName.ReadOnly = true;
                textUserID.Text       = ID.ToString();
                textUserName.Text     = sName;
                comboBox1.Text        = sRole;
                this.Text             = "修改用户";
            }
        }
Exemplo n.º 2
0
 public frmUserManage(CUserInfo _User)
 {
     InitializeComponent();
     nUserInfo = _User;
     CPublicDGV.InitializeDGV(dGV1, sCol2, bCol2, true);
     dGV1.MultiSelect = false;
     FillGrid();
 }
Exemplo n.º 3
0
 public frmLogin(CUserInfo _User, bool _bLogin)
 {
     InitializeComponent();
     nUserInfo         = _User;
     this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     ListUser          = nUserInfo.GetAllUsers();
     if (ListUser != null)
     {
         foreach (KeyValuePair <int, string> kvp in ListUser)
         {
             comboBox1.Items.Add(kvp.Value);
         }
         if (nUserInfo.OldUserName != null)
         {
             comboBox1.Text = nUserInfo.OldUserName;
         }
     }
     bLogin = _bLogin;
     if (!_bLogin)
     {
         this.Text = "确认";
     }
     this.ActiveControl = textPassword;
 }
Exemplo n.º 4
0
 public frmUserPassword(CUserInfo _User)
 {
     InitializeComponent();
     nUserInfo         = _User;
     textUserName.Text = nUserInfo.UserName;
 }