예제 #1
0
 public bool Post(int userId, string currentPassword, string newPassword)
 {
     using (var entities = new CONDUIT_Entities())
     {
         try
         {
             entities.changePasswordSP(userId, currentPassword, newPassword);
             return(true);
         }
         catch (Exception)
         {
             return(false);
         }
     }
 }
예제 #2
0
        public int Get(string username, string password)
        {
            using (var entities = new CONDUIT_Entities())
            {
                var result = entities.checkLoginSP(username, password).FirstOrDefault();

                if (result.HasValue)
                {
                    return(result.Value);
                }
                else
                {
                    return(-1);
                }
            }
        }