public MemberOutput MemberbyUsername(string username) { if (username == null || username.Trim() == "") { return(null); } C02_BIMstaff item = db.C02_BIMstaff.FirstOrDefault(s => s.Username == username); if (item == null) { return(null); } MemberOutput member = new MemberOutput() { ID = item.BIMstaffID, SoftName = item.Sortname, UserName = item.Username, Password = item.Password, Department = item.Deparment, UserType = item.UserType, UserStatus = item.UserStatus }; return(member); }
public MemberOutput MemberbyID(int id) { if (id == null || id < 0) { return(null); } C02_BIMstaff item = db.C02_BIMstaff.Find(id); if (item == null) { return(null); } MemberOutput member = new MemberOutput() { ID = item.BIMstaffID, SoftName = item.Sortname, UserName = item.Username, Password = item.Password, Department = item.Deparment, UserType = item.UserType, UserStatus = item.UserStatus }; return(member); }