Ejemplo n.º 1
0
        public JsonResult GetState(string acctstat, int iCntry)
        {
            //clsSubmitModel oSubmit = new clsSubmitModel();
            DataTable dt;

            dt = oSubmit.GetState(acctstat, iCntry);
            var result = new List <KeyValuePair <string, string> >();

            foreach (DataRow dr in dt.Rows)
            {
                result.Add(new KeyValuePair <string, string>(dr["citycode"].ToString(), dr["cityname"].ToString()));
            }
            var result3 = result.Where(s => s.Value.ToLower().Contains(acctstat.ToLower())).Select(w => w).ToList();

            return(Json(result3, JsonRequestBehavior.AllowGet));
        }