예제 #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(ComboBoxSearchModel org, ObservableCollection <CustomerSchedulingOrgLabelModel> orgLabelList)
        {
            Organization           = org;
            CustomerSchedulingDate = new CustomerSchedulingDateModel {
                Date1 = DateTime.Now.AddDays(1).Date, Date2 = DateTime.Now.AddDays(2).Date, Date3 = DateTime.Now.AddDays(3).Date, Date4 = DateTime.Now.AddDays(4).Date, Date5 = DateTime.Now.AddDays(5).Date
            };
            Service.GetCustomerSchedulingDetailLists(Organization.Id, DateTime.Now.Date, Label).ForEach(x => CustomerSchedulingDetailLists.Add(x));

            Task.Factory.StartNew(() =>
            {
                UIExecute.RunAsync(() =>
                {
                    if (orgLabelList.Count == 0)
                    {
                        Service.GetCustomerSchedulingSummaryLists(org.Id, DateTime.Now.Date).ForEach(x => OrgLabelLists.Add(new CustomerSchedulingOrgLabelModel {
                            FItemId = x.FItemId, Label = x.Label, OrgCode = x.OrgCode, OrgId = x.OrgId, ProductionName = x.ProductionName
                        }));
                    }
                    else
                    {
                        OrgLabelLists = orgLabelList;
                    }
                });
            });
        }
        private void InitData()
        {
            Filter = new MaterialPlanInventoryParameterModel
            {
                ParamBeginDate = DateTime.Now.AddDays(-7),
                ParamEndDate   = Convert.ToDateTime(System.DateTime.Now.ToShortDateString()),
            };

            Task.Factory.StartNew(() =>
            {
                _purchaseRequisitionICItemLists = K3ApiFKService.GetPurchaseRequisitionICItem();
                _measureUnitLists = K3ApiFKService.GetMeasureUnit();
                _employeeLists    = K3ApiFKService.GetK3Employee();

                if (_materialPlanInventoryService.DeleteMaterialPlanInventory())
                {
                    MaterialPlanInventoryLists.Clear();
                }

                MaterialPlanSeOrderFullLists = _materialPlanInventoryService.GetMaterialPlanSeorderFullLists(Filter.ParamBeginDate, Filter.ParamEndDate);

                UIExecute.RunAsync(() =>
                {
                    MaterialPlanSeOrderFullLists.GroupBy(x => new { x.FBillNo, x.FInterID, x.FDate, x.FCustName, x.FEmpName, x.FDeptName })
                    .Select(x => new MaterialPlanSeOrderShowModel {
                        FCustName = x.Key.FCustName, FEmpName = x.Key.FEmpName, FDeptName = x.Key.FDeptName, FDate = x.Key.FDate, FInterID = x.Key.FInterID, FBillNo = x.Key.FBillNo
                    })
                    .OrderByDescending(x => x.FDate).ThenBy(x => x.FBillNo)
                    .ToList().ForEach(m => MaterialPlanSeorderLists.Add(m));
                });
            });
        }
예제 #4
0
        private void InitData()
        {
            Task.Factory.StartNew(() =>
            {
                SalesRebateRecentParameterLists   = new ObservableCollection <SalesRebateRecentParameterMainModel>();
                SalesRebateK3RecordParameterLists = new ObservableCollection <SalesRebateRecentParameterMainModel>();

                // 按客户、类别、时间生成数据
                SalesRebateService.InsertCurrentOrgRebateClassParameter(BatchParameter);

                RebateClassLists = CommonService.GetEnumLists(6);

                var org  = new OrganizationService().GetOrganizationById(BatchParameter.OrganizationSearchedItem.Id);
                OrgLists = new List <EnumModel> {
                    new EnumModel {
                        ItemSeq = org.Id, ItemValue = org.FName
                    }
                };

                UIExecute.RunAsync(() =>
                {
                    QueryBaseCommand.Execute(null);
                });
            });
        }
 private void InitData()
 {
     Task.Factory.StartNew(() =>
     {
         PrintLSLists   = new ObservableCollection <LabelPrintLSModel>();
         ProductionDate = DateTime.Now.Date;
         HostConfig     = CommonService.GetHostConfig(DataGridId, HostName, User.ID) ?? new HostConfigModel()
         {
             TypeId = DataGridId, Host = HostName, UserId = User.ID, TypeDesciption = "蓝思标签打印"
         };
         ComputerPrinters = PrintHelper.GetComputerPrinters();
         var config       = CommonService.GetBarTenderPrintConfigXX(User.ID, DataGridId, HostName);
         if (config == null)
         {
             PrintConfiguration = new BarTenderPrintConfigModelXX {
                 TemplateTypeId = DataGridId, HostName = HostName, UserId = User.ID, TemplateTypeName = "蓝思标签打印"
             }
         }
         ;
         else
         {
             PrintConfiguration = config;
             PirntTemplates     = PrintHelper.GetTenderPrintTemplates(config.TemplateSelectedItem.TemplateFolderPath);
         }
         BarcodeTypeLists        = CommonService.GetEnumLists(10);
         BarcodeTypeSelectedItem = BarcodeTypeLists.FirstOrDefault();
         UIExecute.RunAsync(() =>
         {
             QueryBaseCommand.Execute(null);
         });
     });
 }
