62,272
社区成员
发帖
与我相关
我的任务
分享 @using (Html.BeginForm())
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<div class="form-horizontal">
@Html.HiddenFor(model => model.Id)
@Html.HiddenFor(model => model.CreateBy)
<fieldset>
<legend>SOA项</legend>
<div class="form-group">
<input type="button" id="btn_AddSOA" class="btn btn-success" style="float:right;margin-right:20px" data-toggle="modal" data-target="#myModal_soa" value="添加SOA模板" />
</div>
<div class="form-group">
@Html.LabelFor(model => model.Name, new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.TextBoxFor(model => model.Name, new { @class="form-control"})
@Html.ValidationMessageFor(model => model.Name)
</div>
[HttpPost]
[ValidateInput(false)]
public ActionResult Edit([Bind(Include = "Id,SOAType,SOAUrl,SOAString,,SOAJson,Name,ItemType,Environment,Content,Description")] SOAWorkItem soaworkitem)
{
if (ModelState.IsValid)
{
LogHelper.WriteInfoLog("Edit2-"+soaworkitem.Name + "," + soaworkitem.SOAString);
db.Entry(soaworkitem).State = EntityState.Modified;
db.SaveChanges();
return RedirectToAction("Index");
}
return View(soaworkitem);
}