protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { HostingPlan emp = new HostingPlan(); listAddOn = emp.GetAddOns(); this.GridView1.DataSource = listAddOn; this.GridView1.DataBind(); } }
public IActionResult Edit(HostingPlan hostingPlan) { if (ModelState.IsValid) { _work.HostingPlan.Update(hostingPlan); _work.Complete(); return(PartialView("_Edit", hostingPlan)); } return(PartialView("_Edit", hostingPlan)); }
private void LoadProductInfo() { // HostingPlan plan = StorefrontHelper.GetHostingPlan(ecPanelRequest.ResellerId, ecPanelRequest.ProductId); // litPlanName.Text = plan.ProductName; // litProductDesc.Text = plan.Description; // ctlPlanQuotas.PlanQuotas = StorefrontHelper.GetHostingPlanQuotas(ecPanelRequest.ResellerId, plan.PlanId); }
public IActionResult Create(HostingPlan hostingPlan) { if (ModelState.IsValid) { _work.HostingPlan.Add(hostingPlan); _work.Complete(); ModelState.Clear(); hostingPlan = new HostingPlan(); return(PartialView("_Create", hostingPlan)); } return(PartialView("_Create", hostingPlan)); }
public static HostingPlanModel ToHostingPlanModel(this HostingPlan obj) { return(new HostingPlanModel { ID = obj.ID, Description = obj.Description, Features = obj.Features.Select(x => x.ToFeatureModel()).ToList(), Name = obj.Name, Price = decimal.Round(obj.HostingPlansPrices.Select(x => x.Price).Min(), 2, MidpointRounding.AwayFromZero), Prices = obj.HostingPlansPrices.Select(x => x.ToHostingPlanPriceModel()).ToList() }); }
protected void ctlQuickPlans_OnPlanSelected(object sender, EventArgs e) { if (ctlQuickPlans.SelectedPlan > -1) { // ctlPlanCycles.Visible = true; // ctlPlanCycles.LoadHostingPlanCycles(ctlQuickPlans.SelectedPlan); // load plan HostingPlan s_plan = StorefrontHelper.GetHostingPlan(ecPanelRequest.ResellerId, ctlQuickPlans.SelectedPlan); // domain visibility ctlPlanDomain.DomainOption = s_plan.DomainOption; } }
protected void Page_Load(object sender, EventArgs e) { // if (!IsPostBack) { // load hosting plan to edit EditingPlan = StorehouseHelper.GetHostingPlan(ecPanelRequest.ProductId); // redirect back if plan is incorrect if (EditingPlan == null) { RedirectToBrowsePage(); } // LoadHostingPlansAvailable(); // LoadFormFieldsWithData(); } }
public IActionResult CreateView() { HostingPlan hostingplan = new HostingPlan(); return(PartialView("_Create", hostingplan)); }