private void GetList() { IEntityRepository Repo = factory.Create("major"); IMajorRepository MajorRepo = Repo as IMajorRepository; string majorName = Helper.GetParameterFromRequest("majorName"); int universityId = int.Parse(Helper.GetParameterFromRequest("universityId")); Entities entities = MajorRepo.GetList(majorName, universityId); if (string.IsNullOrEmpty(Repo.ErrorMessage)) { Helper.Response(entities.Serialize()); } else { Helper.ResponseError(Repo.ErrorMessage); } }
private void GetListInRecurit() { int companyId = int.Parse(Helper.GetParameterFromRequest("companyId")); int year = int.Parse(Helper.GetParameterFromRequest("year")); int universityId = int.Parse(Helper.GetParameterFromRequest("universityId")); IEntityRepository Repo = factory.Create("major"); IMajorRepository MajorRepo = Repo as IMajorRepository; Entities entities = MajorRepo.GetList(companyId, year, universityId); if (string.IsNullOrEmpty(Repo.ErrorMessage)) { Helper.Response(entities.Serialize()); } else { Helper.ResponseError(Repo.ErrorMessage); } }