/// <summary> /// 创建SAP供应商配置 /// </summary> /// <param name="entity"></param> /// <returns></returns> public virtual int CreateSAPVendor(SAPVendorInfo entity) { DataCommand dc = DataCommandManager.GetDataCommand("CreateSAPVendor"); dc.SetParameterValue("@VendorSysNo", entity.VendorSysNo); dc.SetParameterValue("@SAPVendorID", entity.SAPVendorID); dc.SetParameterValue("@VendorShortName", entity.SAPVendorName); dc.SetParameterValue("@PaymentTerm", entity.PaymentTerm); dc.SetParameterValue("@CompanyCode", entity.CompanyCode); return(dc.ExecuteNonQuery()); }
public void CreateSAPVendor(SAPVendorVM vm, Action callback) { SAPVendorInfo data = vm.ConvertVM <SAPVendorVM, SAPVendorInfo>(); if (string.IsNullOrEmpty(data.SAPVendorID)) { data.SAPVendorID = "cv1" + data.VendorSysNo.ToString(); } data.CompanyCode = CPApplication.Current.CompanyCode; string relativeUrl = "/InvoiceService/SAP/CreateSAPVendor"; restClient.Create <SAPVendorInfo>(relativeUrl, data, (obj, args) => { if (args.FaultsHandle()) { return; } callback(); }); }