コード例 #1
0
ファイル: LoginForm.cs プロジェクト: Jusharra/RMS
        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();
            }
        }
コード例 #2
0
ファイル: LoginForm.cs プロジェクト: Jusharra/RMS
        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);
            }
        }
コード例 #3
0
ファイル: LoginForm.cs プロジェクト: Jusharra/RMS
        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;
            }
        }
コード例 #4
0
ファイル: LoginForm.cs プロジェクト: Jusharra/RMS
        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);
            }
        }