예제 #1
0
        public static user_master GetUserDetails(string username, string password)
        {
            KPOrderEntities context   = new KPOrderEntities();
            var             UserLists = context.user_master.FirstOrDefault(user => user.UserName == username && user.UserPassword == password);

            return(UserLists);
        }
예제 #2
0
        public static user_master GetUserDetails(string user_token)
        {
            KPOrderEntities context   = new KPOrderEntities();
            var             UserLists = context.user_master.FirstOrDefault(user => user.UserToken == user_token);

            return(UserLists);
        }
예제 #3
0
        public static bool Login(string user_token)
        {
            //UsersBL userBL = new UsersBL();

            //var UserLists = userBL.GetUsers();
            //return UserLists.Any(user =>
            //    user.UserName.Equals(username, StringComparison.OrdinalIgnoreCase)
            //    && user.Password == password);

            KPOrderEntities context = new KPOrderEntities();

            var UserLists = context.user_master.FirstOrDefault(user => user.UserToken == user_token);

            return(UserLists != null ? true : false);
        }