public VendorFinanceInfoMaintain(VendorInfoVM vendorInfoVM, bool isEdit) { isNewFinanceInfo = isEdit; this.editVM = vendorInfoVM.DeepCopy();// Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone<VendorInfoVM>(vendorInfoVM); InitializeComponent(); this.Loaded += new RoutedEventHandler(VendorFinanceInfoMaintain_Loaded); }
//创建供应商信息 public void CreateVendor(VendorInfoVM newVendorInfoVM, EventHandler <RestClientEventArgs <VendorInfo> > callback) { VendorInfo vendorInfo = EntityConverter <VendorInfoVM, VendorInfo> .Convert(newVendorInfoVM); vendorInfo.CompanyCode = CPApplication.Current.CompanyCode; vendorInfo.CreateUserSysNo = CPApplication.Current.LoginUser.UserSysNo; vendorInfo.CreateUserName = CPApplication.Current.LoginUser.DisplayName; string relativeUrl = "/POService/Vendor/CreateVendor"; restClient.Create <VendorInfo>(relativeUrl, vendorInfo, callback); }
public override void OnPageLoad(object sender, EventArgs e) { base.OnPageLoad(sender, e); vendorInfoVM = new VendorInfoVM(); serviceFacade = new VendorFacade(this); payTermsServiceFacade = new VendorPayTermsFacade(this); //账期类型,初始化默认为:经销: BindPayTermsData(VendorConsignFlag.Sell); //默认送货分仓: CodeNamePairHelper.GetList("PO", "VendorDefaultShippingStock", (obj, args) => { this.cmbDefaultStock.ItemsSource = args.Result; }); vendorInfoVM.VendorBasicInfo.PaySettleCompany = PaySettleCompany.SH; this.DataContext = vendorInfoVM; //this.cmbEPort.SelectedEPort = 0; //SetAccessControl(); //this.cmbEPort.ItemsSource = EnumConverter.GetKeyValuePairs<EPortStatusENUM>(EnumConverter.EnumAppendItemType.Select); }