private void CreateHostingPlan() { if (!Page.IsValid) { return; } try { string planName = ddlHostingPlans.SelectedItem.Text; string productSku = txtProductSku.Text.Trim(); bool taxInlcusive = chkTaxInclusive.Checked; string planDescription = txtHostingPlanDesc.Text.Trim(); bool enabled = Convert.ToBoolean(rblPlanStatus.SelectedValue); int planId = Convert.ToInt32(ddlHostingPlans.SelectedValue); int userRole = Convert.ToInt32(rblPlanIntendsFor.SelectedValue); int initialStatus = Convert.ToInt32(ddlInitialStatus.SelectedValue); int domainOption = Convert.ToInt32(ddlDomainOption.SelectedValue); HostingPlanCycle[] planCycles = ctlPlanCycles.GetHostingPlanCycles(); int[] planCategories = ctlAssignedCats.AssignedCategories; string[] planHighlights = ctlPlanHighlights.HighlightedItems.ToArray(); // create hosting plan int result = StorehouseHelper.AddHostingPlan( planName, productSku, taxInlcusive, planId, userRole, initialStatus, domainOption, enabled, planDescription, planCycles, planHighlights, planCategories ); if (result <= 0) { ShowResultMessage(result); return; } } catch (Exception ex) { ShowErrorMessage("HOSTING_PLAN_SAVE", ex); return; } RedirectToBrowsePage(); }