コード例 #1
0
ファイル: UserProcessor.xaml.cs プロジェクト: sanlonezhang/ql
        private void hlbtnRoleListEdit_Click(object sender, RoutedEventArgs e)
        {
            VendorAgentInfoVM view      = this.dataGrid.SelectedItem as VendorAgentInfoVM;
            UCRoleCheck       roleCheck = new UCRoleCheck(view.AgentSysNo, m_sysNo);

            roleCheck.Dialog = CPApplication.Current.CurrentPage.Context.Window.ShowDialog(ResVendorInfo.Info_RoleListEdit, roleCheck, (obj, args) =>
            {
                if (args.DialogResult == DialogResultType.OK)
                {
                    dataGrid.Bind();
                }
            }, new Size(560, 450));
        }
コード例 #2
0
ファイル: UserProcessor.xaml.cs プロジェクト: sanlonezhang/ql
        private void hlbtnProductListEdit_Click(object sender, RoutedEventArgs e)
        {
            VendorAgentInfoVM        agentView = this.dataGrid.SelectedItem as VendorAgentInfoVM;
            VendorProductQueryFilter filter    = new VendorProductQueryFilter()
            {
                VendorManufacturerSysNo = agentView.ManufacturerInfo.SysNo,
                UserSysNo         = m_sysNo,
                C2SysNo           = int.Parse(agentView.C2SysNo),
                C3SysNo           = agentView.C3SysNo,
                VendorSysNo       = m_vm.VendorSysNo,
                ManufacturerSysNo = agentView.AgentSysNo,
            };
            Vendor_ExVM vm = new Vendor_ExVM()
            {
                VendorSysNo  = filter.VendorSysNo.Value,
                InvoiceType  = VendorInvoiceType.NEG,
                ShippingType = VendorShippingType.MET,//ShippingType = VendorShippingType.NEG,
                StockType    = VendorStockType.NEG
            };

            if (filter.VendorSysNo != null)
            {
                m_facade.QueryByStockShippingeInvoic(vm, (m, n) =>
                {
                    if (n.FaultsHandle())
                    {
                        return;
                    }
                    if (n.Result.Count > 0)
                    {
                        filter.VendorSysNo = 1;
                    }
                    m_facade.GetIsAuto(filter, (o, s) =>
                    {
                        if (s.FaultsHandle())
                        {
                            return;
                        }
                        filter.IsAuto           = (s.Result == 1) ? true : false;
                        UCProductCheck proCheck = new UCProductCheck(filter);
                        proCheck.Dialog         = CPApplication.Current.CurrentPage.Context.Window.ShowDialog(ResVendorInfo.Info_ProductListEdit, proCheck, (obj, args) =>
                        {
                            if (args.DialogResult == DialogResultType.OK)
                            {
                                dataGrid.Bind();
                            }
                        }, new Size(800, 700));
                    });
                });
            }
        }
コード例 #3
0
ファイル: VendorNew.xaml.cs プロジェクト: sanlonezhang/ql
 private void hpl_AgentInfoDelete_Click(object sender, RoutedEventArgs e)
 {
     Window.Confirm(ResVendorNew.AlertMsg_ConfirmDelete, (obj, args) =>
     {
         if (args.DialogResult == DialogResultType.OK)
         {
             VendorAgentInfoVM getSelectAgentVM = this.dataGrid_VendorAgentInfo.SelectedItem as VendorAgentInfoVM;
             if (null != getSelectAgentVM)
             {
                 this.vendorInfoVM.VendorAgentInfoList.Remove(getSelectAgentVM);
                 this.dataGrid_VendorAgentInfo.Bind();
                 UpdateTotalCommissionFees();
             }
         }
     });
 }
