public ActionResult ExportUnprocessedRecords()
        {
            int totalCount = 0;
            UnprocessedInputFacade        fac             = new UnprocessedInputFacade(this.CurrentClient.ApplicationDBConnectionString);
            List <UnprocessedInputEntity> lstUnprocesseds = fac.GetUnprocessedInputRecords("", 50, -1, out totalCount);
            DataTable dtUnprocesseds = CommonMethod.ToDataTable(lstUnprocesseds);

            string fileName  = "Input Records_" + DateTime.Now.Ticks.ToString() + ".xlsx";
            string SheetName = "Input Records";

            byte[] response = CommonExportMethods.ExportExcelFile(dtUnprocesseds, fileName, SheetName);
            return(File(response, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", fileName));
        }
        // GET: UnprocessedInput
        public ActionResult Index(int?pageSize, int?pageNumber, string importProcess)
        {
            pageNumber = pageNumber.HasValue ? pageNumber.Value : 1;
            pageSize   = pageSize.HasValue ? pageSize.Value : 50;

            int totalCount = 0;
            UnprocessedInputFacade        fac             = new UnprocessedInputFacade(this.CurrentClient.ApplicationDBConnectionString);
            List <UnprocessedInputEntity> lstUnprocesseds = fac.GetUnprocessedInputRecords(importProcess, pageSize.Value, pageNumber.Value, out totalCount);

            UnprocessedInputViewModel viewModel = new UnprocessedInputViewModel();

            viewModel.pglstUnprocesseds = new StaticPagedList <UnprocessedInputEntity>(lstUnprocesseds, pageNumber.Value, pageSize.Value, totalCount);
            viewModel.pageSize          = pageSize.Value;
            viewModel.pageNumber        = pageNumber.Value;
            viewModel.importProcess     = importProcess;

            if (Request.IsAjaxRequest())
            {
                return(PartialView("_index", viewModel));
            }
            return(View(viewModel));
        }