예제 #6
0
 private void InitData()
 {
     Task.Factory.StartNew(() =>
     {
         UIExecute.RunAsync(() =>
         {
         });
     });
 }
 public void DataInit()
 {
     GeneralParameter = new GeneralParameterModel {
         ParamBeginDate = DateTime.Now.AddDays(1 - DateTime.Now.Day).AddMonths(-1), ParamEndDate = DateTime.Now.Date
     };
     Task.Factory.StartNew(() =>
     {
         UIExecute.RunAsync(GetShippingBills);
         UIExecute.RunAsync(InitQueryConSignmentBill);
     });
 }
 private void InitData()
 {
     Task.Factory.StartNew(() =>
     {
         CommonService.GetEnumLists(12).ToList().ForEach(x => TypeSelectorLists.Add(x));
         UIExecute.RunAsync(() =>
         {
             QueryBaseCommand.Execute(null);
         });
     });
 }
 private void InitData()
 {
     Task.Factory.StartNew(() =>
     {
         QueryParameter = new DataGridColumnHeaderQueryParameterModel();
         DataGridLists  = new ObservableCollection <DataGridColumnHeaderModel>();
         UIExecute.RunAsync(() =>
         {
         });
     });
 }
 private void InitData()
 {
     Task.Factory.StartNew(() =>
     {
         DataGridLists = new ObservableCollection <DataGridColumnHeaderUserCustomModel>();
         UIExecute.RunAsync(() =>
         {
             _service.GetUserDataGridColumnLists(_dataGridName, User.ID, false).ForEach(x => DataGridLists.Add(x));
         });
     });
 }
 private void InitData()
 {
     Task.Factory.StartNew(() =>
     {
         SettleMonthSearchedItem = new ComboBoxSearchModel()
         {
             Id = Convert.ToInt32(DateTime.Now.Date.AddMonths(-10).ToString("yyyyMM")), SearchText = DateTime.Now.Date.AddMonths(-10).ToString("yyyy-MM")
         };
         ItemProfitAccountingLists        = new ObservableCollection <ItemProfitAccountingModel>();
         ItemProfitAccountingMonthlyLists = new ObservableCollection <ItemProfitAccountingMonthlyModel>();
         ItemProfitAccountingSelectedItem = new ItemProfitAccountingModel();
         UIExecute.RunAsync(() =>
         {
             SettleMonthLists = _itemProfitAccountingService.GetSettleMonthLists();
             ItemProfitAccountingQueryCommand.Execute(null);
         });
     });
 }
예제 #12
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));
             }
         });
     });
 }
예제 #13
0
        private void InitData()
        {
            Task.Factory.StartNew(() =>
            {
                QueryParameter = new ProductionDeptLabelPrintA4QueryParameterModel {
                    ProductionDate = DateTime.Now.Date
                };
                PrintHistoryLists = new ObservableCollection <LabelPrintHistoryModel>();


                HostConfig = CommonService.GetHostConfig(DataGridId, HostName, User.ID) ?? new HostConfigModel()
                {
                    TypeId = DataGridId, Host = HostName, UserId = User.ID, TypeDesciption = "标签A4打印"
                };
                ComputerPrinters = PrintHelper.GetComputerPrinters();
                var config       = CommonService.GetBarTenderPrintConfigXX(User.ID, DataGridId, HostName);
                if (config == null)
                {
                    PrintConfiguration = new BarTenderPrintConfigModelXX {
                        TemplateTypeId = DataGridId, HostName = HostName, UserId = User.ID, TemplateTypeName = "标签A4打印"
                    }
                }
                ;
                else
                {
                    PrintConfiguration = config;
                    PirntTemplates     = PrintHelper.GetTenderPrintA4Templates(config.TemplateSelectedItem.TemplateFolderPath);
                }


                var ss = _service.GetHistoryLists(CommonService.GetSqlWhereString(QueryParameter));

                UIExecute.RunAsync(() =>
                {
                    ss.ForEach(x => PrintHistoryLists.Add(x));
                });
            });
        }