public ActionResult Import()
        {
            IncentiveCollectionBusiness business = new IncentiveCollectionBusiness();

            business.SetUserAuth(ViewBag.UserAuth);
            return(View());
        }
        public ActionResult Index(string p, string b)
        {
            IncentiveCollectionBusiness business = new IncentiveCollectionBusiness();

            business.SetUserAuth(ViewBag.UserAuth);

            IncentiveCollectionReportViewModel model = business.GetReportSPVFakturis(p, b);

            ViewBag.ListBranch = business.GetListBranch();

            return(View(model));
        }
        public ActionResult Index()
        {
            IncentiveCollectionBusiness business = new IncentiveCollectionBusiness();

            business.SetUserAuth(ViewBag.UserAuth);

            IncentiveCollectionReportViewModel model = new IncentiveCollectionReportViewModel();

            ViewBag.ListBranch = business.GetListBranch();

            return(View(model));
        }
        public ActionResult Index(string p, int?b)
        {
            IncentiveCollectionBusiness business = new IncentiveCollectionBusiness();

            business.SetUserAuth(ViewBag.UserAuth);

            if (RoleCode.NSM.Equals(ViewBag.UserAuth.RoleCode))
            {
                ViewBag.ListBranch = business.GetListBranch();
            }

            IncentiveCollectionReportViewModel model = business.GetReport(p, b);

            return(View(model));
        }
        public ActionResult ExportReport(string p, string b)
        {
            IncentiveCollectionBusiness business = new IncentiveCollectionBusiness();

            business.SetUserAuth(ViewBag.UserAuth);

            AlertMessage alert = business.ExportReportSPVFakturis(p, b);

            if (alert.Status == 1)
            {
                var bytes = alert.Data as byte[];

                return(File(bytes, System.Net.Mime.MediaTypeNames.Application.Octet, string.Format("IncentiveCollection-SPVFakturis-{0}.xlsx", p)));
            }

            return(RedirectToAction("Index"));
        }