public override void OnPageLoad(object sender, EventArgs e) { storePageQueryVM = new StorePageQueryVM(); vendorFacade = new VendorFacade(this); vendorFacade.QueryStorePageType((obj, args) => { if (args.FaultsHandle()) { return; } List <KeyValuePair <string, string> > pagetypes = new List <KeyValuePair <string, string> >(); foreach (var row in args.Result.Rows) { KeyValuePair <string, string> temp = new KeyValuePair <string, string>(row["Key"], row["Name"]); pagetypes.Add(temp); } pagetypes.Insert(0, new KeyValuePair <string, string>(null, "所有")); cmbPageType.ItemsSource = pagetypes; }); this.SearchCondition.DataContext = storePageQueryVM; base.OnPageLoad(sender, e); }
void UserRoleAdd_Load(object sender, RoutedEventArgs e) { m_facade = new VendorFacade(); List <Node> data = new List <Node>(); //加载权限 m_facade.GetPrivilegeList((o, rst) => { if (!rst.FaultsHandle() && rst.Result != null) { data = TransferToNodes(rst.Result); this.tvSource.IsSpeardToParent = true; this.tvSource.Nodes = data; this.tvSource.BuildTreeByData(); } }); //加载角色权限 if (IsUpdate) { m_facade.GetPrivilegeListByRoleSysNo(this.roleSysNo, (o, arg) => { data = TransferToNodes(arg.Result); this.tvTarget.Nodes = data; this.tvTarget.BuildTreeByData(); }); } }
public override void OnPageLoad(object sender, EventArgs e) { base.OnPageLoad(sender, e); m_facade = new VendorFacade(); this.cmbConsignType.ItemsSource = EnumConverter.GetKeyValuePairs <VendorConsignFlag>(EnumConverter.EnumAppendItemType.All); this.cmbConsignType.SelectedIndex = 0; this.cmbStatus.ItemsSource = EnumConverter.GetKeyValuePairs <VendorStatus>(EnumConverter.EnumAppendItemType.All); this.cmbStatus.SelectedIndex = 0; this.cmbRank.ItemsSource = EnumConverter.GetKeyValuePairs <VendorRank>(EnumConverter.EnumAppendItemType.All); this.cmbRank.SelectedIndex = 0; this.cmbUserStatus.ItemsSource = EnumConverter.GetKeyValuePairs <ECCentral.BizEntity.ExternalSYS.ValidStatus>(EnumConverter.EnumAppendItemType.All); this.cmbUserStatus.SelectedIndex = 0; CodeNamePairHelper.GetList(ConstValue.DomainName_PO , new string[] { ConstValue.Key_POVendorAgentLevel } , CodeNamePairAppendItemType.All, (o, p) => { this.cmbAgentLevel.ItemsSource = p.Result[ConstValue.Key_POVendorAgentLevel]; this.cmbAgentLevel.SelectedIndex = 0; }); }
public UCCommissionTemplateMaintain() { InitializeComponent(); vm = new VendorCommissionInfoVM(); this.DataContext = vm; vendorFacade = new VendorFacade(CPApplication.Current.CurrentPage); this.Loaded += UCCommissionTemplateMaintain_Loaded; }
//页面加载 void UCRoleCheck_Loaded(object sender, RoutedEventArgs e) { m_facade = new VendorFacade(); filter = new VendorRoleQueryFilter(); roleListVM = new VendorUserRoleListVM(); LoadAllActiveRoles(); LoadSettedRoles(AgentSysNo, UserSysNo); }
public UCProductCheck(VendorProductQueryFilter filter) { InitializeComponent(); this.Fitler = filter; this.spAutoMgmt.DataContext = this.Fitler; this.isFirst = false; m_facade = new VendorFacade(); Loaded += new RoutedEventHandler(UCProductCheck_Loaded); }
public override void OnPageLoad(object sender, EventArgs e) { queryRequest = new CommissionRuleTemplateQueryFilter(); serviceFacade = new VendorFacade(this); queryVM = new CommissionRuleTemplateQueryVM(); this.cmbStatus.ItemsSource = EnumConverter.GetKeyValuePairs <CommissionRuleStatus>(EnumConverter.EnumAppendItemType.All); this.DataContext = queryVM; base.OnPageLoad(sender, e); }
public override void OnPageLoad(object sender, EventArgs e) { base.OnPageLoad(sender, e); vendorQueryVM = new VendorQueryVM(); vendorFacade = new VendorFacade(this); queryRequest = new ECCentral.QueryFilter.PO.VendorQueryFilter(); BindComboBoxData(); this.DataContext = vendorQueryVM; SetAccessControl(); //this.cmbEPort.SelectedEPort = 0; }
public override void OnPageLoad(object sender, EventArgs e) { queryVM = new PurchaseOrderQueryVM(); serviceFacade = new PurchaseOrderFacade(this); vendorFacade = new VendorFacade(this); queryFilter = new PurchaseOrderQueryFilter() { PageInfo = new QueryFilter.Common.PagingInfo() }; queryRMAFilter = new PurchaseOrderQueryFilter() { PageInfo = new QueryFilter.Common.PagingInfo() }; this.DataContext = queryVM; LoadComboBoxData(); base.OnPageLoad(sender, e); if (null != this.Request.QueryString) { if (this.Request.QueryString.Keys.Contains("ProductSysNo")) { queryVM.ProductSysNo = this.Request.QueryString["ProductSysNo"]; } if (this.Request.QueryString.Keys.Contains("QueryStatus")) { queryVM.StatusList = this.Request.QueryString["QueryStatus"]; } if (this.Request.QueryString.Keys.Contains("POSysNo")) { POSysNo = this.Request.QueryString["POSysNo"]; queryVM.POSysNoExtention = POSysNo; } btnSearch_Click(null, null); } SetAccessControl(); }
public override void OnPageLoad(object sender, EventArgs e) { base.OnPageLoad(sender, e); SeachBuilder.DataContext = m_query = new VendorRoleQueryFilter(); m_facade = new VendorFacade(); vm = new RoleMgmtVM(); this.cmbStatus.ItemsSource = EnumConverter.GetKeyValuePairs <ECCentral.BizEntity.ExternalSYS.ValidStatus>(EnumConverter.EnumAppendItemType.All); this.cmbStatus.SelectedIndex = 0; this.ResultGrid.DataContext = vm; m_facade.GetPrivilegeList((o, rst) => { if (!rst.FaultsHandle() && rst.Result != null) { privilegeData = TransferToNodes(rst.Result); } }); }
void UserProcessor_Loaded(object sender, RoutedEventArgs e) { m_facade = new VendorFacade(); this.cmbVendorStatus.ItemsSource = EnumConverter.GetKeyValuePairs <VendorStatus>(EnumConverter.EnumAppendItemType.Select); this.cmbVendorStatus.SelectedIndex = 0; this.cmbRank.ItemsSource = EnumConverter.GetKeyValuePairs <VendorRank>(EnumConverter.EnumAppendItemType.Select); this.cmbRank.SelectedIndex = 0; if (IsEdit) { //加载数据 m_facade.QueryUserBySysNo(m_sysNo, (o, arg) => { if (!arg.FaultsHandle()) { m_vm = arg.Result.Convert <VendorUser, VendorUserVM>(); m_vm.IsEdit = IsEdit; m_vm.IsSelectAPI = m_vm.APIStatus == UserStatus.Active; this.ucVendor.IsEnabled = false; this.DataContext = m_vm; this.dataGrid.Bind(); } else { this.DataContext = m_vm; } }); } else { dataGrid_LoadingRow(null, null); m_vm.UserID = string.Empty; m_vm.UserName = string.Empty; } }
void VendorAgentInfoMaintain_Loaded(object sender, RoutedEventArgs e) { vendorFacade = new VendorFacade(CPApplication.Current.CurrentPage); SwitchControlVisible(); if (!EditFlag) { this.cmbAgentLevel.SelectedIndex = 0; this.DataContext = newAgentInfo; //绑定送货周期: //BuildStockShippingDeliveryTimeControl(null); } else { //绑定送货周期: //BuildStockShippingDeliveryTimeControl(() => //{ // BindSendPeriodTextBox(string.IsNullOrEmpty(newAgentInfo.RequestSendPeriod) ? newAgentInfo.SendPeriod : newAgentInfo.RequestSendPeriod); //}); this.cmbCategory.LoadCategoryCompleted += (s, args) => { this.DataContext = newAgentInfo; }; } }
void UCSellerPicker_Loaded(object sender, RoutedEventArgs e) { this.Loaded -= UCSellerPicker_Loaded; serviceFacade = new VendorFacade(CurrentPage); VendorInfo = new VendorInfo(); var exp = this.GetBindingExpression(UCSellerPicker.SelectedSellerSysNoProperty); if (exp != null && exp.ParentBinding != null) { string path = exp.ParentBinding.Path.Path; Binding binding = new Binding(); binding.Path = new PropertyPath(path); binding.Mode = BindingMode.TwoWay; binding.NotifyOnValidationError = true; cmbSeller.SetBinding(Newegg.Oversea.Silverlight.Controls.Combox.SelectedValueProperty, binding); } VendorQueryFilter filter = new VendorQueryFilter() { PageInfo = new QueryFilter.Common.PagingInfo() { PageIndex = 0, PageSize = int.MaxValue, SortBy = "V.SysNo asc" }, VendorType = 1, Status = VendorStatus.Available }; serviceFacade.QueryVendors(filter, (obj, args) => { if (args.FaultsHandle()) { return; } List <VendorInfo> vendorInfo = new List <VendorInfo>(); if (null != args.Result.Rows) { foreach (var item in args.Result.Rows) { VendorInfo info = new VendorInfo() { SysNo = Convert.ToInt32(item["SysNo"].ToString()), }; info.VendorBasicInfo = new VendorBasicInfo() { VendorNameLocal = item["VendorName"].ToString() }; vendorInfo.Add(info); } } vendorInfo.Insert(0, new VendorInfo() { SysNo = 1, VendorBasicInfo = new VendorBasicInfo() { VendorNameLocal = "泰隆优选" } }); vendorInfo.Insert(0, new VendorInfo() { VendorBasicInfo = new VendorBasicInfo() { VendorNameLocal = ResCommonEnum.Enum_All } }); this.cmbSeller.ItemsSource = vendorInfo; }); }
void VendorHistoryInfoNew_Loaded(object sender, RoutedEventArgs e) { this.Loaded -= new RoutedEventHandler(VendorHistoryInfoNew_Loaded); serviceFacade = new VendorFacade(CPApplication.Current.CurrentPage); this.DataContext = vendorHistoryVM; }
void VendorFinanceInfoMaintain_Loaded(object sender, RoutedEventArgs e) { this.Loaded -= new RoutedEventHandler(VendorFinanceInfoMaintain_Loaded); payTermsServiceFacade = new VendorPayTermsFacade(CPApplication.Current.CurrentPage); serviceFacade = new VendorFacade(CPApplication.Current.CurrentPage); if (editVM.VendorBasicInfo.ConsignFlag != VendorConsignFlag.Consign) { this.lblettlePeriodType.Visibility = Visibility.Collapsed; this.cmbSettlePeriodTypeForModify.Visibility = Visibility.Collapsed; this.lblAutoAudit.Visibility = Visibility.Visible; this.chkAutoAudit.Visibility = Visibility.Visible; } //财务 - 账期类型(调用Invoice接口获取LIST): payTermsServiceFacade.QueryVendorPayTermsList(CPApplication.Current.CompanyCode, (obj, args) => { if (args.FaultsHandle()) { return; } //this.cmbPayPeriodType.ItemsSource = args.Result.Where(i => i.IsConsignment == (int)editVM.VendorBasicInfo.ConsignFlag).OrderBy(j => j.PayTermsNo).ToList(); List<VendorPayTermsItemInfo> listItems = args.Result.Where(i => i.IsConsignment == (int)editVM.VendorBasicInfo.ConsignFlag).OrderBy(j => j.PayTermsNo).ToList(); listItems.RemoveAll(item => item.PayTermsNo != 19);//只留账期类型为月结的 this.cmbPayPeriodType.ItemsSource = listItems; //如果是新申请财务信息: if (this.isNewFinanceInfo) { // 新申请财务默认合作金额10万,有效期1年 editVM.VendorFinanceInfo.CooperateAmt = "100000"; editVM.VendorFinanceInfo.CooperateValidDate = DateTime.Now.Date; editVM.VendorFinanceInfo.CooperateExpiredDate = DateTime.Now.Date.AddYears(1); this.btnRequestForApproval.Visibility = Visibility.Visible; } //如果是审核已有的财务信息 : else { this.editVM.VendorFinanceInfo.PayPeriodType = this.editVM.VendorFinanceInfo.FinanceRequestInfo.PayPeriodType; this.editVM.VendorFinanceInfo.SettlePeriodType = this.editVM.VendorFinanceInfo.FinanceRequestInfo.SettlePeriodType; this.editVM.VendorFinanceInfo.CooperateAmt = this.editVM.VendorFinanceInfo.FinanceRequestInfo.ContractAmt.HasValue ? this.editVM.VendorFinanceInfo.FinanceRequestInfo.ContractAmt.Value.ToString() : string.Empty; this.editVM.VendorFinanceInfo.CooperateValidDate = this.editVM.VendorFinanceInfo.FinanceRequestInfo.ValidDate; this.editVM.VendorFinanceInfo.CooperateExpiredDate = this.editVM.VendorFinanceInfo.FinanceRequestInfo.ExpiredDate; this.editVM.VendorBasicInfo.VendorNameLocal = this.editVM.VendorFinanceInfo.FinanceRequestInfo.VendorName; this.editVM.VendorFinanceInfo.IsAutoAudit = this.editVM.VendorFinanceInfo.FinanceRequestInfo.AutoAudit; this.btnCancelAudit.Visibility = Visibility.Visible; this.btnDeclineAudit.Visibility = Visibility.Visible; this.btnPassAudit.Visibility = Visibility.Visible; this.lblMemo.Visibility = Visibility.Visible; this.txtMemo.Visibility = Visibility.Visible; this.cmbPayPeriodType.IsEnabled = false; this.cmbSettlePeriodTypeForModify.IsEnabled = false; this.txtContractAmt.IsReadOnly = true; this.txtVendorName.IsReadOnly = true; this.dpContractDateFrom.IsEnabled = false; this.dpContractDateTo.IsEnabled = false; } this.DataContext = editVM; LoadComboBoxData(); SetAccessControl(); editVM.ValidationErrors.Clear(); }); }