Example #1
0
        private void IniPageData()
        {
            m_commonFacade.GetStockList(true, (sender, e) =>
            {
                if (e.FaultsHandle())
                {
                    return;
                }
                cmbStock.ItemsSource   = e.Result;
                cmbStock.SelectedIndex = 0;
            });

            cmbStatus.ItemsSource   = EnumConverter.GetKeyValuePairs <SOPendingStatus>(EnumConverter.EnumAppendItemType.All);
            cmbStatus.SelectedIndex = 0;

            //处理人
            m_commonFacade.GetUserInfoByDepartmentId(101, (o, p) =>
            {
                if (p.FaultsHandle())
                {
                    return;
                }
                var list = p.Result;
                list.Insert(0, new UserInfo()
                {
                    UserDisplayName = ResCommonEnum.Enum_All
                });
                this.cmbUpdateUser.ItemsSource   = list;
                this.cmbUpdateUser.SelectedIndex = 0;
            });
        }
Example #2
0
        private void InitData()
        {
            queryVM = new SalesStatisticsReportQueryVM();
            financialReportFacade = new FinancialReportFacade(this);
            var commonFacade = new CommonDataFacade(this);

            commonFacade.GetStockList(true, (obj, args) =>
            {
                queryVM.WarehouseNumberOption = new ObservableCollection <WarehouseNumberOption>();
                queryVM.WarehouseNumberOption.Insert(0, new WarehouseNumberOption {
                    Code = "-999", Name = ResCommonEnum.Enum_All, IsChecked = true
                });
                args.Result.ForEach(item =>
                {
                    if (item.StockID != null)
                    {
                        queryVM.WarehouseNumberOption.Add(new WarehouseNumberOption {
                            Code = item.SysNo.ToString(), Name = item.StockName, IsChecked = true
                        });
                    }
                });

                gridQueryBuilder.DataContext = lastQueryVM = queryVM;
                queryVM.WarehouseNumberOption.ForEach(option => option.PropertyChanged += OnStockCheck);
                SetStockNameText();
            });

            queryVM.SOStatusListOptions.ForEach(option => option.PropertyChanged += OnSOStatusCheck);
            SetSOStatusText();
        }
Example #3
0
 private void LoadComboBoxData()
 {
     commonFacade.GetStockList(true, (obj, args) =>
     {
         this.Combox_LocationWarehouse.ItemsSource = this.Combox_OwnByWarehous.ItemsSource = args.Result;
     });
     Combox_SearchType.SelectedIndex = 0;
 }
        private void LoadStocks()
        {
            commonFacade.GetStockList(false, (o, a) =>
            {
                this.stocks = a.Result;
                this.stocks.Insert(0, new StockInfo {
                    StockName = ResCommonEnum.Enum_Select
                });

                SetDataContext();
            });
        }
Example #5
0
        public override void OnPageLoad(object sender, System.EventArgs e)
        {
            base.OnPageLoad(sender, e);

            this.FilterVM = new RefundQueryReqVM();

            facade       = new RefundFacade(this);
            commonFacade = new CommonDataFacade(this);
            commonFacade.GetStockList(true, (obj, args) =>
            {
                this.FilterVM.Stocks = args.Result;

                this.ucFilter.DataContext = this.FilterVM;
            });
            SetAccessControl();
        }
Example #6
0
        private void GetStocks()
        {
            commonFacade.GetStockList(false, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                stocks = args.Result;
                stocks.Insert(0, new StockInfo {
                    StockName = ResCommonEnum.Enum_Select
                });

                SetDataContext();
            });
        }
Example #7
0
        private void LoadComboBoxData()
        {
            //默认选中第一个销售渠道
            this.cmbWebChannel.SelectedIndex = 0;

            //加载退款原因列表 & 分仓列表
            otherFacade.GetRefundReaons(true, (obj, args) =>
            {
                queryVM.RefundReasonList = args.Result;
            });

            commonFacade.GetStockList(true, (obj, args) =>
            {
                queryVM.StockList = args.Result;
            });
        }
Example #8
0
        private void LoadComboBoxData()
        {
            CommonDataFacade commonFacade = new CommonDataFacade(this);

            // 绑定分仓列表
            commonFacade.GetStockList(true, (obj, args) =>
            {
                this.queryVM.StockList = args.Result;
            });
            // 绑定配送日期范围
            CodeNamePairHelper.GetList(ConstValue.DomainName_Common, ConstValue.Key_TimeRange, CodeNamePairAppendItemType.Custom_All, (obj, args) =>
            {
                this.queryVM.DeliveryTimeRangeList = args.Result;
            });
            cmbChannel.SelectedIndex = 0;
        }