コード例 #4
0
ファイル: VendorNew.xaml.cs プロジェクト: sanlonezhang/ql
        private void hpl_AgentInfoEdit_Click(object sender, RoutedEventArgs e)
        {
            //编辑代理信息:
            VendorAgentInfoVM getSelectAgentVM = this.dataGrid_VendorAgentInfo.SelectedItem as VendorAgentInfoVM;

            if (null != getSelectAgentVM)
            {
                VendorAgentInfoMaintain maintainUC = new VendorAgentInfoMaintain(getSelectAgentVM, this.vendorInfoVM.VendorBasicInfo, false);
                maintainUC.Dialog = Window.ShowDialog(ResVendorNew.AlertMsg_EditTitle, maintainUC, (obj, args) =>
                {
                    getSelectAgentVM = (VendorAgentInfoVM)args.Data;
                    this.dataGrid_VendorAgentInfo.Bind();
                    UpdateTotalCommissionFees();
                });
            }
        }
コード例 #5
0
ファイル: VendorNew.xaml.cs プロジェクト: sanlonezhang/ql
        private void btnNewAgentInfo_Click(object sender, RoutedEventArgs e)
        {
            //新建代理信息
            VendorAgentInfoMaintain agentInfo = new VendorAgentInfoMaintain(this.vendorInfoVM.VendorBasicInfo);

            agentInfo.Dialog = Window.ShowDialog(string.Empty, agentInfo, (obj, args) =>
            {
                if (DialogResultType.OK == args.DialogResult)
                {
                    VendorAgentInfoVM getNewAgentInfoVM = args.Data as VendorAgentInfoVM;
                    if (null != getNewAgentInfoVM)
                    {
                        this.vendorInfoVM.VendorAgentInfoList.Add(getNewAgentInfoVM);
                        this.dataGrid_VendorAgentInfo.Bind();
                        UpdateTotalCommissionFees();
                    }
                }
            });
        }
コード例 #6
0
        public VendorAgentInfoMaintain(VendorBasicInfoVM vendorBasicVM)
        {
            EditFlag             = false;
            newAgentInfo         = new VendorAgentInfoVM();
            validationPeriodList = new List <ValidationEntity>();
            InitializeComponent();
            BindComboBoxData();
            if (vendorBasicVM.ConsignFlag.HasValue && vendorBasicVM.ConsignFlag.Value == VendorConsignFlag.Consign)
            {
                //如果为"代销" ,则显示代销结算模式Row:
                SetSettleTypeVisible(Visibility.Visible);
            }
            else
            {
                //如果为非代销,则隐藏代销结算模式Row:
                SetSettleTypeVisible(Visibility.Collapsed);
            }
            if (null != vendorBasicVM.ExtendedInfo)
            {
                //if (vendorBasicVM.ExtendedInfo.ShippingType == VendorShippingType.MET || vendorBasicVM.ExtendedInfo.InvoiceType == VendorInvoiceType.MET || vendorBasicVM.ExtendedInfo.StockType == VendorStockType.MET)
                //{
                //    SetDeliveryAndOrderTimeControl(Visibility.Collapsed);
                //}
                //else
                //{
                //    SetDeliveryAndOrderTimeControl(Visibility.Visible);

                //}
                //开票方式=商家开票&仓储方式=商家仓储,显示 “该模式下前台顾客运费均免收,请确保佣金收取足以承受运费的支出”
                if (vendorBasicVM.ExtendedInfo.InvoiceType == VendorInvoiceType.MET && vendorBasicVM.ExtendedInfo.StockType == VendorStockType.MET)
                {
                    this.lblCommissionFeeAlert.Text       = ResVendorMaintain.Label_Commission_Fee_Alert;
                    this.lblCommissionFeeAlert.Visibility = Visibility.Visible;
                }
                else
                {
                    this.lblCommissionFeeAlert.Visibility = Visibility.Collapsed;
                }
            }
            this.Loaded += new RoutedEventHandler(VendorAgentInfoMaintain_Loaded);
            SetAccessControl();
        }
