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(); }
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(); }
static Consume() { db = new MPMSEntities(); }