Example #9
0
        private void LoadComboBoxData()
        {
            commonFacade.GetStockList(true, (obj, args) =>
            {
                this.Combox_StockList.ItemsSource = args.Result;
            });
            Combox_StockList.SelectedIndex = 0;

            facade.GetAllVendorPayTerms(vendorPayTerms =>
            {
                vendorPayTerms.Insert(0, new CodeNamePair()
                {
                    Name = ResCommonEnum.Enum_Select
                });
                Combox_PayPeriodType.ItemsSource = vendorPayTerms;
            });
            Combox_PayPeriodType.SelectedIndex = 0;
        }
Example #10
0
        private void IntiPageData()
        {
            CommonDataFacade.GetStockList(true, (sender, e) =>
            {
                if (e.FaultsHandle())
                {
                    return;
                }
                cmbStock.ItemsSource = e.Result;
                if (e.Result.Count > 0)
                {
                    cmbStock.SelectedIndex = 0;
                }
            });

            this.cmbChangeType.ItemsSource   = EnumConverter.GetKeyValuePairs <InvoiceChangeType>(EnumConverter.EnumAppendItemType.All);
            this.cmbChangeType.SelectedIndex = 0;
        }
Example #11
0
        //绑定下拉菜单数据
        private void BindComboBoxData()
        {
            //分仓
            m_commonDataFacade.GetStockList(true, (sender, e) =>
            {
                if (e.FaultsHandle())
                {
                    return;
                }
                cmbStock.ItemsSource = e.Result;
                if (e.Result.Count > 0)
                {
                    cmbStock.SelectedIndex = 0;
                }
            });

            // 读取配置 初始化配送 时间范围
            CodeNamePairHelper.GetList(ConstValue.DomainName_Common, ConstValue.Key_TimeRange, CodeNamePairAppendItemType.All, (sender, e) =>
            {
                if (e.Result != null)
                {
                    cmbDeliveryRange.ItemsSource = e.Result;
                }
            });

            //是否特殊订单
            this.cmbIsSpecialOrder.ItemsSource   = EnumConverter.GetKeyValuePairs <SOIsSpecialOrder>(EnumConverter.EnumAppendItemType.All);
            this.cmbIsSpecialOrder.SelectedIndex = 1;

            //库存状态
            this.cmbEnoughFlag.ItemsSource   = EnumConverter.GetKeyValuePairs <EnoughFlag>(EnumConverter.EnumAppendItemType.All);
            this.cmbEnoughFlag.SelectedIndex = 0;

            //是否赠票
            this.cmbIsVAT.ItemsSource   = EnumConverter.GetKeyValuePairs <BooleanType>(EnumConverter.EnumAppendItemType.All);
            this.cmbIsVAT.SelectedIndex = 0;

            //送货方式条件
            this.cmbShipTypeCondition.ItemsSource   = EnumConverter.GetKeyValuePairs <ConditionType>(EnumConverter.EnumAppendItemType.None);
            this.cmbShipTypeCondition.SelectedIndex = 0;
        }
Example #12
0
        private void StockSearch_Loaded(object sender, RoutedEventArgs e)
        {
            CommonDataFacade _facadeCommon = new CommonDataFacade(CPApplication.Current.CurrentPage);

            _facadeCommon.GetStockList(false, (_, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }

                var dataSource = EntityConverter <StockInfo, StockCheckBoxVM> .Convert(args.Result, (s, v) =>
                {
                    v.StockSysNo = s.SysNo.ToString();
                });
                if (dataSource != null)
                {
                    dataSource.ForEach(w => w.IsChecked = m_StockSysNoList.Contains(w.StockSysNo));
                }
                this.StockList.ItemsSource = dataSource;
            });
        }
