Exemple #1
0
        public JsonResult SuppUnsuppDUNS(string Parameters)
        {
            string referenceName = string.Empty;
            string AuthToken     = string.Empty;
            bool   isSuprressed  = false;

            if (!string.IsNullOrEmpty(Parameters))
            {
                Parameters    = StringCipher.Decrypt(Parameters.Replace(Utility.Utility.urlseparator, "+"), General.passPhrase);
                referenceName = Utility.Utility.SplitParameters(Parameters, Utility.Utility.Colonseparator, 0, 1);
                isSuprressed  = Convert.ToBoolean(Utility.Utility.SplitParameters(Parameters, Utility.Utility.Colonseparator, 1, 1));
                AuthToken     = Utility.Utility.SplitParameters(Parameters, Utility.Utility.Colonseparator, 2, 1);
            }
            Utility.Utility utility = new Utility.Utility();
            utility.SuppressUnSupressRegistration(referenceName, !isSuprressed, AuthToken);
            SettingFacade fac = new SettingFacade(this.CurrentClient.ApplicationDBConnectionString);

            //Suprressed and Unsuprressed DUNS
            fac.SuppressUnSupressNotifications(referenceName, !isSuprressed);
            return(Json(new { result = true, message = CommonMessagesLang.msgSuccess }, JsonRequestBehavior.AllowGet));
        }