public ActionResult FieldUSave(VFieldU m) { ShortTitle = "U"; SolverData sd = GetSolverData(); string[] fieldsToIgnore = { "BottomType", "TopType", "WestType", "EastType", "NorthType", "SouthType" }; var config = new DefaultMapConfig().IgnoreMembers<VFieldU, FieldU>(fieldsToIgnore); ObjectMapperManager.DefaultInstance.GetMapper<VFieldU, FieldU>(config).Map(m, sd.FieldU); SetSolverData(sd); if (Request.IsAjaxRequest()) return Json("OK"); return View(m); }
public ActionResult FieldU() { ShortTitle = "U"; var m = new VFieldU(); SolverData sd = GetSolverData(); ObjectMapperManager.DefaultInstance.GetMapper<FieldU, VFieldU>().Map(sd.FieldU, m); return View(m); }