public static void AddSSISyOwnPayment(SSISPaymentModel model, Repositories rep, int customerId) { OwnSSISPayment p = new OwnSSISPayment(); p.CardAccountID = model.CardAccountID; p.CustomerID = customerId; p.SSISPaymentID = model.SSISPaymentID; p.Number = model.Number; p.Name = model.Name + " " + model.Number; rep.OwnSSISPayments.Add(p); rep.SaveChanges(); }
public static SSISPaymentModel SSISOwnPaymentToModel(int paymentId, Repositories rep) { OwnSSISPayment p = rep.OwnSSISPayments.GetSingle(paymentId); if (p == null) { return(null); } SSISPaymentModel model = new SSISPaymentModel(); model.FromOwnPayments = true; model.CardAccountID = p.CardAccountID; model.Number = p.Number; model.SSISPaymentID = p.SSISPaymentID; return(model); }