コード例 #7
0
        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="editVendorAgentInfo"></param>
        /// <param name="vendorBasicVM"></param>
        /// <param name="consignFlag"></param>
        public VendorAgentInfoMaintain(VendorAgentInfoVM editVendorAgentInfo, VendorBasicInfoVM vendorBasicVM, bool isView)
        {
            EditFlag             = true;
            newAgentInfo         = new VendorAgentInfoVM();
            validationPeriodList = new List <ValidationEntity>();
            newAgentInfo         = editVendorAgentInfo;

            InitializeComponent();
            BindComboBoxData();
            if (isView)
            {
                this.btnAddAgentInfo.Visibility = Visibility.Collapsed;
            }
            this.ucSaleStageSettings.VendorStageSaleSettingsList = editVendorAgentInfo.VendorCommissionInfo.SaleRuleEntity.StagedSaleRuleItems;

            if (vendorBasicVM.ConsignFlag.HasValue && vendorBasicVM.ConsignFlag.Value == VendorConsignFlag.Consign)
            {
                //如果为"代销" ,则显示代销结算模式Row:
                SetSettleTypeVisible(Visibility.Visible);
            }
            else
            {
                //如果为非代销,则隐藏代销结算模式Row:
                SetSettleTypeVisible(Visibility.Collapsed);
            }
            if (null != vendorBasicVM.ExtendedInfo)
            {
                //if (vendorBasicVM.ExtendedInfo.ShippingType == VendorShippingType.MET || vendorBasicVM.ExtendedInfo.InvoiceType == VendorInvoiceType.MET || vendorBasicVM.ExtendedInfo.StockType == VendorStockType.MET)
                //{
                //    SetDeliveryAndOrderTimeControl(Visibility.Collapsed);
                //}
                //else
                //{
                //    SetDeliveryAndOrderTimeControl(Visibility.Visible);
                //}
                //开票方式=商家开票&仓储方式=商家仓储,显示 “该模式下前台顾客运费均免收,请确保佣金收取足以承受运费的支出”
                if (vendorBasicVM.ExtendedInfo.InvoiceType == VendorInvoiceType.MET && vendorBasicVM.ExtendedInfo.StockType == VendorStockType.MET)
                {
                    this.lblCommissionFeeAlert.Text       = ResVendorMaintain.Label_Commission_Fee_Alert;
                    this.lblCommissionFeeAlert.Visibility = Visibility.Visible;
                }
                else
                {
                    this.lblCommissionFeeAlert.Visibility = Visibility.Collapsed;
                }
            }

            if (editVendorAgentInfo.SettleType == SettleType.P)
            {
                this.rdoSettleType_O.IsChecked = false;
                this.rdoSettleType_P.IsChecked = true;

                this.lblSettlePercentage.Visibility = Visibility.Visible;
                this.txtSettlePercentage.Visibility = Visibility.Visible;
                this.txtSettlePercentage.Text       = editVendorAgentInfo.SettlePercentage;
            }
            else
            {
                this.rdoSettleType_O.IsChecked = true;
                this.rdoSettleType_P.IsChecked = false;
            }

            this.btnAddAgentInfo.Content = ResVendorMaintain.Button_Agent_Modify;

            //绑定下单日期 - CheckBoxList:
            BindVendorBuyWeekDayCheckBoxList(string.IsNullOrEmpty(editVendorAgentInfo.RequestBuyWeekDay) ? editVendorAgentInfo.BuyWeekDay : editVendorAgentInfo.RequestBuyWeekDay);
            //待审核状态:显示"以下为修改待审核状态信息:"
            if (editVendorAgentInfo.RequestType == VendorModifyRequestStatus.Apply)
            {
                lblAuditText.Text       = ResVendorMaintain.Msg_AuditAgentAlertText;
                lblAuditText.Visibility = Visibility.Visible;
            }
            this.Loaded += new RoutedEventHandler(VendorAgentInfoMaintain_Loaded);
            SetAccessControl();
        }