コード例 #1
0
 //AddInvoicePayment
 public bool AddInvoicePayment(long auction_id, long user_id, int quantity, long event_id, string address, string ac, string cc, string city, string notes, long paymenttype_id, string shippingaddress, string description, string zip, string state, decimal buyprice, decimal bp, decimal shipping, decimal insurance, decimal tax, bool ispickup, bool isdow, ref long?invoice_id)
 {
     try
     {
         dataContext.CommandTimeout = 600000;
         if (!isdow)
         {
             dataContext.spInvoice_AddInvoiceAndPaymentForITakeIt(auction_id, user_id, quantity, event_id, address, ac, cc, city, notes, paymenttype_id, shippingaddress, description, zip, state, buyprice, bp, shipping, insurance, tax, ispickup, Consts.UsersIPAddress, ref invoice_id);
         }
         else
         {
             dataContext.spInvoice_AddInvoiceAndPaymentForDOW(auction_id, user_id, quantity, event_id, address, ac, cc, city, notes, paymenttype_id, shippingaddress, description, zip, state, buyprice, bp, shipping, insurance, tax, ispickup, Consts.UsersIPAddress, ref invoice_id);
         }
     }
     catch (Exception ex)
     {
         Logger.LogException(String.Format("Error while adding payment {0}, lot {1}, user_id {2}, quantity {3}, time {4}. Error: {5}", (!isdow) ? "ITakeIt" : "DOW", auction_id, user_id, quantity, DateTime.Now, ex.Message), ex);
         return(false);
     }
     return(true);
 }