public object GetSchool(ActiveParam s) { try { List <TblSchool> StudentData = null; if (s.Status == "Deactive") { StudentData = db.TblSchools.Where(r => r.Status == 0).ToList(); } else { StudentData = db.TblSchools.Where(r => r.Status == 1).ToList(); } if (StudentData == null) { return(new Error { IsError = true, Message = "School List Not Found." }); } else { return(new Result { IsSucess = true, ResultData = StudentData }); } } catch (Exception ex) { return(new Error() { IsError = true, Message = ex.Message }); } }
public object SchoolInformation(ActiveParam obj) { try { SchoolBusiness getinfo = new SchoolBusiness(); var result = getinfo.GetSchool(obj); return(result); } catch (Exception e) { return(new Error() { IsError = true, Message = e.Message }); } }