public JsonResult GetCkByCkid(string ckid) { T_CK ck = T_CKDomain.GetInstance().GetModelById(int.Parse(ckid)); string ckgly = (ck != null && ck.CKGLY != null) ? ck.CKGLY : ""; return(Json(JsonConvert.SerializeObject(new { CKGLY = ckgly }))); }
public JsonResult GetCK(string ckid) { T_CK ck = T_CKDomain.GetInstance().GetModelById(Convert.ToInt32(ckid)); if (ck != null) { string resultStr = JsonConvert.SerializeObject(new { CKGLY = ck.CKGLY }); return(Json(resultStr)); } else { return(Json("")); } }
public JsonResult GetKCInfo(int ckid, int cpid, string cpph) { var mlist = T_KCDomain.GetInstance().GetAllModels <int>(p => p.CKID == ckid && p.CPID == cpid && p.CPPH == cpph); if (mlist != null && mlist.Count > 0) { var mkc = mlist.First(); if (mkc != null) { string resultStr = JsonConvert.SerializeObject(new { CKGLY = mkc.T_CK.CKGLY, KCNUM = mkc.CPNUM }); return(Json(resultStr)); } } T_CK ck = T_CKDomain.GetInstance().GetModelById(ckid); if (ck != null) { string resultStr = JsonConvert.SerializeObject(new { CKGLY = ck.CKGLY, KCNUM = 0 }); return(Json(resultStr)); } return(Json("")); }