public ActionResult GetMotModelsByMarkaId(string MotMarkaId) { if (String.IsNullOrEmpty(MotMarkaId)) { throw new ArgumentNullException("MotMarkaId"); } int id = 0; bool isValid = Int32.TryParse(MotMarkaId, out id); MotorMarkaModel iss = new MotorMarkaModel(); using (motobulvarEntities ent = new motobulvarEntities()) { var models = iss.GetAllModelsByMarkaId(id); var result = (from i in models select new { id = i.Id, name = i.Model }).ToList(); return(Json(result, JsonRequestBehavior.AllowGet)); } }
public ActionResult GetSemtsByIlceId(string IlceId) { if (String.IsNullOrEmpty(IlceId)) { throw new ArgumentNullException("IlceId"); } int id = 0; bool isValid = Int32.TryParse(IlceId, out id); IlceSemt iss = new IlceSemt(); using (motobulvarEntities ent = new motobulvarEntities()) { var semts = iss.GetAllSemtsByIlceId(id); var result = (from i in semts select new { id = i.semtID, name = i.ad }).ToList(); return(Json(result, JsonRequestBehavior.AllowGet)); } }
public ActionResult GetPostaKodsByMahalleId(string MahalleId) { if (String.IsNullOrEmpty(MahalleId)) { throw new ArgumentNullException("MahalleId"); } int id = 0; bool isValid = Int32.TryParse(MahalleId, out id); IlceSemt iss = new IlceSemt(); using (motobulvarEntities ent = new motobulvarEntities()) { var postakods = iss.GetAllPostaKodsByByMahalleId(id); var result = (from i in postakods select new { id = i.pkID, name = i.kod }).ToList(); return(Json(result, JsonRequestBehavior.AllowGet)); } }
public ActionResult GetAltKategorisByKategoriId(string KategoriId) { if (String.IsNullOrEmpty(KategoriId)) { throw new ArgumentNullException("KategoriId"); } int id = 0; bool isValid = Int32.TryParse(KategoriId, out id); KategoriAltKategori iss = new KategoriAltKategori(); using (motobulvarEntities ent = new motobulvarEntities()) { var altKategoris = iss.GetAllAltKategorisByKategoriId(id); var result = (from i in altKategoris select new { id = i.Id, name = i.AltKategoriAdi }).ToList(); return(Json(result, JsonRequestBehavior.AllowGet)); } }