示例#1
0
        public ActionResult SalesPersonalStore(int userid, string period, string accountnumber, string salesname, string accountname, int selectedgroupid, int headeroption = 1)
        {
            var vm = new GridsModel(userid, period, accountnumber, salesname, accountname, selectedgroupid);

            ViewBag.HeaderOption = headeroption;
            return(View(vm));
        }
示例#2
0
        public ActionResult CategoryDetails(string category, string accountnumber, string accountname, string period, int isclientonly, int headeroption = 1)
        {
            var vm = new GridsModel(category, period, isclientonly, accountnumber, accountname);

            ViewBag.HeaderOption = headeroption;
            return(View(vm));
        }
示例#3
0
        public ActionResult SalesSummaryPriceBandCategoryProduct(string period, string setnames, string unitsizes, decimal pricefrom, decimal priceto, int selectedgroupid, string pricebandname, string mycategoryname, int headeroption = 1)
        {
            var vm = new GridsModel(period, setnames, unitsizes, pricefrom, priceto, selectedgroupid, 5, pricebandname, mycategoryname);

            ViewBag.HeaderOption = headeroption;
            return(View(vm));
        }
示例#4
0
        public ActionResult StoreLicenseeForCSPC(string cspc, string productname, string period, int selectedgroupid, int headeroption = 1)
        {
            var vm = new GridsModel(productname, cspc, period, selectedgroupid);

            ViewBag.HeaderOption = headeroption;
            return(View(vm));
        }
示例#5
0
        public ActionResult SalesByProducts(string period, int agentid, string agentname, string setnames, int brandid, string brandname, string unitsizes, decimal pricefrom, decimal priceto, int selectedgroupid, int headeroption = 1)
        {
            var vm = new GridsModel(period, agentid, agentname, setnames, brandid, brandname, unitsizes, pricefrom, priceto, selectedgroupid);

            ViewBag.HeaderOption = headeroption;
            return(View(vm));
        }
示例#6
0
        public ActionResult SalesSummaryVarietalProduct(string period, string setnames, string unitsizes, decimal pricefrom, decimal priceto, int selectedgroupid, string varietalname, int headeroption = 1)
        {
            var vm = new GridsModel(period, setnames, unitsizes, pricefrom, priceto, selectedgroupid, 3, varietalname);

            ViewBag.HeaderOption = headeroption;
            return(View(vm));
        }
示例#7
0
        public ActionResult SalesSummaryColorProductDetail(string period, string setnames, string unitsizes, decimal pricefrom, decimal priceto, int selectedgroupid, string colorname, string category, int headeroption = 1)
        {
            var vm = new GridsModel(period, setnames, unitsizes, pricefrom, priceto, selectedgroupid, colorname, category);

            ViewBag.HeaderOption = headeroption;
            return(View(vm));
        }
示例#8
0
        public ActionResult Index(int headeroption = 1)
        {
            var           vm   = new GridsModel();
            UserPrincipal user = GetCurrentPrincipal();

            vm = SetReportViewModel(user);
            ViewBag.CurrentUserFirstName = vm.CurrentUserFirstName;
            ViewBag.CurrentUserLastName  = vm.CurrentUserSurName;
            ViewBag.HeaderOption         = headeroption;

            try
            {
                var filepath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConfigurationManager.AppSettings["CompanyName"]);
                using (var stream = new StreamReader(filepath))
                {
                    ViewBag.CompanyName = stream.ReadToEnd();
                }
            }
            catch (Exception exc)
            {
                return(Content(exc.Message));
            }


            return(View(vm));
        }
示例#9
0
        public ActionResult SalesSummaryCountryColor(string period, string setnames, string unitsizes, decimal pricefrom, decimal priceto, int selectedgroupid, string countryname, int headeroption = 1)
        {
            var vm = new GridsModel(period, setnames, unitsizes, pricefrom, priceto, selectedgroupid, 2, countryname);

            ViewBag.HeaderOption = headeroption;
            return(View(vm));
        }
示例#10
0
        public ActionResult SalesTeamStoreLicensee(int userid, string salesname, string period, int selectedgroupid, string storelicensee, int headeroption = 1)
        {
            var vm = new GridsModel(userid, salesname, period, selectedgroupid);

            ViewBag.HeaderOption  = headeroption;
            ViewBag.StoreLicensee = storelicensee;
            return(View(vm));
        }
示例#11
0
        private GridsModel SetReportViewModel(UserPrincipal user)
        {
            GridsModel vm = new GridsModel();

            vm.CurrentUser          = user.UserPrincipalName;
            vm.SamAccount           = user.SamAccountName;
            vm.CurrentUserFirstName = user.GivenName;
            vm.CurrentUserSurName   = user.Surname;
            return(vm);
        }