Beispiel #1
0
 public ActionResult DeleteChargeItemCategory(string ID)
 {
     AjaxResult actionResult = new AjaxResult();
     try
     {
         bool result = new ChargeItemCategoryRule().Delete(ID);
         if (result)
         {
             actionResult.Success = true;
             actionResult.Message = "删除成功";
             return Json(actionResult, JsonRequestBehavior.AllowGet);
         }
         else
         {
             actionResult.Success = false;
             actionResult.Message = "该分类下有子缴费项,不能删除";
             return Json(actionResult, JsonRequestBehavior.AllowGet);
         }
     }
     catch (Exception ex)
     {
         actionResult.Success = false;
         actionResult.Message = ex.Message;
         return Json(actionResult, JsonRequestBehavior.AllowGet);
     }
 }
Beispiel #2
0
 public ActionResult GetAllChargeItemCategory()
 {
     List<ChargeItemCategory> ChargeItemTypeList = new ChargeItemCategoryRule().GetAllList();
     var showList = from cType in ChargeItemTypeList
                    select new
                    {
                        id = cType.ID,
                        text = cType.Name
                    };
     return Json(showList, JsonRequestBehavior.AllowGet);
 }
Beispiel #3
0
 public ActionResult SearchChargeItemCategory(EasyUIGridParamModel param, ChargeItemCategory chargeItemType)
 {
     int itemCount = 0;
     List<dynamic> CategoryList = new ChargeItemCategoryRule().SearchChargeItemCategory(param, chargeItemType, out itemCount);
     var ShowList = from category in CategoryList
                    select new
                    {
                        ID = category.ID,
                        NAME = category.NAME
                    };
     return Json(new { total = itemCount, rows = ShowList }, JsonRequestBehavior.AllowGet);
 }