Ejemplo n.º 1
0
        // GET: Settings

        public ActionResult GetState(int Country)
        {
            ValueController ob1 = new ValueController();
            DataSet         ds  = ob1.GetState(Country);

            List <State> statelist = new List <State>();

            foreach (DataRow dr in ds.Tables[0].Rows)

            {
                statelist.Add(new State {
                    StateName = dr["StateName"].ToString(), StateId = Convert.ToInt32(dr["StateId"])
                });
            }

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