Beispiel #1
0
 public DataSet Login()
 {
     try
     {
         DataSet dtResult;
         user = new DAL.User();
         PopulateDataLayer();
         dtResult = user.Login();
         return(dtResult);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #2
0
        public string Login(string username, string password)
        {
            string message = SystemVar.Exception;

            try
            {
                T_User user = dalUser.Login(new T_User {
                    F_UserName = username
                }, out message);
                if (user == null)
                {
                    if (message.Equals(SystemVar.Success))
                    {
                        return(SystemVar.NoData);
                    }
                    else
                    {
                        return(SystemVar.Exception);
                    }
                }
                else
                {
                    user = dalUser.Select(user);
                    if (user.F_PassWord.Equals(password))
                    {
                        return(SystemVar.Success);
                    }
                    else
                    {
                        return(SystemVar.Failure);
                    }
                }
            }
            catch (Exception exc)
            {
                LogHelper.log.Fatal("DAL层" + this.GetType().ToString() + "Login方法异常,异常信息为:" + exc.Message);//异常,致命错误
                return(SystemVar.Failure);
            }
        }
Beispiel #3
0
        public DataTable Login(string userName, string password, string identity)
        {
            string pwd = Common.Utility.Encrypt(password);

            return(user.Login(identity, userName, pwd));
        }