Exemplo n.º 1
0
        public ActionResult GetListReopenCampaign(int pageIndex, string pageSize, ListFilterParam list, string filter = "")
        {
            filter = filter.Replace("!!", "%");
            var db = new CampaignDAL();

            ViewBag.pageIndex = pageIndex;
            ViewBag.pageSize  = pageSize;
            int?total = 0;

            if (list.filter7 == "1" && filter.Split('=').Count() > 1)
            {
                filter = filter.Replace(filter.Split('=')[filter.Split('=').Count() - 1], "1");
            }
            TableColumnsTotal totalColumns = new TableColumnsTotal();
            var baseListParam = new BaseListParam()
            {
                FilterField  = filter,
                OrderByField = "",
                UserType     = Global.CurrentUser.RoleId,
                UserId       = Global.CurrentUser.LoginUserId,
                DeptId       = Global.CurrentUser.OrganizationUnitID,
                PageIndex    = pageIndex,
                PageSize     = Int32.Parse(pageSize),
                LanguageCode = Global.CurrentUser.CurrentLanguageID.ToString()
            };
            var result = db.GetListReopenCampaign(baseListParam, list, out total);

            return(Content(JsonConvert.SerializeObject(new
            {
                employees = result,
                totalCount = total,
                lstTotal = totalColumns,
                userid = baseListParam.UserId
            })));
        }