Example #13
0
        private void IniPageData()
        {
            CommonDataFacade               = new CommonDataFacade(this);
            PageView                       = new SOQueryView();
            PageView.QueryInfo.SOSysNo     = SOSysNo;
            PageView.QueryInfo.CompanyCode = CPApplication.Current.CompanyCode;
            SOQueryFacade                  = new SOQueryFacade(this);
            SOFacade                       = new SOFacade(this);
            ExportSOQueryInfo              = new SOQueryVM();
            CommonDataFacade.GetStockList(true, (sender, e) =>
            {
                PageView.QueryInfo.StockList = e.Result;
            });

            CommonDataFacade.GetAllSystemUser(CPApplication.Current.CompanyCode, (obj, args) =>
            {
                List <ECCentral.BizEntity.Common.UserInfo> userList = new List <BizEntity.Common.UserInfo>();
                userList.Add(new BizEntity.Common.UserInfo {
                    SysNo = null, UserDisplayName = ECCentral.BizEntity.Enum.Resources.ResCommonEnum.Enum_All
                });
                if (!args.FaultsHandle() && args.Result != null)
                {
                    userList.AddRange(args.Result);
                }
                cmbOutStockUser.ItemsSource = userList;
            });
            CommonDataFacade.GetCustomerServiceList(CPApplication.Current.CompanyCode, (r) =>
            {
                List <ECCentral.BizEntity.Common.UserInfo> userList = new List <BizEntity.Common.UserInfo>();
                userList.Add(new BizEntity.Common.UserInfo {
                    SysNo = null, UserDisplayName = ECCentral.BizEntity.Enum.Resources.ResCommonEnum.Enum_All
                });
                if (r != null)
                {
                    userList.AddRange(r);
                }
                cmbAuditUser.ItemsSource = userList;
            });

            CodeNamePairHelper.GetList(ConstValue.DomainName_SO
                                       , new string[] { ConstValue.Key_FPStatus, ConstValue.Key_KFCType }
                                       , CodeNamePairAppendItemType.All, (sender, e) =>
            {
                if (e.Result != null)
                {
                    PageView.QueryInfo.FPStatusList = e.Result[ConstValue.Key_FPStatus];
                    PageView.QueryInfo.KFCTypeList  = e.Result[ConstValue.Key_KFCType];
                }
            });

            CodeNamePairHelper.GetList(ConstValue.DomainName_Common, ConstValue.Key_TimeRange, CodeNamePairAppendItemType.Custom_All, (sender, e) =>
            {
                PageView.QueryInfo.TimeRangeList = e.Result;
            });

            CommonDataFacade.GetWebChannelList(true, (sender, e) => {
                cmbThirdPlatform.ItemsSource = e.Result;
            });

            spConditions.DataContext = PageView.QueryInfo;
            dataGridSO.DataContext   = PageView;
            if (!string.IsNullOrEmpty(PageView.QueryInfo.SOSysNo))
            {
                if (Regex.IsMatch(PageView.QueryInfo.SOSysNo, @"^\d+([, \.]+\d+)*$"))
                {
                    btnSearch_Click(null, null);
                }
            }
        }
Example #14
0
        private void txtReasonCodePath_SelectionChanged(object sender, RoutedEventArgs e)
        {
            if (txtReasonCodePath.Text.Length > 0)
            {
                string departmentName = GetComplainTypeOrDetailByReasonCodePath(txtReasonCodePath.Text, 4);
                if (departmentName.Length > 0)
                {
                    var department = m_csDeptList.Where(p => p.Name == departmentName).FirstOrDefault();

                    /*
                     * 不同部门不同加载,有影响的如下,界面变化点如下:
                     * 1.商品输入界面
                     * 2.部门人员加载
                     */
                    //有可能数据源已被清空
                    //加载部门人员
                    if (department != null)
                    {
                        string[] arrDept = department.Code.Split(',');
                        switch (arrDept[0])
                        {
                        case "Stock":
                            //获取所有仓库
                            m_commFacade.GetStockList(false, (s, args) =>
                            {
                                var list = args.Result.Select(p => new CodeNamePair()
                                {
                                    Code = p.SysNo.ToString()
                                    ,
                                    Name = p.StockName
                                }
                                                              );
                                cmbResponsibleUser.ItemsSource = list;
                            });
                            break;

                        case "Dept":
                            //获取部门
                            if (arrDept[1] == "100")
                            {
                                (new PMQueryFacade(this)).QueryPMList((new QueryFilter.IM.ProductManagerQueryFilter()
                                {
                                    CompanyCode = CPApplication.Current.CompanyCode,
                                    PMQueryType = "AllValid"
                                }), (s, args) =>
                                {
                                    var list = args.Result.Select(p => new CodeNamePair()
                                    {
                                        Code = p.UserInfo.UserDisplayName
                                        ,
                                        Name = p.UserInfo.UserDisplayName
                                    }
                                                                  );
                                    cmbResponsibleUser.ItemsSource = list;
                                    //部门选中的不为空
                                    //如果选择的是PM的部门,那需要显示
                                    spProductID.Visibility = System.Windows.Visibility.Visible;
                                });
                                return;
                            }
                            else
                            {
                                m_commFacade.GetUserInfoByDepartmentId(int.Parse(arrDept[1]), (s, args) =>
                                {
                                    cmbResponsibleUser.ItemsSource = args.Result
                                                                     .Select(p => new CodeNamePair()
                                    {
                                        Code = p.UserDisplayName
                                        ,
                                        Name = p.UserDisplayName
                                    }
                                                                             );;
                                });
                            }
                            break;

                        case "AllUser":
                            m_commFacade.GetAllCS(CPApplication.Current.CompanyCode, (s, args) =>
                            {
                                var list = args.Result.Select(p => new CodeNamePair()
                                {
                                    Code = p.UserName
                                    ,
                                    Name = p.UserName
                                }
                                                              );
                                cmbResponsibleUser.ItemsSource = list;
                            });
                            break;

                        default:
                            //其他没有逻辑读取
                            break;
                        }
                        cmbResponsibleUser.ItemsSource = null;
                        spProductID.Visibility         = System.Windows.Visibility.Collapsed;
                    }
                }
                else
                {
                    cmbResponsibleUser.ItemsSource = null;
                    spProductID.Visibility         = System.Windows.Visibility.Collapsed;
                }
            }
        }