private void UserButton_Click(object sender, EventArgs e) { CCurrentUser.User_name = ((UserButton)sender).TouchButton.Text; AuthenticationForm objAuthentication = AuthenticationForm.CreateInstance(((UserButton)sender).rmsUserName.Text); DialogResult drResult = objAuthentication.ShowDialog(); if (drResult == DialogResult.OK) { RMSAdminMdiForm objParent = new RMSAdminMdiForm(); //Previous objParent.Show(); } }
private void ProcessLogin() { try { CCommonConstants objCommonConstant = ConfigManager.GetConfig <CCommonConstants>(); CDalConfig objDalConstant = ConfigManager.GetConfig <CDalConfig>(); CUserManager tempUserManager = new CUserManager(); CLogin objLogin = new CLogin(); CUserInfo objUserInfo = new CUserInfo(); //objUserInfo.UserName = UserLabel.Text.Trim(); //objUserInfo.Password = LoginTextBox.Text.Trim(); objLogin = (RmsRemote.CLogin)Activator.GetObject(typeof(RmsRemote.CLogin), objCommonConstant.RemoteURL); CResult objResult = objLogin.ProcessAdminLogin(objUserInfo); if (objResult.IsSuccess && objResult.Data != null) { CUserLogin objUserLogin = (CUserLogin)objResult.Data; objCommonConstant.UserInfo = objUserLogin.UserInfo; objDalConstant.ConnectionString = objUserLogin.ConnectionStr; RMSGlobal.LogInUserName = objCommonConstant.UserInfo.UserName; objCommonConstant.DBConnection = objUserLogin.ConnectionStr; RMSAdminMdiForm objParent = new RMSAdminMdiForm(); //Previous objParent.Show(); this.Hide(); } else { //g_ErrorLabel.Show(); } } catch (Exception exp) { MessageBox.Show(exp.Message, RMSGlobal.MessageBoxTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void UserButton_Click(object sender, EventArgs e) { CCurrentUser.User_name = ((UserButton)sender).TouchButton.Text; AuthenticationForm objAuthentication = AuthenticationForm.CreateInstance(((UserButton)sender).rmsUserName.Text); DialogResult drResult = objAuthentication.ShowDialog(); if (drResult == DialogResult.OK) { RMSAdminMdiForm objParent = new RMSAdminMdiForm(); //Previous objParent.Show(); this.Visible = false; } }
private void ProcessLogin() { try { CCommonConstants objCommonConstant = ConfigManager.GetConfig<CCommonConstants>(); CDalConfig objDalConstant = ConfigManager.GetConfig<CDalConfig>(); CUserManager tempUserManager = new CUserManager(); CLogin objLogin = new CLogin(); CUserInfo objUserInfo = new CUserInfo(); //objUserInfo.UserName = UserLabel.Text.Trim(); //objUserInfo.Password = LoginTextBox.Text.Trim(); objLogin = (RmsRemote.CLogin)Activator.GetObject(typeof(RmsRemote.CLogin), objCommonConstant.RemoteURL); CResult objResult = objLogin.ProcessAdminLogin(objUserInfo); if (objResult.IsSuccess && objResult.Data != null) { CUserLogin objUserLogin = (CUserLogin)objResult.Data; objCommonConstant.UserInfo = objUserLogin.UserInfo; objDalConstant.ConnectionString = objUserLogin.ConnectionStr; RMSGlobal.LogInUserName = objCommonConstant.UserInfo.UserName; objCommonConstant.DBConnection = objUserLogin.ConnectionStr; RMSAdminMdiForm objParent = new RMSAdminMdiForm(); //Previous objParent.Show(); this.Hide(); } else { //g_ErrorLabel.Show(); } } catch (Exception exp) { MessageBox.Show(exp.Message, RMSGlobal.MessageBoxTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } }