예제 #1
0
 public UserModel GetUserIdentity(string name, string pwd)
 {
     MPMSEntities db = new MPMSEntities();
     return db.Users.Where(m => m.U_LoginName == name && m.U_Password == pwd && m.U_Role != 1 && m.U_Role != 3 && m.U_Role != 4).Select(m => new UserModel
     {
         U_ID = m.U_ID,
         S_ID = m.S_ID,
         U_LoginName = m.U_LoginName,
         U_RealName = m.U_RealName,
         U_Sex = m.U_Sex,
         U_Telephone = m.U_Telephone
     }).FirstOrDefault();
 }
예제 #2
0
 public MemberModel GetMemberInfo(string idorm)
 {
     MPMSEntities db = new MPMSEntities();
     return db.MemCards.Where(m => m.MC_CardID == idorm || m.MC_Mobile == idorm).Select(m => new MemberModel
     {
         MC_Name = m.MC_Name,
         CL_LevelName = m.CardLevels.CL_LevelName,
         MC_Point = m.MC_Point,
         MC_TotalMoney = m.MC_TotalMoney,
         MC_Sex = m.MC_Sex,
         MC_Mobile = m.MC_Mobile,
         CL_Point = m.CardLevels.CL_Point,
         CL_Percent = m.CardLevels.CL_Percent
     }).FirstOrDefault();
 }
예제 #3
0
 static Consume()
 {
     db = new MPMSEntities();
 }