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();
     }
 }    
示例#2
0
 public IActionResult Edit(HostingPlan hostingPlan)
 {
     if (ModelState.IsValid)
     {
         _work.HostingPlan.Update(hostingPlan);
         _work.Complete();
         return(PartialView("_Edit", hostingPlan));
     }
     return(PartialView("_Edit", hostingPlan));
 }
示例#3
0
        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);
        }
示例#4
0
 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));
 }
示例#5
0
 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();
     }
 }
示例#8
0
        public IActionResult CreateView()
        {
            HostingPlan hostingplan = new HostingPlan();

            return(PartialView("_Create", hostingplan));
        }