Example #1
0
        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);
            }
        }
Example #2
0
        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);
            }
        }