Ejemplo n.º 1
0
        private void Initialize()
        {
            try
            {
                classUser = new ClassUser(Global.ProjectConnectionString, Global.ProjectDataProvider);
                Validation = new Validation();
                Validation.Validate(this);

                InitializeGrid();
                 
                if (Operation == Global.Operation.UPDATE || Operation == Global.Operation.VIEW)
                { 
                    DataRow dr;

                    dr = classUser.GetUserDetails(UserId);
                    textBoxID.Text = UserId;
                    textBoxLastName.Text = dr["user_last_name"].ToString();
                    textBoxFirstName.Text = dr["user_first_name"].ToString();                     
                    textBoxUserName.Text = dr["user_name"].ToString();
                    textBoxUserName.Tag = dr["user_name"].ToString();
                    accountName = dr["user_name"].ToString().Substring(4, dr["user_name"].ToString().Length - 4).ToString();

                    if (Operation == Global.Operation.VIEW)
                    {
                        userControlButtonsSave.Visible = false;
                        Lock();
                    } 
                }
                
                LoadGroupAccess();
                textBoxLastName.Focus();
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 2
0
 private void Initialize()
 {
     try
     {
         classUser = new ClassUser(Global.ProjectConnectionString, Global.ProjectDataProvider); 
         Validation = new Validation();
         Validation.Validate(this);
     }
     catch (Exception)
     {
         throw;
     }
 }