コード例 #1
0
 public OrderDetailUpdateVM(List <Orderdetail> nOrderdetailList)
 {
     odService       = new OrderdetailService();
     OrderdetailList = nOrderdetailList;
 }
コード例 #2
0
        public ProductStatVM()
        {
            plService = new ProductlineService();
            pService  = new ProductService();
            odService = new OrderdetailService();
            oService  = new OrderStatisticService();

            {
                List <YearStruct> yl = new List <YearStruct>()
                {
                    new YearStruct()
                    {
                        year = -1, display = "---All---"
                    }
                };

                List <int> year = oService.GetDistinctYear(SortDateEnum.orderDate).ToList();
                year.Sort();
                foreach (int y in year)
                {
                    yl.Add(new YearStruct()
                    {
                        year = y, display = "--" + y.ToString() + "--"
                    });
                }

                YearList = yl;
            }

            MonthList = new List <MonthStruct>()
            {
                new MonthStruct()
                {
                    month = -1, display = "All"
                }, new MonthStruct()
                {
                    month = 1, display = "January"
                }, new MonthStruct()
                {
                    month = 2, display = "February"
                }, new MonthStruct()
                {
                    month = 3, display = "March"
                }, new MonthStruct()
                {
                    month = 4, display = "April"
                }, new MonthStruct()
                {
                    month = 5, display = "May"
                }, new MonthStruct()
                {
                    month = 6, display = "June"
                }, new MonthStruct()
                {
                    month = 7, display = "July"
                }, new MonthStruct()
                {
                    month = 8, display = "August"
                }, new MonthStruct()
                {
                    month = 9, display = "September"
                }, new MonthStruct()
                {
                    month = 10, display = "October"
                }, new MonthStruct()
                {
                    month = 11, display = "November"
                }, new MonthStruct()
                {
                    month = 12, display = "December"
                }
            };

            SelectedMonth = -1;
            SelectedYear  = -1;
        }
コード例 #3
0
        public ManagementVM(bool adminMaster, View.ManagementWindow mw)
        {
            MW                  = mw;
            pService            = new ProductService();
            plineService        = new ProductlineService();
            cService            = new CustomerService();
            ccountryService     = new CountryService();
            oService            = new OrderService();
            oorderdetailService = new OrderdetailService();


            ProductlineList = new List <Productline>()
            {
                new Productline()
                {
                    id = -1, name = "All"
                }
            };
            PProductlineList = plineService.GetAll("products").ToList();
            productlineList.AddRange(PProductlineList);
            cproductlineList = plineService.GetAll("products").ToList();
            //SelectedProduct = ProductList.First();
            SelectedProductlineI = -1;
            SelectedProductline  = null;
            SelectedCountryI     = -1;
            FCountryList         = new List <Country>()
            {
                new Country()
                {
                    id = -1, name = "All"
                }
            };
            ccountryList = ccountryService.GetAll("customers").ToList();
            fcountryList.AddRange(ccountryList);
            CountryList = ccountryService.GetAll("customers").ToList();
            if (adminMaster)
            {
                AdminMaster = "Visible";
            }
            else
            {
                AdminMaster = "Hidden";
            }
            cproductList     = pService.GetAll("productline").ToList();
            ccustomerList    = cService.GetAll("country").ToList();
            oorderList       = oService.GetAll("customer").ToList();
            OrderList        = oService.GetAll("customer").ToList();
            oorderdetailList = oorderdetailService.GetAll().ToList();
            OStatusList      = new List <string>()
            {
                "WAITING", "CANCELLED", "RESOLVED", "SHIPPED", "DISPUTED", "PROCESSING"
            };
            FOStatusList = new List <string>()
            {
                "ALL", "WAITING", "CANCELLED", "RESOLVED", "SHIPPED", "DISPUTED", "PROCESSING"
            };
            SelectedStatusI = "ALL";
            PNew();
            CNew();
            ONew();
        }