public PartialViewResult UpdateEducation(Models.Education e)
 {
     var edu = new Models.Education() { ID = e.ID, University = HttpUtility.UrlDecode(e.University), Faculty = HttpUtility.UrlDecode(e.Faculty), Department = HttpUtility.UrlDecode(e.Department), Date = HttpUtility.UrlDecode(e.Date) };
     var tblEdu = new TblEducation();
     tblEdu.Update(edu);
     return PartialView("_PartialEducation", tblEdu.GetAll());
 }
 public PartialViewResult RemoveEducation(int id)
 {
     var edu = new Models.Education() { ID = id };
     var tblEdu = new TblEducation();
     tblEdu.Delete(edu);
     return PartialView("_PartialEducation", tblEdu.GetAll());
 }
Ejemplo n.º 3
0
        public ActionResult Update(TblEducation p)
        {
            var values = db.TblEducations.Find(p.id);

            values.title      = p.title;
            values.subtitle   = p.subtitle;
            values.department = p.department;
            values.date       = p.date;
            values.gpa        = p.gpa;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 4
0
        public ActionResult Edit(TblEducation t)
        {
            var d = db.TblEducation.Find(t.Id);

            d.Title      = t.Title;
            d.Subtitle   = t.Subtitle;
            d.Date       = t.Date;
            d.Department = t.Department;
            d.GPA        = t.GPA;
            db.SaveChanges();

            return(RedirectToAction("Index"));
        }
 public PartialViewResult GetEducations()
 {
     var tblEdu = new TblEducation();
     return PartialView("_PartialEducation", tblEdu.GetAll());
 }
Ejemplo n.º 6
0
 public ActionResult NewEducation(TblEducation p)
 {
     db.TblEducations.Add(p);
     db.SaveChanges();
     return(View());
 }
Ejemplo n.º 7
0
 public ActionResult Ekle(TblEducation p)
 {
     db.TblEducation.Add(p);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Ejemplo n.º 8
0
 public IActionResult Put(int id, [FromBody] TblEducation uEducation)
 {
     uEducation.Modifyer   = uEducation.Modifyer ?? "Someone";
     uEducation.ModifyDate = DateTime.Now;
     return(new JsonResult(this.repository.UpdateAsync(uEducation, id).Result, this.DefaultJsonSettings));
 }
Ejemplo n.º 9
0
 public IActionResult Post([FromBody] TblEducation nEducation)
 {
     nEducation.Creator    = nEducation.Creator ?? "Someone";
     nEducation.CreateDate = DateTime.Now;
     return(new JsonResult(this.repository.AddAsync(nEducation).Result, this.DefaultJsonSettings));
 }