Esempio 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)
     {
         MessageBox.Show("UC:8" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Esempio n. 2
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;
     }
 }
 /// <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);
     }
 }
Esempio n. 4
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;
     }
 }
Esempio n. 5
0
 /// <summary>
 /// Function to fill controls for Update
 /// </summary>
 public void CompanyViewForEdit()
 {
     try
     {
         isEditMode = true;
         this.Text = "Edit Company";
         btnSave.Text = "Update";
         btnDelete.Enabled = true;
         gbxDetails.Visible = false;
         txtAdminUserName.ReadOnly = true;
         txtAdminUserName.BackColor = Color.White;
         cmbCurrency.Enabled = false;
         CompanySP spCompany = new CompanySP();
         CompanyInfo infoCompany = new CompanyInfo();
         decimal decCompanyId = 1;
         infoCompany = spCompany.CompanyView(decCompanyId);
         txtCompanyName.Text = infoCompany.CompanyName;
         txtMailingName.Text = infoCompany.MailingName;
         txtAddress.Text = infoCompany.Address;
         txtPhoneNo.Text = infoCompany.Phone;
         txtMobile.Text = infoCompany.Mobile;
         txtEmail.Text = infoCompany.EmailId;
         txtWeb.Text = infoCompany.Web;
         txtCountry.Text = infoCompany.Country;
         txtState.Text = infoCompany.State;
         txtPincode.Text = infoCompany.Pin;
         cmbCurrency.SelectedValue = infoCompany.CurrencyId;
         txtFinancialYearFrom.Text = infoCompany.FinancialYearFrom.ToString("dd-MMM-yyyy");
         dtpFinancialYearFrom.Text = infoCompany.FinancialYearFrom.ToString();
         txtBooksBegining.Text = infoCompany.BooksBeginingFrom.ToString("dd-MMM-yyyy");
         dtpBooksBegining.Text = infoCompany.BooksBeginingFrom.ToString();
         txtTinNo.Text = infoCompany.Tin;
         txtCstNo.Text = infoCompany.Cst;
         txtPanNo.Text = infoCompany.Pan;
         logo = (byte[])infoCompany.Logo;
         MemoryStream ms = new MemoryStream(logo);
         Image newimage = Image.FromStream(ms);
         pbxLogo.Image = newimage;
         pbxLogo.SizeMode = PictureBoxSizeMode.StretchImage;
         CompanyPathInfo infoCompanyPath = new CompanyPathInfo();
         CompanyPathSP spComapnyPath = new CompanyPathSP();
         infoCompanyPath = spComapnyPath.CompanyPathView(1);
         if (infoCompanyPath.IsDefault == true)
         {
             cbxSetAsDefault.Checked = true;
         }
         else
         {
             cbxSetAsDefault.Checked = false;
         }
         UserSP spUser = new UserSP();
         UserInfo infoUser = new UserInfo();
         decimal decuserId = PublicVariables._decCurrentUserId;
         infoUser = spUser.UserView(decuserId);
         txtAdminUserName.Text = infoUser.UserName;
         txtPassword.Text = infoUser.Password;
         txtRetypePassword.Text = infoUser.Password;
     }
     catch (Exception ex)
     {
         MessageBox.Show("CR8:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Esempio n. 6
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)
     {
         MessageBox.Show("CHGPWD:3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Esempio n. 7
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)
     {
         MessageBox.Show("UC:8" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }