Пример #1
0
        public void Login()
        {
            try
            {
                UserInfoModel objModel = objBL.CheckUserLogin(txtUserName.Text.Trim(), txtPassword.Text.Trim());

                if (objModel.UserId == 0)
                {
                    MessageBox.Show("User does not exists!\n Please try again.");
                    return;
                }

                if (!objModel.Password.Equals(txtPassword.Text.Trim()))
                {
                    MessageBox.Show("Password is not correct!\n Please try again.");
                    return;
                }

                SessionVariables._decCurrencyId = objModel.UserId;
                base.Close();

                // SessionVariables.DBName = "dbipca_" + objModel.UserId;

                //TODO: Read Settings, Menu'S ETC
            }
            catch (Exception ex)
            {
            }
        }