コード例 #1
0
        public bool IsVaidUser(string usrName, string Password)
        {
            bool result = false;

            try
            {
                string          encrPassword = AppCommon.EncryptText(Password);
                TBL_User_Master user         = _dbContext.TBL_User_Master.Where(x => x.LoginId == usrName).Where(xx => xx.LoginPassword == encrPassword).FirstOrDefault();
                result = (user == null) ? false : true;
            }
            catch (Exception ex)
            {
                string errMessage = ex.Message;
                if (ex.InnerException != null)
                {
                    errMessage += string.Format("\n{0}", ex.InnerException.Message);
                }
                MessageBox.Show(errMessage, "ServiceUser::IsVaidUser", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            return(result);
        }