コード例 #1
0
 public ActionResult PremineLandUseEdit(int PermitKey, int Id)
 {
     PremineLandUseDO PMLU = PremineLandUseBLL.GetByID(Id);
     PremineLandUseVM model = new PremineLandUseVM(PMLU);
     return PartialView("PremineLandUseAddEdit", model);
 }
コード例 #2
0
        public ActionResult PremineLandUseEdit(int PermitKey, PremineLandUseVM model)
        {
            if (!ModelState.IsValid)
                return PartialView("PremineLandUseAddEdit", model);

            try
            {
                PremineLandUseDO data = model.WriteDataToTables();
                PremineLandUseBLL.Save(data);
                AjaxResult result = new AjaxResult(AjaxResult.AjaxStatus.OK, "Premine Land Use was saved");
                return Json(result);
            }
            catch (Exception ex)
            {
                AjaxResult result = new AjaxResult(AjaxResult.AjaxStatus.ERROR, ex.Message);
                return Json(result);
            }
        }
コード例 #3
0
 public ActionResult PremineLandUseAdd(int PermitKey)
 {
     PremineLandUseDO PMLU = new PremineLandUseDO();
     PremineLandUseVM model = new PremineLandUseVM(PMLU);
     model.PermitKey = PermitKey;
     return PartialView("PremineLandUseAddEdit", model);
 }