public ActionResult DosyaListeView(int id) { allTables at = new allTables(); at.depList = db.Departman.ToList(); at.personel = db.Personel.Where(x1 => x1.id == id).SingleOrDefault(); at.dosList = db.Dosyalar.Where(x1 => x1.PersonalId == id).ToList(); return(View(at)); }
// GET: Home public ActionResult Index() { allTables at = new allTables(); at.depList = db.Departman.ToList(); at.perList = db.Personel.ToList(); at.dosList = db.Dosyalar.ToList(); ViewBag.ListOfDepartment = new SelectList(at.depList, "Id", "DepartmanAdi"); return(View(at)); }
public JsonResult GetPersonelById(int id) { allTables model = new allTables(); model.personel = db.Personel.Where(x => x.id == id).SingleOrDefault(); model.departman = db.Departman.Where(x => x.Id == model.personel.DepartmanId).SingleOrDefault(); string value = string.Empty; value = JsonConvert.SerializeObject(model, Formatting.Indented, new JsonSerializerSettings { ReferenceLoopHandling = ReferenceLoopHandling.Ignore }); return(Json(value, JsonRequestBehavior.AllowGet)); }