public JsonResult Update(TB_FUsers classUsers) { var Result = DB.TB_FUsers.SingleOrDefault(item => item.ID == classUsers.ID); Result.FirstName = classUsers.FirstName; Result.LastName = classUsers.LastName; Result.FatherName = classUsers.FatherName; Result.NationalID = classUsers.NationalID; Result.Sex = classUsers.Sex; Result.BirthDate = classUsers.BirthDate; Result.Email = classUsers.Email; Result.MobileNo = classUsers.MobileNo; Result.Username = classUsers.Username; Result.Password = classUsers.Password; Result.MarriageStatus = classUsers.MarriageStatus; DB.SaveChanges(); return(Json(true, JsonRequestBehavior.AllowGet)); }
public JsonResult Save(TB_FUsers classUsers) { DB.TB_FUsers.Add(classUsers); DB.SaveChanges(); return(Json(true, JsonRequestBehavior.AllowGet)); }