public ActionResult ModifyWarehouse(WarehouseViewModel model) { if (ModelState.IsValid) { //创建数据 Warehouse data = new Warehouse(); data.Id = model.Id; data.Name = model.Name; data.IsLease = model.IsLease; data.Remark = model.Remark; //保存数据 string strErrText; DDSystem dd = new DDSystem(); if (dd.UpdateWarehouse(data, LoginAccountId, LoginStaffName, out strErrText)) { return Json(string.Empty); } else { return Json(strErrText); } } return View(model); }