public ActionResult NonComplianceSuspension(NonComplianceVM model)
        {
            model.Validate(ModelState, false);

            if (!ModelState.IsValid)
                return PartialView("NonComplianceAddEdit", model);

            try
            {
                NonComplianceDO data = model.GetDataObject();
                NonComplianceBLL.Save(data);
                AjaxResult result = new AjaxResult(AjaxResult.AjaxStatus.OK, "Suspension was saved");
                return Json(result);
            }
            catch (Exception ex)
            {
                AjaxResult result = new AjaxResult(AjaxResult.AjaxStatus.ERROR, ex.Message);
                return Json(result);
            }
        }
        /// <summary>
        /// provides the form for the popup for creating non compliance suspensions
        /// </summary>
        /// <param name="PermitKey"></param>
        /// <returns></returns>
        public ActionResult NonComplianceSuspension(int PermitKey)
        {
            NonComplianceVM model = new NonComplianceVM();
            model.NonComplianceTypeID = "Non-Compliance-Suspensions or Revocations";
            model.PermitKey = PermitKey;

            return PartialView("NonComplianceAddEdit", model);
        }
        /// <summary>
        /// provides the form for the popup for creating non compliance bond forfeitures
        /// </summary>
        /// <param name="PermitKey"></param>
        /// <returns></returns>
        public ActionResult NonComplianceBondForfeiture(int PermitKey)
        {
            NonComplianceVM model = new NonComplianceVM();
            model.NonComplianceTypeID = "Non-Compliance Bond Forfeiture";
            model.PermitKey = PermitKey;

            return PartialView("NonComplianceAddEdit", model);
        }
        public ActionResult NonComplianceBondForfeiture(int PermitKey, NonComplianceVM model)
        {
            if (!ModelState.IsValid)
                return PartialView("NonComplianceAddEdit", model);

            try
            {
                NonComplianceDO data = model.GetDataObject();
                NonComplianceBLL.Save(data);
                AjaxResult result = new AjaxResult(AjaxResult.AjaxStatus.OK, "Bond Forfeiture was saved");
                return Json(result);
            }
            catch (Exception ex)
            {
                AjaxResult result = new AjaxResult(AjaxResult.AjaxStatus.ERROR, ex.Message);
                return Json(result);
            }
        }
 public ActionResult EditSuspension(int PermitKey, int Id)
 {
     NonComplianceBO bo = NonComplianceBLL.GetNonCompliance(Id);
     NonComplianceVM model = new NonComplianceVM(bo);
     return PartialView("NonComplianceAddEdit", model);
 }