Esempio n. 1
0
 // GET: api/UserInfo/5
 public UserInfo Get(int id)
 {
     using (osmsEntities db = new osmsEntities())
     {
         db.Configuration.LazyLoadingEnabled = false;
         return(db.UserInfo.SingleOrDefault(u => u.ID == id));
     }
     //return "value";
 }
Esempio n. 2
0
 public string Login(string username, string pwd)
 {
     using (osmsEntities db = new osmsEntities())
     {
         var sysu = db.UserInfo.SingleOrDefault(d => d.Account == username);
         if (sysu != null && sysu.Password == pwd)
         {
             return("0000");
         }
         return("1101");
     }
 }