public JsonResult CustomerAllTypeJson() { List<CustomerType> list = new CustomerTypeRule().GetAllList(); var json = from ctype in list select new { id = ctype.ID, text = ctype.Name }; return Json(json, JsonRequestBehavior.AllowGet); }
public ActionResult GetMyChargeItem(string ID) { var showList = new CustomerTypeRule().GetMyChargeItem(ID); return Json(showList, JsonRequestBehavior.AllowGet); }
public ActionResult ModifyTypeToItem(string customerTypeID, string chargeItemArray) { AjaxResult result = new AjaxResult(); try { bool flag = new CustomerTypeRule().ModifyTypeToItem(customerTypeID, chargeItemArray); if (flag) { result.Success = true; result.Message = "缴费项设置成功。"; } else { throw new Exception("缴费项设置失败"); } } catch (Exception ex) { result.Success = false; result.Message = ex.Message; } return Json(result, JsonRequestBehavior.AllowGet); }
public ActionResult GetAllCustomerType(EasyUIGridParamModel param, CustomerType cType) { int itemCount = 0; List<dynamic> customerTypeList = new CustomerTypeRule().GetAllCustomerType(param, cType, out itemCount); var showList = from c in customerTypeList select new { ID = Convert.ToString(c.ID), NAME = c.NAME }; return Json(new { total = itemCount, rows = showList }, JsonRequestBehavior.AllowGet); }