public ActionResult TypeofMining(TypeOfMiningVM Model, int PermitKey) { if (!ModelState.IsValid) return View(Model); try { TypeAndMethodOfMiningPlanBO BO = Model.WriteDataToTables(); TypeAndMethodOfMiningBLL.SetTypeandMethodofMiningPlan(BO); AddSuccessMessage("Your changes have been saved"); } catch (Exception ex) { AddErrorMessage(ex); } Model.MiningEquipment = TypeAndMethodOfMiningBLL.GetTypeandMethodofMiningPlan(PermitKey).MiningEquipment; if (Model.MiningEquipment == null) Model.MiningEquipment = new List<MiningEquipmentDO>(); return View(Model); }
public ActionResult TypeofMining(int PermitKey) { TypeAndMethodOfMiningPlanBO BO = TypeAndMethodOfMiningBLL.GetTypeandMethodofMiningPlan(PermitKey); TypeOfMiningVM model = new TypeOfMiningVM(BO); return View(model); }