public LookupModel GetByName(LookUp lookUp, string name) { try { LookupModel model = new LookupModel(); switch (lookUp) { case LookUp.Department: Department departmentEntity = new Department(); return(model = departmentEntity.GetByName(name)); case LookUp.RoleCategory: RoleCategory roleCategoryEntity = new RoleCategory(); return(model = roleCategoryEntity.GetByName(name)); case LookUp.Status: Status statusEntity = new Status(); return(model = statusEntity.GetByName(name)); case LookUp.OPDRate: return(model = OPDRate.GetRatesByType(name)); case LookUp.RoomType: RoomType roomTypeEntity = new RoomType(); return(model = roomTypeEntity.GetByName(name)); case LookUp.Ward: WardDetail wardEntity = new WardDetail(); return(model = wardEntity.GetByName(name)); default: return(model); } } catch (Exception ex) { throw ex; } }
public LookupModel GetRatesByType(string type) { return(OPDRate.GetRatesByType(type)); }