Пример #1
0
        public ActionResult Delete(string domain)
        {
            if (ModelState.IsValid)
            {
                var blackListDomain = new eBlackListedDomainM();

                if (!string.IsNullOrEmpty(domain))
                {
                    //company.iActionBy = ((OneFineRateBLL.BL_Login.UserDetails)Session["UserDetails"]).iUserId;
                    blackListDomain.iActionBy   = 11;
                    blackListDomain.sDomainName = domain;
                }

                var result = BL_BlackListedDomainM.DeleteBlackListDomain(blackListDomain);

                if (result.Key == -1)
                {
                    return(Json(new { status = false, Msg = result.Value }, JsonRequestBehavior.AllowGet));
                }
                else if (result.Key == 1)
                {
                    return(Json(new { status = true, Msg = result.Value }, JsonRequestBehavior.AllowGet));
                }
            }

            return(Json(new { status = false, Msg = "An error occured while deleting the record, Kindly try after some time." }, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public ActionResult ToggleStatus(string sDomainName, bool status)
        {
            if (ModelState.IsValid)
            {
                var result = BL_BlackListedDomainM.ToggleStatus(sDomainName, status);

                if (result.Key == -1)
                {
                    return(Json(new { status = false, Msg = result.Value }, JsonRequestBehavior.AllowGet));
                }
                else if (result.Key == 1)
                {
                    return(Json(new { status = true, Msg = result.Value }, JsonRequestBehavior.AllowGet));
                }
            }

            return(Json(new { status = false, Msg = "An error occured while deleting the record, Kindly try after some time." }, JsonRequestBehavior.AllowGet));
        }
Пример #3
0
        public ActionResult AddUpdateBlackListDomain(eBlackListedDomainM domain)
        {
            if (ModelState.IsValid)
            {
                domain.sActionType = "A";
                domain.iActionBy   = ((OneFineRateBLL.BL_Login.UserDetails)Session["UserDetails"]).iUserId;
                //domain.iActionBy = 11;

                var result = BL_BlackListedDomainM.AddEditBlacklistDomain(domain);

                if (result.Key == -1)
                {
                    return(Json(new { status = false, Msg = result.Value }, JsonRequestBehavior.AllowGet));
                }
                else if (result.Key == 1)
                {
                    return(Json(new { status = true, Msg = result.Value }, JsonRequestBehavior.AllowGet));
                }
            }

            return(Json(new { status = false, Msg = "An error occured while adding the record, Kindly try after some time." }, JsonRequestBehavior.AllowGet));
        }