Skip to content

Commit 6575d5d

Browse files
15th commit
İmplementing changes by updating
1 parent 53fceab commit 6575d5d

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

MvcCV/Controllers/AboutController.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ public ActionResult BringData(int id)
2323
var data = db.TBLABOUT.Find(id);
2424
return View("BringData", data);
2525
}
26-
26+
public ActionResult UpdateAbout(TBLABOUT alparslan)
27+
{
28+
var mustafa = db.TBLABOUT.Find(alparslan.ID);
29+
mustafa.NAME = alparslan.NAME;
30+
mustafa.SURNAME = alparslan.SURNAME;
31+
mustafa.PHONE = alparslan.PHONE;
32+
mustafa.MAIL = alparslan.MAIL;
33+
mustafa.ABOUT = alparslan.ABOUT;
34+
db.SaveChanges();
35+
return RedirectToAction("Index");
36+
37+
38+
}
2739
}
2840
}

MvcCV/Views/About/BringData.cshtml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
}
66

77

8-
@using (Html.BeginForm("Update", "About", FormMethod.Post))
8+
@using (Html.BeginForm("UpdateAbout", "About", FormMethod.Post))
99
{
1010
<div class="form-group">
1111
@Html.LabelFor(m => m.ID)
@@ -26,6 +26,9 @@
2626
@Html.LabelFor(m => m.MAIL)
2727
@Html.TextBoxFor(m => m.MAIL, new { @class = "form-control" })
2828
<br />
29+
@Html.LabelFor(m => m.ABOUT)
30+
@Html.TextAreaFor(m => m.ABOUT, new { @class = "form-control" })
31+
<br />
2932
<button class="btn btn-primary">Update</button>
3033
</div>
3134

0 commit comments

Comments
 (0)