Exemplo n.º 1
0
        private void InitData()
        {
            Task.Factory.StartNew(() =>
            {
                QueryParameter = new SalesRebateQueryParameterModel()
                {
                    SettleDateEnd1 = DateTime.Now.AddYears(-1).Date, SettleDateEnd2 = DateTime.Now.Date
                };
                BatchParameter = new SalesRebateBatchParameterModel()
                {
                    SettleDateBegin = DateTime.Now.AddMonths(-1).Date,
                    SettleDateEnd   = DateTime.Now.Date
                };

                var enums = CommonService.GetEnumLists();

                RebateClassLists  = enums.Where(x => x.GroupSeq == 6);
                OrganizationLists = ComboBoxSearchService.GetOrganizationLists();

                HostConfig = CommonService.GetHostConfig(DataGridId, HostName, User.ID) ?? new HostConfigModel()
                {
                    TypeId = DataGridId, Host = HostName, UserId = User.ID, TypeDesciption = "客户案子销售返利"
                };
                Token = K3ApiXService.GetToken();

                UIExecute.RunAsync(() =>
                {
                    QueryBaseCommand.Execute(null);
                });
            });
        }
 private void InitData()
 {
     Task.Factory.StartNew(() =>
     {
         OrganizationLists = ComboBoxSearchService.GetOrganizationLists();
         Service.SyncSEOutStockDeliveryQty();
     });
 }
Exemplo n.º 3
0
        public BaseViewModel()
        {
            CommonService             = new CommonService();
            Menu                      = MemoryCache.Default["PageCache"] as MainMenuModel;
            User                      = (MemoryCache.Default["UserCache"] as UserCacheModel).User;
            HostName                  = Dns.GetHostName();
            DataGridId                = Menu == null ? 0: Menu.ID * 10000 + 1;
            ComboBoxSearchService     = new ComboBoxSearchService();
            ExportHelper              = new DataTableImportExportHelper();
            DataGridManagementService = new DataGridManagementService();
            UserDataId                = CommonService.GetUserDataId(User, Menu == null ? 0 :Menu.ID);

            PrintConfiguration = new BarTenderPrintConfigModelXX();
        }
Exemplo n.º 4
0
 private void InitData()
 {
     Task.Factory.StartNew(() =>
     {
         SalesRebateAmountRangeLists = new ObservableCollection <SalesRebateRecentParameterSonModel>();
         var enums                     = CommonService.GetEnumLists();
         RebateClassLists              = enums.Where(x => x.GroupSeq == 6);
         TaxAmountTypeLists            = enums.Where(x => x.GroupSeq == 7);
         RebatePctTypeLists            = enums.Where(x => x.GroupSeq == 8);
         OrganizationLists             = ComboBoxSearchService.GetOrganizationLists();
         CaseLists                     = ComboBoxSearchService.GetCaseLists();
         MinusLastPeriodRebateLists    = enums.Where(x => x.GroupSeq == 999);
         AmountRangeCalculateTypeLists = enums.Where(x => x.GroupSeq == 11);
         UIExecute.RunAsync(() =>
         {
             if (Entity.RebatePctType == 2)
             {
                 _salesRebateAmountRangeService.GetSalesRebateAmountRangeRecentParameterLists(Entity.PGuid).ForEach(x => SalesRebateAmountRangeLists.Add(x));
             }
         });
     });
 }