public static void AuditNetPay(int soSysNo) { NetPayV31 message = new NetPayV31 { Header = ServiceAdapterHelper.ApplyMessageHeader(), Body = new NetPayMessage { SOSysNo = soSysNo } }; IMaintainNetPayV31 service = ServiceBroker.FindService <IMaintainNetPayV31>(); try { //SimpleTypeDataContract<bool> BatchApproveGroupBuy(NetPayV31 msg); SimpleTypeDataContract <bool> ResultMsg = service.BatchApproveGroupBuy(message); ServiceAdapterHelper.DealServiceFault(ResultMsg.Faults); } finally { ServiceBroker.DisposeService <IMaintainNetPayV31>(service); } }
/// <summary> /// 作废订单 /// </summary> /// <param name="soNumber"></param> public static void AbandonSO(int soNumber) { SOV31 msg = new SOV31() { Body = new SOMsg() { SOMaster = new SOMasterMsg() { SystemNumber = soNumber } }, Header = ServiceAdapterHelper.ApplyMessageHeader() }; IMaintainSOV31 service = ServiceBroker.FindService <IMaintainSOV31>(); try { msg = service.SystemAbandonSO(msg); ServiceAdapterHelper.DealServiceFault(msg.Faults); } finally { ServiceBroker.DisposeService <IMaintainSOV31>(service); } }
public static void InStock(POEntity po) { WMSRequest request = new WMSRequest() { Header = ServiceAdapterHelper.ApplyMessageHeader() , OrderInfo = new WMSOrderInfo() { OrderSysNo = po.SysNo.Value , OrderType = "PO" , WarehouseNumber = po.StockSysNo.ToString() } }; List <WMSRequestProduct> products = new List <WMSRequestProduct>(); foreach (var item in po.POItems) { products.Add( new WMSRequestProduct() { Code = item.ProductID , UnitQty = item.PurchaseQty }); } WMSRequestWaitInStock req = new WMSRequestWaitInStock() { Action = "ImportAsn" , OrderCode = po.SysNo.ToString() , WarehouseCode = po.StockSysNo.ToString() , ProductList = products }; request.WaitInStock = req; IWMSMaintain service = ServiceBroker.FindService <IWMSMaintain>(); try { WMSResponse response = service.WaitInStock(request); ServiceAdapterHelper.DealServiceFault(response.Faults); } finally { ServiceBroker.DisposeService <IWMSMaintain>(service); } }
public static void SendMail(string body) { if (ConfigurationManager.AppSettings["SendMailFlag"].ToString().ToUpper() == "FALSE") { return; } MailEntity mail = new MailEntity(); mail.Body = body; mail.To = ConfigurationManager.AppSettings["EmailTo"]; mail.CC = ConfigurationManager.AppSettings["EmailCC"]; if (String.IsNullOrEmpty(mail.To)) { return; } mail.Subject = "ProductImageMoveJob出现异常"; ServiceAdapterHelper.SendEmail(mail); }
/// <summary> /// 更新订单 /// </summary> /// <param name="soSysNo"></param> public static void UpdateSO4GroupBuying(int soSysNo) { SimpleTypeDataContract <int> SysNo = new SimpleTypeDataContract <int> { Value = soSysNo, Header = ServiceAdapterHelper.ApplyMessageHeader() }; IMaintainSOV31 service = ServiceBroker.FindService <IMaintainSOV31>(); try { DefaultDataContract msg = service.UpdateSO4GroupBuying(SysNo); ServiceAdapterHelper.DealServiceFault(msg.Faults); } finally { ServiceBroker.DisposeService <IMaintainSOV31>(service); } }
private static void InsertKFC(SOEntity4FPEntity entity) { IMaintainKFCV31 service = ServiceBroker.FindService <IMaintainKFCV31>(); KnownFraudCustomerV31 message = new KnownFraudCustomerV31 { Body = new KnownFraudCustomerMsg { BrowseInfo = entity.BrowseInfo, CreateDate = DateTime.Now, CreateUserName = "******", CustomerSysNo = entity.CustomerSysNo, EmailAddress = entity.EmailAddress, FraudType = 1, IPAddress = entity.IPAddress, MobilePhone = entity.MobilePhone, ShippingAddress = entity.ShippingAddress, ShippingContact = entity.ShippingContact, Status = 0, Telephone = entity.Telephone }, Header = new Newegg.Oversea.Framework.Contract.MessageHeader() { OperationUser = new OperationUser(UserDisplayName, UserLoginName, StoreSourceDirectoryKey, CompanyCode), CompanyCode = CompanyCode, StoreCompanyCode = StoreCompanyCode } }; try { message = service.InsertKnownFraudCustomer(message); } finally { ServiceAdapterHelper.DealServiceFault(message); } }
public static void UpdateSO4GroupBuyingV2(int soSysNo, int gourpBuySysNo, int productSysNo) { SOGroupBuyAjustV31 message = new SOGroupBuyAjustV31() { Body = new SOGroupBuyAjustMsg(), Header = ServiceAdapterHelper.ApplyMessageHeader() }; message.Body.SOSysNo = soSysNo; message.Body.GroupBuySysNo = gourpBuySysNo; message.Body.ProductSysNo = productSysNo; IMaintainSOV31 service = ServiceBroker.FindService <IMaintainSOV31>(); try { DefaultDataContract msg = service.UpdateSO4GroupBuyingV2(message); ServiceAdapterHelper.DealServiceFault(msg.Faults); } finally { ServiceBroker.DisposeService <IMaintainSOV31>(service); } }
public static void CreateAO(int soSysNo) { FinanceIncomeV31 message = new FinanceIncomeV31 { Header = ServiceAdapterHelper.ApplyMessageHeader(), Body = new FinanceIncomeMessage() }; message.Body.SOIncome = new SOIncomeMessage { OrderSysNo = soSysNo }; message.Body.SOIncomeRefund = new SOIncomeRefundMessage { Note = "团购订单作废", RefundReason = null, RefundPayType = SOIncomeRefundPayType.PrepayRefund }; message.Body.Type = FinanceIncomeType.AO; ICreateSOIncomeRefundV31 service = ServiceBroker.FindService <ICreateSOIncomeRefundV31>(); try { SimpleTypeDataContract <bool> ResultMsg = service.CreateNegativeFinanceIncome(message); ServiceAdapterHelper.DealServiceFault(ResultMsg.Faults); } finally { ServiceBroker.DisposeService <ICreateSOIncomeRefundV31>(service); } }