Example #1
0
        public ActionResult IsStateExist(string id)
        {
            //id="country_name,country_id"
            string[] info      = id.Split(',');
            string   stateName = id;
            int      countryId = 0;
            int      stateId   = 0;

            if (info.Length == 3)
            {
                stateName = info[0];
                stateId   = info[1] != "" ? Convert.ToInt32(info[1]) : stateId;
                countryId = info[2] != "" ? Convert.ToInt32(info[2]) : countryId;
            }
            return(Json(stateUtil.GetStateByName(stateId, stateName, countryId) == null ? false : true));
        }