예제 #1
0
        public ActionResult OIAltSearchOrbNumber(string Parameters)
        {
            //OI - Search Data(Support Search by webdomain, orb number, email, ein)(MP - 577)
            string Country = string.Empty, OrbNum = string.Empty;

            if (!string.IsNullOrEmpty(Parameters))
            {
                Parameters = StringCipher.Decrypt(Parameters.Replace(Utility.Utility.urlseparator, "+"), General.passPhrase);
                OrbNum     = Utility.Utility.SplitParameters(Parameters, Utility.Utility.Colonseparator, 0, 1);
                Country    = Utility.Utility.SplitParameters(Parameters, Utility.Utility.Colonseparator, 1, 1);
            }
            string ConnectionString = this.CurrentClient.ApplicationDBConnectionString;

            string[] hostParts            = new System.Uri(Request.Url.AbsoluteUri).Host.Split('.');
            string   SubDomain            = hostParts[0];
            OICleanseMatchViewModel model = new OICleanseMatchViewModel();

            model = APIUtility.GetOICleanseMatchResult("", "", "", "", "", Country, "", "", ConnectionString, SubDomain, null, "", OrbNum);
            if (model.oICleanseMatchOutputs == null && model.Error != null)
            {
                model.oICleanseMatchOutputs = new List <OICleanseMatchOutput>();
                ViewBag.ErrorMessage        = model.Error.ToString();
            }
            return(PartialView("~/Views/OI/OISearchData/_Index.cshtml", model));
        }
예제 #2
0
        public ActionResult Index(string CompanyName, string Address1, string Address2, string City, string State, string Country, string Zipcode, string Telephone)
        {
            OICleanseMatchViewModel model = new OICleanseMatchViewModel();

            if (!string.IsNullOrEmpty(CompanyName) && !string.IsNullOrEmpty(Country))
            {
                string   ConnectionString = this.CurrentClient.ApplicationDBConnectionString;
                string[] hostParts        = new System.Uri(Request.Url.AbsoluteUri).Host.Split('.');
                string   SubDomain        = hostParts[0];
                model = APIUtility.GetOICleanseMatchResult(CompanyName, Address1, Address2, City, State, Country, Zipcode, Telephone, ConnectionString, SubDomain);
                if (model.oICleanseMatchOutputs == null && model.Error != null)
                {
                    model.oICleanseMatchOutputs = new List <OICleanseMatchOutput>();
                    ViewBag.ErrorMessage        = model.Error.ToString();
                }
            }
            else
            {
                model.oICleanseMatchOutputs = new List <OICleanseMatchOutput>();
                ViewBag.ErrorMessage        = DandBSettingLang.msgInvadilState;
            }
            if (Request.IsAjaxRequest())
            {
                return(PartialView("~/Views/OI/OISearchData/_Index.cshtml", model));
            }
            else
            {
                return(PartialView("~/Views/OI/OISearchData/Index.cshtml", model));
            }
        }