Exemple #1
0
 public ActionResult Update([FromBody] DoKhan c)
 {
     try
     {
         if (ModelState.IsValid)
         {
             dokhanRepo.Update(c);
             return(Json(c));
         }
     }
     catch (Exception ex)
     {
         ModelState.AddModelError(string.Empty, ex.Message);
     }
     return(View(c));
 }
Exemple #2
0
        public ActionResult Edit(int id)
        {
            DoKhan dokhan = dokhanRepo.GetById(id);

            return(Json(dokhan));
        }