public static int DeletePaymentInfo(PaymentInfoViewModel paymentInfo) { try { // Convert the view model object to a service proxy object. SP.PaymentInfoSvc.PaymentInfo request = paymentInfo.ToModel(); // Call the service delete method. _paymentInfoClient.DeletePaymentInfo(request); return 1; } catch (System.ServiceModel.FaultException ex) { throw ex; } catch (Exception ex) { throw ex; } }
public static int InsertPaymentInfo(PaymentInfoViewModel paymentInfo) { if (null == paymentInfo) { throw new Exception("Cannot insert PaymentInfo. The paymentInfo object was null. Cannot be empty."); } try { // Convert the view model object to a service proxy object. SP.PaymentInfoSvc.PaymentInfo request = paymentInfo.ToModel(); // Call the service insert method. _paymentInfoClient.InsertPaymentInfo(request); return 1; } catch (System.ServiceModel.FaultException ex) { throw ex; } catch (Exception ex) { throw ex; } }