Example #1
0
 public ActionResult Index()
 {
     ModelPagerOrg model = new ModelPagerOrg();
     model.PagerCount = 0;
     model.PagerIndex = 1;
     return View(model);
 }
Example #2
0
        public ActionResult Index(ModelPagerOrg model, string PagerIndex, string PagerSize)
        {
            var pageIndex = 0;
            var pageSize = 0;
            int.TryParse(PagerIndex, out pageIndex);
            int.TryParse(PagerSize, out pageSize);

            var resultMsg = string.Empty;
            var recordCount = decimal.Zero;
            var logic = new LogicOrganization();
            var criteria = new CriteriaOrganization.Pager();
            criteria.KeyWord = model.KeyWord;

            var list = logic.QueryOrganizationListPager(out resultMsg, out recordCount, criteria, pageSize: pageSize, pageIndex: pageIndex);
            model.PagerRowCount = recordCount;
            model.PagerCount = pageSize == 0 ? 0 : Math.Ceiling(recordCount / pageSize);
            model.AdsList = list;
            return View(model);
        }