Example #1
0
        public JsonResult GetGovernmentFunds()
        {
            GovernmentFundsBLL governmentFundsBLL = new GovernmentFundsBLL()
            {
                Search            = Search,
                Order             = Order,
                OrderDir          = OrderDir,
                StartRec          = StartRec,
                PageSize          = PageSize,
                OrderByColumnName = OrderByColumnName
            };
            var data = governmentFundsBLL.GetGovernmentFunds(out TotalRecordsOut, out RecFilterOut).Select(x => new
            {
                GovernmentFundID             = x.GovernmentFundID,
                EmployeeCodeNo               = x.EmployeeCode.EmployeeCodeNo,
                EmployeeNameAr               = x.EmployeeCode.Employee.EmployeeNameAr,
                GovernmentDeductionTypeName  = x.GovernmentDeductionType.GovernmentDeductionTypeName,
                GovernmentFundTypeName       = x.GovernmentFundType.GovernmentFundTypeName,
                MonthlyDeductionAmount       = x.MonthlyDeductionAmount,
                TotalDeductionAmount         = x.TotalDeductionAmount,
                DeductionStartDate           = x.DeductionStartDate,
                GovernmentFundDeactiveReason = x.GovernmentFundDeactiveReason,
                IsActive = x.IsActive
            });

            return(Json(new { draw = Convert.ToInt32(Draw), recordsTotal = TotalRecordsOut, recordsFiltered = RecFilterOut, data = data }, JsonRequestBehavior.AllowGet));
        }