public JsonResult getAllrecodes() { var list = HTNCache.GetCacheItems(); string[] prefixlist = new string[] { "ItmID", "ItmNm", "PrjID", "PrjNm", "AccID", "AccNm", "AdrID", "AdrNm", "Code", "CdNm", "TskID", "TskNm", "BUCode", "BUNm", "ObjMas", "ObjMasObjSec" }; string CNm = HTNSession.CNm; string Cky = HTNSession.CKy.ToString(); List <CacheClear> finaloutput = new List <CacheClear>(); for (int i = 0; i < list.Count; i++) { var splitstr = list[i]; var str = splitstr.Split('-'); for (int j = 0; j < prefixlist.Length; j++) { if (prefixlist[j] == str[0]) { var checkobjky = str[1].Split(' '); var ckey = str[2].Split(':'); if (checkobjky[0] == "ObjKy") { var gettheobjky = checkobjky[1].Split(':'); if (Cky == ckey[1]) { finaloutput.Add(new CacheClear { Ky = splitstr, ComNm = str[0], Objky = gettheobjky[0], Cky = ckey[1], CNm = CNm }); } } else { var Checkprnky = checkobjky[1].Split(':'); if (Cky == ckey[1]) { finaloutput.Add(new CacheClear { Ky = splitstr, ComNm = str[0], PrntKy = Checkprnky[0], Cky = ckey[1], CNm = CNm }); } } } } } return(Json(finaloutput, JsonRequestBehavior.AllowGet)); }
public async Task <JsonResult> AccCd_SelectMob(int ObjKy, int TrnTypKy, int PreKy) { int CKy = HTNSession.CKy; int UsrKy = HTNSession.UsrKy; List <AccCd_SelectMob> list = new List <AccCd_SelectMob>(); string key = prefix.AccID + "-" + "ObjKy " + ObjKy.ToString() + ":" + TrnTypKy + PreKy + "-CKy:" + CKy + "-" + UsrKy.ToString(); var AccIDlist = HTNCache.GetCachedObject(key); if (AccIDlist != null) { list = (List <AccCd_SelectMob>)AccIDlist; } else { list = await apiOpr.AccCdNm_SelectMob(HTNSession.Environment, CKy, UsrKy, ObjKy, TrnTypKy, PreKy); HTNCache.SetCachedObject(key, list, 3600); } var newlist = HTNCache.GetCacheItems(); return(Json(list, JsonRequestBehavior.AllowGet)); }
public JsonResult GetCachelist() { var list = HTNCache.GetCacheItems(); return(Json(list, JsonRequestBehavior.AllowGet)); }