public string GetPlanDdl(ResellerClub.Interface.Messages.IDomainInfoMessage _dataItem)
        {
            DropDownList ddl = new DropDownList();

            ddl.ID = _dataItem.DomainName + "_plan";

            ParentBasePage.BindPlan(Plan.GetTopLevelDomainPlan(
                                        _dataItem.DomainName.Substring(_dataItem.DomainName.IndexOf('.'))), ref ddl);

            return(Util.RenderControl(ddl));
        }
Ejemplo n.º 2
0
        private void ProcessDomainSerachResult()
        {
            try
            {
                if (!ValidateDomainName(SessionM["UserEnteredDomain"].ToString()))
                {
                    DisplayError("Domain name entered by you contains some invalid character.");
                    return;
                }

                DomainSearchControl domainSearchControl = (DomainSearchControl)this.plhSearchControl.FindControl("domainSearchControl");
                var domain      = ApiObjectFactory.GetObject <ResellerClub.Interface.IDomain>();
                var list        = Plan.TopLevelDomainList;
                var domainLst   = domain.SearchDomain(SessionM["UserEnteredDomain"].ToString(), list);
                var pDomainInfo = domainLst.Find(x => x.DomainName == SessionM["UserEnteredDomain"].ToString() + SessionM["UserSelectedTDLs"].ToString());
                if (pDomainInfo != null)
                {
                    trDomainAvailable.Visible = true;
                    tdDomainName.InnerText    = SessionM["UserEnteredDomain"].ToString() + SessionM["UserSelectedTDLs"].ToString();
                    BindPlan(Plan.GetTopLevelDomainPlan(SessionM["UserSelectedTDLs"].ToString()), ref ddlPrimeDominPlan);

                    domainLst.Remove(pDomainInfo);
                    SessionM["domainLst"] = domainLst;
                    LoadAvailableDomainControl();
                    AvailableDomainList availableDomainList = (AvailableDomainList)this.plhSearchControl.FindControl("availableDomainList");
                    availableDomainList.BindData(domainLst);
                    plhSearchControl.Visible      = false;
                    trDisplaySearchResult.Visible = true;
                    divAmountStrip.Visible        = true;
                }
                else
                {
                    trDomainNotAvailable.Visible = true;
                }
            }
            catch (ServerException ex)
            {
                DisplayError("Server Error");
            }
        }