Exemplo n.º 1
0
 /// <summary>
 /// Function to fill the values in curresponding controls for updation
 /// </summary>
 public void FillControls()
 {
     try
     {
         UserInfo infoUser = new UserInfo();
         UserSP   spUser   = new UserSP();
         infoUser              = spUser.UserView(decUserId);
         txtUserName.Text      = infoUser.UserName;
         txtPassword.Text      = infoUser.Password;
         cmbRole.SelectedValue = infoUser.RoleId;
         txtNarration.Text     = infoUser.Narration;
         if (infoUser.Active)
         {
             cbxActive.Checked = true;
         }
         else
         {
             cbxActive.Checked = false;
         }
         txtRetype.Text = txtPassword.Text;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "UC:8" + ex.Message;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 ///  Form load make the form controls based on settings
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmChangePassword_Load(object sender, EventArgs e)
 {
     try
     {
         UserInfo infoUser = new UserInfo();
         UserSP   spUser   = new UserSP();
         infoUser             = spUser.UserView(PublicVariables._decCurrentUserId);
         txtUserName.Text     = infoUser.UserName;
         txtUserName.ReadOnly = true;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "CHGPWD:3" + ex.Message;
     }
 }