private ListItem CreateDomainCycleItem(DomainNameCycle cycleItem, bool transfer)
		{
			if (transfer)
				return new ListItem(
					String.Format("{0} - {1} {2:C} + {3} {4:C}",
						cycleItem.CycleName, EcommerceSettings.CurrencyCodeISO,
						cycleItem.TransferFee, EcommerceSettings.CurrencyCodeISO, cycleItem.SetupFee),
					cycleItem.CycleId.ToString()
				);
			else
				return new ListItem(
					String.Format("{0} - {1} {2:C} + {3} {4:C}",
						cycleItem.CycleName, EcommerceSettings.CurrencyCodeISO,
						cycleItem.RecurringFee, EcommerceSettings.CurrencyCodeISO, cycleItem.SetupFee),
					cycleItem.CycleId.ToString()
				);
		}
Esempio n. 2
0
 /// <remarks/>
 public void UpdateTopLevelDomainAsync(int userId, int productId, string topLevelDomain, string productSku, bool taxInclusive, int pluginId, bool enabled, bool whoisEnabled, DomainNameCycle[] domainCycles, object userState) {
     if ((this.UpdateTopLevelDomainOperationCompleted == null)) {
         this.UpdateTopLevelDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateTopLevelDomainOperationCompleted);
     }
     this.InvokeAsync("UpdateTopLevelDomain", new object[] {
                 userId,
                 productId,
                 topLevelDomain,
                 productSku,
                 taxInclusive,
                 pluginId,
                 enabled,
                 whoisEnabled,
                 domainCycles}, this.UpdateTopLevelDomainOperationCompleted, userState);
 }
        public static int UpdateTopLevelDomain(int userId, int productId, string topLevelDomain, string productSku, bool taxInclusive, int pluginId,
            bool enabled, bool whoisEnabled, DomainNameCycle[] domainCycles)
        {
            SecurityResult result = CheckAccountNotDemoAndActive();
            if (!result.Success)
                return result.ResultCode;

            XmlDocument xmldoc = new XmlDocument();
            // build plan cycles
            XmlElement dc_root = xmldoc.CreateElement("DomainCycles");
            for (int i = 0; i < domainCycles.Length; i++)
            {
                XmlElement elem = xmldoc.CreateElement("Cycle");
                elem.SetAttribute("ID", domainCycles[i].CycleId.ToString());
                elem.SetAttribute("SetupFee", domainCycles[i].SetupFee.ToString());
                elem.SetAttribute("RecurringFee", domainCycles[i].RecurringFee.ToString());
                elem.SetAttribute("TransferFee", domainCycles[i].TransferFee.ToString());
                elem.SetAttribute("SortOrder", i.ToString());
                dc_root.AppendChild(elem);
            }

            // add top level domain
            return EcommerceProvider.UpdateTopLevelDomain(SecurityContext.User.UserId, userId,
                productId, topLevelDomain, productSku, taxInclusive, pluginId, enabled, whoisEnabled, dc_root.OuterXml);
        }
Esempio n. 4
0
 /// <remarks/>
 public System.IAsyncResult BeginUpdateTopLevelDomain(int userId, int productId, string topLevelDomain, string productSku, bool taxInclusive, int pluginId, bool enabled, bool whoisEnabled, DomainNameCycle[] domainCycles, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("UpdateTopLevelDomain", new object[] {
                 userId,
                 productId,
                 topLevelDomain,
                 productSku,
                 taxInclusive,
                 pluginId,
                 enabled,
                 whoisEnabled,
                 domainCycles}, callback, asyncState);
 }
Esempio n. 5
0
 /// <remarks/>
 public void UpdateTopLevelDomainAsync(int userId, int productId, string topLevelDomain, string productSku, bool taxInclusive, int pluginId, bool enabled, bool whoisEnabled, DomainNameCycle[] domainCycles) {
     this.UpdateTopLevelDomainAsync(userId, productId, topLevelDomain, productSku, taxInclusive, pluginId, enabled, whoisEnabled, domainCycles, null);
 }
Esempio n. 6
0
 public int UpdateTopLevelDomain(int userId, int productId, string topLevelDomain, string productSku, bool taxInclusive, int pluginId, bool enabled, bool whoisEnabled, DomainNameCycle[] domainCycles) {
     object[] results = this.Invoke("UpdateTopLevelDomain", new object[] {
                 userId,
                 productId,
                 topLevelDomain,
                 productSku,
                 taxInclusive,
                 pluginId,
                 enabled,
                 whoisEnabled,
                 domainCycles});
     return ((int)(results[0]));
 }
Esempio n. 7
0
		public static int UpdateTopLevelDomain(int productId, string topLevelDomain, string productSku, 
			bool taxInclusive, int pluginId, bool enabled, bool whoisEnabled, DomainNameCycle[] domainCycles)
		{
			return EC.Services.Storehouse.UpdateTopLevelDomain(PanelSecurity.SelectedUserId,
				productId, topLevelDomain, productSku, taxInclusive, pluginId, enabled, whoisEnabled, domainCycles);
		}
		public void LoadDomainNameCycles(DomainNameCycle[] cycles)
		{
			// convert
			List<DomainNameCycle> data = new List<DomainNameCycle>();
			for (int i = 0; i < cycles.Length; i++)
				data.Add(cycles[i]);
			// save
			ViewState[VIEWSTATE_KEY] = data;
			// bind cycles
			BindDomainNameCycles();
		}
		private void AddBillingCycleToDomainName()
		{
			// sync entered data prior
			SyncGridViewDataEntered();

			// load selected billing cycle
			BillingCycle chosenCycle = StorehouseHelper.GetBillingCycle(Convert.ToInt32(ddlBillingCycles.SelectedValue));
			// convert billing to domain name cycle
			DomainNameCycle cycle = new DomainNameCycle();
			// fill fields
			cycle.CycleId = chosenCycle.CycleId;
			cycle.CycleName = chosenCycle.CycleName;
			cycle.BillingPeriod = chosenCycle.BillingPeriod;
			cycle.PeriodLength = chosenCycle.PeriodLength;
			// put into viewstate
			DomainBillingCycles.Add(cycle);

			// bind new domain cycles
			BindDomainNameCycles();

			// re-load billing cycles
			LoadBillingCyclesDDL();
		}
Esempio n. 10
0
		public int UpdateTopLevelDomain(int userId, int productId, string topLevelDomain, string productSku, bool taxInclusive, int pluginId,
			bool enabled, bool whoisEnabled, DomainNameCycle[] domainCycles)
		{
			return StorehouseController.UpdateTopLevelDomain(userId, productId, topLevelDomain, 
				productSku, taxInclusive, pluginId, enabled, whoisEnabled, domainCycles);
		}