void BindGrid() { PaymentMethodCollection paymentMethodCollection = PaymentMethodManager.GetAllPaymentMethods(); gvPaymentMethods.DataSource = paymentMethodCollection; gvPaymentMethods.DataBind(); }
protected void btnNextStep_Click(object sender, EventArgs e) { if (Page.IsValid) { //reward points NopContext.Current.User.UseRewardPointsDuringCheckout = cbUseRewardPoints.Checked; //payment methods int paymentMethodId = this.SelectedPaymentMethodId; var paymentMethod = PaymentMethodManager.GetPaymentMethodById(paymentMethodId); if (paymentMethod != null && paymentMethod.IsActive) { NopContext.Current.User = CustomerManager.SetLastPaymentMethodId(NopContext.Current.User.CustomerId, paymentMethodId); var args1 = new CheckoutStepEventArgs() { PaymentMethodSelected = true }; OnCheckoutStepChanged(args1); if (!this.OnePageCheckout) { Response.Redirect("~/checkoutpaymentinfo.aspx"); } } } }
protected void SaveButton_Click(object sender, EventArgs e) { if (Page.IsValid) { try { PaymentMethod paymentMethod = PaymentMethodManager.GetPaymentMethodByID(this.PaymentMethodID); if (paymentMethod != null) { paymentMethod = PaymentMethodManager.UpdatePaymentMethod(paymentMethod.PaymentMethodID, txtName.Text, txtVisibleName.Text, txtDescription.Text, txtConfigureTemplatePath.Text, txtUserTemplatePath.Text, txtClassName.Text, txtSystemKeyword.Text, cbActive.Checked, txtDisplayOrder.Value); IConfigurePaymentMethodModule configureModule = GetConfigureModule(); if (configureModule != null) { configureModule.Save(); } Response.Redirect("PaymentMethodDetails.aspx?PaymentMethodID=" + paymentMethod.PaymentMethodID.ToString()); } else { Response.Redirect("PaymentMethods.aspx"); } } catch (Exception exc) { ProcessException(exc); } } }
void BindGrid() { var paymentMethods = PaymentMethodManager.GetAllPaymentMethods(); gvPaymentMethods.DataSource = paymentMethods; gvPaymentMethods.DataBind(); }
private void CreateChildControlsTree() { PaymentMethod paymentMethod = null; if (NopContext.Current.User != null) { PaymentMethodCollection paymentMethods = PaymentMethodManager.GetAllPaymentMethods(); if (paymentMethods.Count == 1) { paymentMethod = paymentMethods[0]; } else { paymentMethod = NopContext.Current.User.LastPaymentMethod; } } if (paymentMethod != null) { Control child = null; child = base.LoadControl(paymentMethod.UserTemplatePath); this.PaymentInfoPlaceHolder.Controls.Add(child); } else { Response.Redirect("~/CheckoutPaymentMethod.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { var gcPaymentMethod = PaymentMethodManager.GetPaymentMethodBySystemKeyword("GoogleCheckout"); if (gcPaymentMethod == null || !gcPaymentMethod.IsActive) { this.Visible = false; return; } var cart = ShoppingCartManager.GetCurrentShoppingCart(ShoppingCartTypeEnum.ShoppingCart); if (cart.Count == 0) { this.Visible = false; return; } if (cart.IsRecurring && PaymentManager.SupportRecurringPayments(gcPaymentMethod.PaymentMethodId) == RecurringPaymentTypeEnum.NotSupported) { this.Visible = false; return; } GCheckoutButton1.UseHttps = CommonHelper.IsCurrentConnectionSecured(); }
protected void BindGrid() { CountryCollection countryCollection = CountryManager.GetAllCountries(); PaymentMethodCollection paymentMethodCollection = PaymentMethodManager.GetAllPaymentMethods(null, false); if (countryCollection.Count == 0) { lblMessage.Text = GetLocaleResourceString("Admin.PaymentMethodsFilterControl.NoCountryDefined"); } if (paymentMethodCollection.Count == 0) { lblMessage.Text = GetLocaleResourceString("Admin.PaymentMethodsFilterControl.NoPaymentMethodDefined"); } List <PaymentMethodCountryMappingHelperClass> dt = new List <PaymentMethodCountryMappingHelperClass>(); foreach (Country country in countryCollection) { PaymentMethodCountryMappingHelperClass map1 = new PaymentMethodCountryMappingHelperClass(); map1.CountryId = country.CountryId; map1.CountryName = country.Name; map1.Restrict = new Dictionary <int, bool>(); foreach (PaymentMethod paymentMethod in paymentMethodCollection) { map1.Restrict.Add(paymentMethod.PaymentMethodId, PaymentMethodManager.DoesPaymentMethodCountryMappingExist(paymentMethod.PaymentMethodId, country.CountryId)); } dt.Add(map1); } gvPaymentMethodCountryMap.DataSource = dt; gvPaymentMethodCountryMap.DataBind(); }
public void SaveInfo() { if (Page.IsValid) { try { PaymentMethodCollection paymentMethodCollection = PaymentMethodManager.GetAllPaymentMethods(null, false); foreach (GridViewRow row in gvPaymentMethodCountryMap.Rows) { foreach (PaymentMethod paymentMethod in paymentMethodCollection) { CheckBox cbRestrict = row.FindControl(String.Format("cbRestrict_{0}", paymentMethod.PaymentMethodId)) as CheckBox; HiddenField hfCountryId = row.FindControl(String.Format("hfCountryId_{0}", paymentMethod.PaymentMethodId)) as HiddenField; int countryId = Int32.Parse(hfCountryId.Value); if (cbRestrict.Checked) { PaymentMethodManager.CreatePaymentMethodCountryMapping(paymentMethod.PaymentMethodId, countryId); } else { PaymentMethodManager.DeletePaymentMethodCountryMapping(paymentMethod.PaymentMethodId, countryId); } } } Response.Redirect("PaymentMethods.aspx"); } catch (Exception exc) { ProcessException(exc); } } }
public ActionResult Edit(PaymentMethodViewModel model) { model.Patients = PatientManager.GetAllPatient(); model.Services = ServiceManager.GetAllService(); if (model.PaymentMethodId > 0) { var paymentMethod = PaymentMethodManager.GetPaymentbyId(model.PaymentMethodId); model.PaymentMethodId = paymentMethod.PaymentMethodId; model.PatientId = paymentMethod.PatientId; model.ServiceId = paymentMethod.ServiceId; model.DiscountAmount = paymentMethod.DiscountAmount; model.Charge = paymentMethod.Charge; model.TotalCharge = paymentMethod.TotalCharge; model.Paid = paymentMethod.Paid; model.Due = paymentMethod.Due; model.Date = paymentMethod.Date; model.PaymentType = paymentMethod.PaymentType; model.CreatedDate = paymentMethod.CreatedDate; model.LastPaidDate = paymentMethod.LastPaidDate; } return(View(model)); }
public void SaveInfo() { var paymentMethods = PaymentMethodManager.GetAllPaymentMethods(null, false); foreach (GridViewRow row in gvPaymentMethodCountryMap.Rows) { foreach (PaymentMethod paymentMethod in paymentMethods) { CheckBox cbRestrict = row.FindControl(String.Format("cbRestrict_{0}", paymentMethod.PaymentMethodId)) as CheckBox; HiddenField hfCountryId = row.FindControl(String.Format("hfCountryId_{0}", paymentMethod.PaymentMethodId)) as HiddenField; if (cbRestrict == null || hfCountryId == null) { return; } int countryId = Int32.Parse(hfCountryId.Value); if (cbRestrict.Checked) { PaymentMethodManager.CreatePaymentMethodCountryMapping(paymentMethod.PaymentMethodId, countryId); } else { if (PaymentMethodManager.DoesPaymentMethodCountryMappingExist(paymentMethod.PaymentMethodId, countryId)) { PaymentMethodManager.DeletePaymentMethodCountryMapping(paymentMethod.PaymentMethodId, countryId); } } } } }
protected void BuildColumnsDynamically() { gvPaymentMethodCountryMap.Columns.Clear(); TemplateField tfAction = new TemplateField(); tfAction.ItemTemplate = new NopGridViewCustomTemplate(DataControlRowType.DataRow, "CountryName", "String"); tfAction.HeaderTemplate = new NopGridViewCustomTemplate(DataControlRowType.Header, GetLocaleResourceString("Admin.PaymentMethodsFilterControl.Grid.CountryName"), "String"); gvPaymentMethodCountryMap.Columns.Add(tfAction); StringBuilder scriptBuilder = new StringBuilder(); scriptBuilder.Append("$(document).ready(function() {"); foreach (PaymentMethod paymentMethod in PaymentMethodManager.GetAllPaymentMethods(null, false)) { TemplateField tf = new TemplateField(); tf.ItemTemplate = new NopGridViewCustomTemplate(DataControlRowType.DataRow, "Restrict", "Checkbox", paymentMethod.PaymentMethodId); tf.HeaderTemplate = new NopGridViewCustomTemplate(DataControlRowType.Header, paymentMethod.Name, "String", paymentMethod.PaymentMethodId); gvPaymentMethodCountryMap.Columns.Add(tf); scriptBuilder.AppendFormat("$('.cbSelectAll_{0} input').bind('click', function() {{ $('.cbRestrict_{0} input').each(function() {{ this.checked = $('.cbSelectAll_{0} input')[0].checked; }}) }});", paymentMethod.PaymentMethodId); //scriptBuilder.AppendFormat("$('.cbRestrict_{0} input').bind('click', function() {{ if (this.checked == false) $('.cbSelectAll_{0} input')[0].checked = false; }});", paymentMethod.PaymentMethodId); } scriptBuilder.Append("});"); string script = scriptBuilder.ToString(); Page.ClientScript.RegisterClientScriptBlock(GetType(), script.GetHashCode().ToString(), script, true); }
public JsonResult Save(PaymentMethodViewModel model) { int saveIndex = 0; PaymentMethod paymentMethod = new PaymentMethod(); paymentMethod.PaymentMethodId = model.PaymentMethodId; paymentMethod.ServiceId = model.ServiceId; paymentMethod.PatientId = model.PatientId; paymentMethod.Charge = model.Charge; paymentMethod.DiscountAmount = model.DiscountAmount; paymentMethod.Paid = model.Paid; paymentMethod.Date = model.Date; paymentMethod.PaymentType = model.PaymentType; paymentMethod.CreatedDate = model.CreatedDate; paymentMethod.LastPaidDate = model.LastPaidDate; paymentMethod.TotalCharge = paymentMethod.Charge - paymentMethod.DiscountAmount; paymentMethod.Due = paymentMethod.TotalCharge - paymentMethod.Paid; saveIndex = model.PaymentMethodId == 0 ? PaymentMethodManager.Save(paymentMethod) : PaymentMethodManager.Edit(paymentMethod); return(Reload(saveIndex)); }
protected void btnPaypalExpress_Click(object sender, EventArgs e) { if ((NopContext.Current.User == null) || (NopContext.Current.User.IsGuest && !CustomerManager.AnonymousCheckoutAllowed)) { string loginURL = SEOHelper.GetLoginPageUrl(true); Response.Redirect(loginURL); } var payPalExpress = new PayPalExpressPaymentProcessor(); var ppePaymentMethod = PaymentMethodManager.GetPaymentMethodBySystemKeyword("PayPalExpress"); if (ppePaymentMethod != null && ppePaymentMethod.IsActive) { //apply reward points CheckoutPaymentMethodControl checkoutPaymentMethodControl = CommonHelper.FindControlRecursive <CheckoutPaymentMethodControl>(this.Page.Controls); if (checkoutPaymentMethodControl != null) { checkoutPaymentMethodControl.ApplyRewardPoints(); } //payment var cart = ShoppingCartManager.GetCurrentShoppingCart(ShoppingCartTypeEnum.ShoppingCart); decimal?cartTotal = ShoppingCartManager.GetShoppingCartTotal(cart, ppePaymentMethod.PaymentMethodId, NopContext.Current.User); if (cartTotal.HasValue && cartTotal.Value > decimal.Zero) { string expressCheckoutURL = payPalExpress.SetExpressCheckout(cartTotal.Value, CommonHelper.GetStoreLocation(false) + "paypalexpressreturn.aspx", CommonHelper.GetStoreLocation(false)); Response.Redirect(expressCheckoutURL); } } }
public AccountingRuleManager(User pUser) : base(pUser) { _accountManager = new AccountManager(pUser); _loanProductManager = new LoanProductManager(pUser); _savingProductManager = new SavingProductManager(pUser); _economicActivityManager = new EconomicActivityManager(pUser); _fundingLineManager = new FundingLineManager(pUser); _currencyManager = new CurrencyManager(pUser); _paymentMethodManager = new PaymentMethodManager(pUser); }
protected void DeleteButton_Click(object sender, EventArgs e) { try { PaymentMethodManager.DeletePaymentMethod(this.PaymentMethodId); Response.Redirect("PaymentMethods.aspx"); } catch (Exception exc) { ProcessException(exc); } }
// // GET: /PaymentMethod/ public ActionResult Index(PaymentMethodViewModel model) { model.Patients = PatientManager.GetAllPatient(); model.Services = ServiceManager.GetAllService(); var totalrecords = 0; model.PaymentMethods = PaymentMethodManager.GetAllPaymentbyPaging(out totalrecords, model).Where(x => (x.Date >= model.FromDate || model.FromDate == null) && (x.Date <= model.ToDate || model.ToDate == null)).ToList(); model.TotalCharge = model.Charge - model.DiscountAmount; model.TotalRecords = totalrecords; return(View(model)); }
protected void btnNextStep_Click(object sender, EventArgs e) { if (Page.IsValid) { try { PayPalExpressPaymentProcessor payPalExpress = new PayPalExpressPaymentProcessor(); string token = CommonHelper.QueryString("token"); PaypalPayer payer = payPalExpress.GetExpressCheckout(token); if (string.IsNullOrEmpty(payer.PayerID)) { throw new NopException("Payer ID is not set"); } PaymentInfo paymentInfo = new PaymentInfo(); PaymentMethod paypalExpressPaymentMethod = PaymentMethodManager.GetPaymentMethodBySystemKeyword("PayPalExpress"); paymentInfo.PaymentMethodId = paypalExpressPaymentMethod.PaymentMethodId; paymentInfo.BillingAddress = NopContext.Current.User.BillingAddress; paymentInfo.ShippingAddress = NopContext.Current.User.ShippingAddress; paymentInfo.PaypalPayerId = payer.PayerID; paymentInfo.PaypalToken = token; paymentInfo.CustomerLanguage = NopContext.Current.WorkingLanguage; paymentInfo.CustomerCurrency = NopContext.Current.WorkingCurrency; int orderId = 0; string result = OrderManager.PlaceOrder(paymentInfo, NopContext.Current.User, out orderId); Order order = OrderManager.GetOrderById(orderId); if (!String.IsNullOrEmpty(result)) { lConfirmOrderError.Text = Server.HtmlEncode(result); btnNextStep.Visible = false; return; } else { PaymentManager.PostProcessPayment(order); } Response.Redirect("~/checkoutcompleted.aspx"); } catch (Exception exc) { LogManager.InsertLog(LogTypeEnum.OrderError, exc.Message, exc); lConfirmOrderError.Text = Server.HtmlEncode(exc.ToString()); btnNextStep.Visible = false; } } }
public JsonResult Delete(PaymentMethodViewModel model) { int deleteIndex = 0; try { deleteIndex = PaymentMethodManager.Delete(model.PaymentMethodId); } catch (Exception exception) { throw new Exception(exception.Message); } return(deleteIndex > 0 ? Reload() : ErroResult("Failed To Delete")); }
private Order getMerchantOrderByGoogleOrderID(string GoogleOrderID) { if (String.IsNullOrEmpty(GoogleOrderID)) { return(null); } PaymentMethod googleCheckoutPaymentMethod = PaymentMethodManager.GetPaymentMethodBySystemKeyword("GoogleCheckout"); if (googleCheckoutPaymentMethod == null) { return(null); } return(OrderManager.GetOrderByAuthorizationTransactionIdAndPaymentMethodId(GoogleOrderID, googleCheckoutPaymentMethod.PaymentMethodId)); }
public LoanManager(User pUser) : base(pUser) { _user = pUser; _userManager = new UserManager(pUser); _paymentMethodManager = new PaymentMethodManager(pUser); _packageManager = new LoanProductManager(pUser); _installmentTypeManagement = new InstallmentTypeManager(pUser); _installmentManagement = new InstallmentManager(pUser); _eventManagement = new EventManager(pUser); _fundingLineManager = new FundingLineManager(pUser); _projectManager = new ProjectManager(pUser, false); _clientManager = new ClientManager(pUser, false, false); _collateralProductManager = new CollateralProductManager(pUser); _economicActivityManager = new EconomicActivityManager(pUser); }
protected void btnNextStep_Click(object sender, EventArgs e) { if (Page.IsValid) { int paymentMethodID = this.SelectedPaymentMethodID; PaymentMethod paymentMethod = PaymentMethodManager.GetPaymentMethodByID(paymentMethodID); PaymentInfo pi = new PaymentInfo(); pi.PaymentMethodID = paymentMethodID; PaymentInfo = pi; if (paymentMethod != null && paymentMethod.IsActive) { NopContext.Current.User = CustomerManager.SetLastPaymentMethodID(NopContext.Current.User.CustomerID, paymentMethodID); Response.Redirect(string.Format("~/CheckoutConfirm.aspx{0}", Request["OrderId"] != null ? "?OrderId=" + Request["OrderId"] : "")); } } }
protected void Page_Load(object sender, EventArgs e) { PaymentMethod googleCheckoutPaymentMethod = PaymentMethodManager.GetPaymentMethodBySystemKeyword("GoogleCheckout"); if (googleCheckoutPaymentMethod == null || !googleCheckoutPaymentMethod.IsActive) { this.Visible = false; return; } NopSolutions.NopCommerce.BusinessLogic.Orders.ShoppingCart Cart = ShoppingCartManager.GetCurrentShoppingCart(ShoppingCartTypeEnum.ShoppingCart); if (Cart.Count == 0) { this.Visible = false; return; } }
protected void Page_Load(object sender, EventArgs e) { PaymentMethod payPalExpressPaymentMethod = PaymentMethodManager.GetPaymentMethodBySystemKeyword("PayPalExpress"); if (payPalExpressPaymentMethod == null || !payPalExpressPaymentMethod.IsActive) { this.Visible = false; return; } Cart = ShoppingCartManager.GetCurrentShoppingCart(ShoppingCartTypeEnum.ShoppingCart); if (Cart.Count == 0) { this.Visible = false; return; } }
private void CreateChildControlsTree() { PaymentMethod paymentMethod = PaymentMethodManager.GetPaymentMethodById(this.PaymentMethodId); if (paymentMethod != null) { Control child = null; try { child = base.LoadControl(paymentMethod.ConfigureTemplatePath); this.ConfigureMethodHolder.Controls.Add(child); } catch (Exception) { } } }
protected void AddButton_Click(object sender, EventArgs e) { if (Page.IsValid) { try { PaymentMethod paymentMethod = PaymentMethodManager.InsertPaymentMethod(txtName.Text, txtVisibleName.Text, txtDescription.Text, txtConfigureTemplatePath.Text, txtUserTemplatePath.Text, txtClassName.Text, txtSystemKeyword.Text, cbActive.Checked, txtDisplayOrder.Value); Response.Redirect("PaymentMethodDetails.aspx?PaymentMethodID=" + paymentMethod.PaymentMethodID.ToString()); } catch (Exception exc) { ProcessException(exc); } } }
private static void StartPaymentMethod(IndividualOrderCollection indOrders, Order order) { PaymentMethod pm = PaymentMethodManager.GetPaymentMethodByID(order.PaymentMethodID); if (pm.ClassName.Equals("Nop.Payment.WebPay.WebPayPaymentProcessor, Nop.Payment.WebPay")) { var webPayMethod = new Nop.Payment.WebPay.WebPayPaymentProcessor(); webPayMethod.PostProcessPayment(order, indOrders); } else if (pm.ClassName.Equals("Nop.Payment.Assist.AssistPaymentProcessor, Nop.Payment.Assist")) { var assistPaymentProcessor = new Nop.Payment.Assist.AssistPaymentProcessor(); assistPaymentProcessor.PostProcessPayment(order, indOrders, NopContext.Current.User); } else { PaymentManager.PostProcessPayment(order); } }
protected void BuildColumnsDynamically() { gvPaymentMethodCountryMap.Columns.Clear(); TemplateField tfAction = new TemplateField(); tfAction.ItemTemplate = new NopGridViewCustomTemplate(DataControlRowType.DataRow, "CountryName", "String"); tfAction.HeaderTemplate = new NopGridViewCustomTemplate(DataControlRowType.Header, GetLocaleResourceString("Admin.PaymentMethodsFilterControl.Grid.CountryName"), "String"); gvPaymentMethodCountryMap.Columns.Add(tfAction); PaymentMethodCollection paymentMethodCollection = PaymentMethodManager.GetAllPaymentMethods(null, false); foreach (PaymentMethod paymentMethod in paymentMethodCollection) { TemplateField tf = new TemplateField(); tf.ItemTemplate = new NopGridViewCustomTemplate(DataControlRowType.DataRow, "Restrict", "Checkbox", paymentMethod.PaymentMethodId); tf.HeaderTemplate = new NopGridViewCustomTemplate(DataControlRowType.Header, paymentMethod.Name, "String"); gvPaymentMethodCountryMap.Columns.Add(tf); } }
private void BindData() { PaymentMethod paymentMethod = PaymentMethodManager.GetPaymentMethodById(this.PaymentMethodId); if (paymentMethod != null) { this.txtName.Text = paymentMethod.Name; this.txtVisibleName.Text = paymentMethod.VisibleName; this.txtDescription.Text = paymentMethod.Description; this.txtConfigureTemplatePath.Text = paymentMethod.ConfigureTemplatePath; this.txtUserTemplatePath.Text = paymentMethod.UserTemplatePath; this.txtClassName.Text = paymentMethod.ClassName; this.txtSystemKeyword.Text = paymentMethod.SystemKeyword; this.cbActive.Checked = paymentMethod.IsActive; this.txtDisplayOrder.Value = paymentMethod.DisplayOrder; } else { Response.Redirect("PaymentMethods.aspx"); } }
private void ctrl_DataBinding(Object sender, EventArgs e) { WebControl ctrl = sender as WebControl; GridViewRow row = ctrl.NamingContainer as GridViewRow; switch (_dataType) { case "String": object RawValue = DataBinder.Eval(row.DataItem, _columnName); (ctrl as Label).Text = RawValue.ToString(); break; case "Checkbox": PaymentMethodCountryMappingHelperClass map1 = row.DataItem as PaymentMethodCountryMappingHelperClass; PaymentMethod pm = PaymentMethodManager.GetPaymentMethodById(_paymentMethodId); if (pm != null) { switch (pm.PaymentMethodType) { case PaymentMethodTypeEnum.Unknown: case PaymentMethodTypeEnum.Standard: { (ctrl as CheckBox).Checked = map1.Restrict[_paymentMethodId]; } break; case PaymentMethodTypeEnum.Button: { (ctrl as CheckBox).Enabled = false; (ctrl as CheckBox).Text = "n/a"; } break; default: break; } } break; } }
protected void SaveButton_Click(object sender, EventArgs e) { if (Page.IsValid) { try { var paymentMethod = PaymentMethodManager.GetPaymentMethodById(this.PaymentMethodId); if (paymentMethod != null) { paymentMethod = PaymentMethodManager.UpdatePaymentMethod(paymentMethod.PaymentMethodId, txtName.Text, txtVisibleName.Text, txtDescription.Text, txtConfigureTemplatePath.Text, txtUserTemplatePath.Text, txtClassName.Text, txtSystemKeyword.Text, cbHidePaymentInfoForZeroOrders.Checked, cbActive.Checked, txtDisplayOrder.Value); var configureModule = GetConfigureModule(); if (configureModule != null) { configureModule.Save(); } CustomerActivityManager.InsertActivity( "EditPaymentMethod", GetLocaleResourceString("ActivityLog.EditPaymentMethod"), paymentMethod.Name); Response.Redirect(string.Format("PaymentMethodDetails.aspx?PaymentMethodID={0}&TabID={1}", paymentMethod.PaymentMethodId, this.GetActiveTabId(this.PaymentTabs))); } else { Response.Redirect("PaymentMethods.aspx"); } } catch (Exception exc) { ProcessException(exc); } } }
private void BindData() { PaymentMethod paymentMethod = PaymentMethodManager.GetPaymentMethodById(this.PaymentMethodId); if (paymentMethod != null) { this.txtName.Text = paymentMethod.Name; this.txtVisibleName.Text = paymentMethod.VisibleName; this.txtDescription.Text = paymentMethod.Description; this.txtConfigureTemplatePath.Text = paymentMethod.ConfigureTemplatePath; this.txtUserTemplatePath.Text = paymentMethod.UserTemplatePath; this.txtClassName.Text = paymentMethod.ClassName; this.txtSystemKeyword.Text = paymentMethod.SystemKeyword; this.cbHidePaymentInfoForZeroOrders.Checked = paymentMethod.HidePaymentInfoForZeroOrders; this.cbActive.Checked = paymentMethod.IsActive; this.txtDisplayOrder.Value = paymentMethod.DisplayOrder; try { lblCanCapture.Text = PaymentManager.CanCapture(this.PaymentMethodId) ? GetLocaleResourceString("Admin.Common.Yes") : GetLocaleResourceString("Admin.Common.No"); lblCanRefund.Text = PaymentManager.CanRefund(this.PaymentMethodId) ? GetLocaleResourceString("Admin.Common.Yes") : GetLocaleResourceString("Admin.Common.No"); lblCanPartiallyRefund.Text = PaymentManager.CanPartiallyRefund(this.PaymentMethodId) ? GetLocaleResourceString("Admin.Common.Yes") : GetLocaleResourceString("Admin.Common.No"); lblCanVoid.Text = PaymentManager.CanVoid(this.PaymentMethodId) ? GetLocaleResourceString("Admin.Common.Yes") : GetLocaleResourceString("Admin.Common.No"); lblSupportRecurringPayments.Text = CommonHelper.ConvertEnum(PaymentManager.SupportRecurringPayments(this.PaymentMethodId).ToString()); } catch (Exception exc) { Debug.WriteLine(exc.ToString()); lblCanCapture.Text = "Unknown"; lblCanRefund.Text = "Unknown"; lblCanPartiallyRefund.Text = "Unknown"; lblCanVoid.Text = "Unknown"; lblSupportRecurringPayments.Text = "Unknown"; } } else { Response.Redirect("PaymentMethods.aspx"); } }
public EventManager(User pUser) : base(pUser) { _paymentMethodManager = new PaymentMethodManager(pUser); }
public LoanManager(string pTestDb) : base(pTestDb) { _user = User.CurrentUser; _userManager = new UserManager(pTestDb); _packageManager = new LoanProductManager(pTestDb); _installmentTypeManagement = new InstallmentTypeManager(pTestDb); _installmentManagement = new InstallmentManager(pTestDb); _eventManagement = new EventManager(pTestDb); _fundingLineManager = new FundingLineManager(pTestDb); _collateralProductManager = new CollateralProductManager(pTestDb); _paymentMethodManager = new PaymentMethodManager(pTestDb); _economicActivityManager = new EconomicActivityManager(pTestDb); }
public EventManager(string testDb) : base(testDb) { _paymentMethodManager = new PaymentMethodManager(testDb); }
public LoanManager(string pTestDb, User pUser) : base(pTestDb) { _user = pUser; _userManager = new UserManager(pTestDb, _user); _packageManager = new LoanProductManager(pTestDb); _installmentTypeManagement = new InstallmentTypeManager(pTestDb); _installmentManagement = new InstallmentManager(pTestDb); _eventManagement = new EventManager(pTestDb); _fundingLineManager = new FundingLineManager(pTestDb); _clientManager = new ClientManager(pTestDb); _collateralProductManager = new CollateralProductManager(pTestDb); _paymentMethodManager = new PaymentMethodManager(pTestDb, pUser); }