public void insertPaymentTypes(String paymentType) { PaymentTypes p = PaymentTypeFactory.createPaymentType(paymentType); db.PaymentTypes.Add(p); db.SaveChanges(); }
public static void InsertNewPaymentType(string name) { PaymentType newProduct = PaymentTypeFactory.CreateNewPaymentType(name); db.PaymentTypes.Add(newProduct); db.SaveChanges(); }
public static void Create(string paymentTypeName) { PaymentType pay = PaymentTypeFactory.CreatePayment(paymentTypeName); db.PaymentTypes.Add(pay); db.SaveChanges(); }
/// <summary> /// Used to submit new Payment /// </summary> /// <param name="paymentDetails">payment Details</param> /// <returns>true/False</returns> public bool SubmitPayment(PaymentDetails paymentDetails) { try { PaymentTypeFactory paymentFactory = null; paymentFactory = GenerateType(paymentDetails.TypeofPayment); if (paymentFactory == null) { return(false); } bool insertStatus = buisnessRuleEngineDB.SubmitPayment(paymentDetails); if (insertStatus) { PaymentTypesBaseClass paymentTypesBaseClass = paymentFactory?.GenerateTypeClass(); paymentTypesBaseClass.FillMinDetail(paymentDetails.Name, paymentDetails.PhoneNumber); paymentTypesBaseClass.PerformOperations(paymentDetails); } return(insertStatus); } catch (Exception) { throw; } }
public void validateUpdatePaymentType(TextBox txtPaymentType, Label lblErrorPaymentType, Label lblSuccess) { int ID = Convert.ToInt32(HttpContext.Current.Request.QueryString["paymenttypeid"]); string name = txtPaymentType.Text; List <PaymentType> check = new PaymentTypeHandler().GetSameNameUpdate(name); int flag = 0; foreach (var item in check) { if (item.ID != ID) { flag = 1; break; } } if (flag == 1) { lblErrorPaymentType.Visible = true; return; } PaymentType newPaymentType = new PaymentTypeFactory().CreatePaymentType(name); new PaymentTypeHandler().UpdatePaymentType(newPaymentType, ID); lblSuccess.Visible = true; lblErrorPaymentType.Visible = false; }
public static void insertPaymentType(string type) { PaymentType payment = PaymentTypeFactory.insertPayment(type); dbEntity.PaymentTypes.Add(payment); dbEntity.SaveChanges(); }
public static Boolean insertPaymentType(string type) { PaymentType pt = PaymentTypeFactory.createPaymentType(type); db.PaymentTypes.Add(pt); db.SaveChanges(); return(true); }
public static PaymentType InsertPaymentType(string type) { PaymentType paytype = PaymentTypeFactory.InsertPaymentType(type); db.PaymentTypes.Add(paytype); db.SaveChanges(); return(paytype); }
public void validateInsertPaymentType(TextBox txtPaymentType, Label lblErrorPaymentType) { string name = txtPaymentType.Text; bool check = new ProductTypeHandler().GetSameNameInsert(name); if (check == true) { lblErrorPaymentType.Text = "Must be unique"; return; } PaymentType newPaymentType = new PaymentTypeFactory().CreatePaymentType(name); new PaymentTypeHandler().InsertPaymentType(newPaymentType); lblErrorPaymentType.Text = ""; txtPaymentType.Text = ""; }
public static void insertPaymentType(String type) { PaymentType newPaymentType = PaymentTypeFactory.createPaymentType(type); PaymentTypeRepository.insertPaymentType(newPaymentType); }
public static void createPaymentType(string name) { PaymentTypeRepository.create(PaymentTypeFactory.createNewPaymentType(name)); }
public static void add(String type) { PaymentTypeRepo.add(PaymentTypeFactory.createPaymentType(type)); }
public static PaymentType createPaymentType(String paymentTypeName) { return(PaymentTypeFactory.createPaymentType(paymentTypeName)); }
public static void add(String type) { PaymentType paymentType = PaymentTypeFactory.createPaymentType(type); PaymentTypeRepository.add(paymentType); }