/// <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) { MessageBox.Show("UC:8" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <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) { MessageBox.Show("CHGPWD:3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }