public void BindServiceHistory(int serviceId) { // load hosting addon svc HostingAddonSvc addonSvc = StorehouseHelper.GetHostingAddonService(serviceId); // ecUtils.ToggleControls(addonSvc.Recurring, pnlAddonSvcHistory); // if (addonSvc.Recurring) { gvServiceHistory.DataSource = StorehouseHelper.GetServiceHistory(serviceId); gvServiceHistory.DataBind(); } }
public bool LoadServiceInfo(int serviceId) { EnsureChildControls(); try { // load hosting addon svc HostingAddonSvc addonSvc = StorehouseHelper.GetHostingAddonService(serviceId); if (addonSvc == null) { RedirectToBrowsePage(); } // ecUtils.ToggleControls(addonSvc.Recurring, pnlRecurringAddon); ecUtils.ToggleControls(!addonSvc.Recurring, pnlOneTimeAddon); ecUtils.ToggleControls(PanelSecurity.LoggedUser.Role != UserRole.User, pnlUsername); ltrServiceName.Text = addonSvc.ServiceName; ltrUsername.Text = addonSvc.Username; ltrServiceTypeName.Text = ecPanelFormatter.GetSvcItemTypeName(addonSvc.TypeId); ltrSvcSetupFee.Text = String.Concat(addonSvc.Currency, " ", addonSvc.SetupFee.ToString("C")); ltrSvcCreated.Text = addonSvc.Created.ToString(); ltrServiceStatus.Text = ecPanelFormatter.GetServiceStatusName(addonSvc.Status); if (addonSvc.Recurring) { ltrSvcCycleName.Text = addonSvc.CycleName; ltrSvcCyclePeriod.Text = String.Concat(addonSvc.PeriodLength, " ", addonSvc.BillingPeriod, "(s)"); ltrSvcRecurringFee.Text = String.Concat(addonSvc.Currency, " ", addonSvc.CyclePrice.ToString("C")); } else { ltrAddonSvcPrice.Text = String.Concat(addonSvc.Currency, " ", addonSvc.CyclePrice.ToString("C")); } } catch (Exception ex) { HostModule.ShowErrorMessage("LOAD_DOMAIN_NAME_SVC", ex); return(false); } return(true); }