public JsonResult ClearAllCachItem()
        {
            string Cky = HTNSession.CKy.ToString();

            HTNCache.ClearCacheItems(Cky);
            return(Json("success", JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public JsonResult InsertHdrPurchaseReq(string purReqHdr, string ObjKy)
        {
            int cky   = HTNSession.CKy;
            int usrKy = HTNSession.UsrKy;

            OrderNo OrdKy = apiOpr.InsertHdrPurchaseReq(HTNSession.Environment, cky, usrKy, Convert.ToInt32(ObjKy), purReqHdr);

            HTNCache.ClearCacheItems("OdrCode", "CKy-" + cky.ToString());
            return(Json(OrdKy, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        //  [HttpPost]
        public async Task <ActionResult> Insert(string updateGrid, string NewGridDetail) //string ItmTypKy) //List<ItmMasModel> list
        {
            int CKy   = HTNSession.CKy;
            int UsrKy = HTNSession.UsrKy;

            HTNCache.ClearCacheItems();
            //bool process = false;
            bool ItmKy = await Operation.InsertPOS(HTNSession.Environment, CKy, UsrKy, updateGrid, NewGridDetail);

            return(Json(ItmKy, JsonRequestBehavior.AllowGet));
        }
 public JsonResult ClearCachItem(string Key)
 {
     if (Key != null)
     {
         HTNCache.ClearCacheItems(Key);
         return(Json("success", JsonRequestBehavior.AllowGet));
     }
     else
     {
         return(Json("Can't Clear", JsonRequestBehavior.AllowGet));
     }
 }
예제 #5
0
        public JsonResult UpdateHdrPurchaseReq(string purReqUpdtHdr, string ObjKy)
        {
            int cky   = HTNSession.CKy;
            int usrKy = HTNSession.UsrKy;

            bool msg = apiOpr.UpdateHdrPurchaseReq(HTNSession.Environment, cky, usrKy, Convert.ToInt32(ObjKy), purReqUpdtHdr);

            if (msg)
            {
                HTNCache.ClearCacheItems("OdrCode", "CKy-" + cky.ToString());
            }
            return(Json(msg, JsonRequestBehavior.AllowGet));
        }
예제 #6
0
        public ActionResult Insert(string updateGrid, string NewGridDetail) //string ItmTypKy) //List<ItmMasModel> list
        {
            int CKy   = HTNSession.CKy;
            int UsrKy = HTNSession.UsrKy;

            //string AppCustmPath = WebConfigurationManager.AppSettings["AppCustmPath"];
            //string Path = AppCustmPath + fileName;
            HTNCache.ClearCacheItems();
            //bool process = false;
            bool ItmKy = Operation.InsertPOS(HTNSession.Environment, CKy, UsrKy, updateGrid, NewGridDetail);

            return(Json(ItmKy, JsonRequestBehavior.AllowGet));
        }
예제 #7
0
        public JsonResult UpdateAddressGrid(string updatedAdr)
        {
            int cKy   = HTNSession.CKy;
            int usrKy = HTNSession.UsrKy;

            bool msg = apiOpr.UpdateAddressGrid(HTNSession.Environment, cKy, usrKy, updatedAdr);

            if (msg)
            {
                HTNCache.ClearCacheItems("AdrID", "CKy:" + cKy.ToString());
                HTNCache.ClearCacheItems("AdrNm", "CKy:" + cKy.ToString());
            }
            return(Json(msg, JsonRequestBehavior.AllowGet));
        }
예제 #8
0
        public JsonResult AccMassInsertUpdate(string updateAccmacc, string newAccmacc, string AccKy)
        {
            var UsrKy = HTNSession.UsrKy;
            var CKy   = HTNSession.CKy;

            var AccMassInsertUpdate = apiOpr.AccMassInsertUpdate(HTNSession.Environment, CKy, UsrKy,
                                                                 newAccmacc, updateAccmacc);

            if (AccMassInsertUpdate)
            {
                HTNCache.ClearCacheItems("AccID", "CKy:" + CKy.ToString());
                HTNCache.ClearCacheItems("AccNm", "CKy:" + CKy.ToString());
            }
            return(Json(AccMassInsertUpdate, JsonRequestBehavior.AllowGet));
        }
예제 #9
0
        public ActionResult InsertandUpdateProjects(string updateAccmacc, string newAccmacc, string PrjTyp)
        {
            bool process = false;
            int  cky     = HTNSession.CKy;
            int  UsrKy   = HTNSession.UsrKy;

            // Dont call each object from UI controller, Change the code to datalayer in API
            //foreach (CdMas model in list)
            //{
            process = operation.InsertandUpdateProjects(HTNSession.Environment, updateAccmacc, newAccmacc, PrjTyp, cky, UsrKy);
            //}

            HTNCache.ClearCacheItems("PrjID", "CKy:" + cky.ToString());
            HTNCache.ClearCacheItems("PrjNm", "CKy:" + cky.ToString());

            return(Json(process, JsonRequestBehavior.AllowGet));
        }
예제 #10
0
        //public ActionResult InsertCode(List<CdMas> list, string ConCd)
        //{
        //    bool process = false;
        //    int cky = HTNSession.CKy;
        //    int UsrKy = HTNSession.UsrKy;

        //    // Dont call each object from UI controller, Change the code to datalayer in API
        //    //foreach (CdMas model in list)
        //    //{
        //    process = operation.InsertCode(HTNSession.Environment, list, ConCd, cky, UsrKy);
        //    //}
        //    return Json(process, JsonRequestBehavior.AllowGet);
        //}

        public ActionResult InsertUpdateCode(string updateAccmacc, string newAccmacc, string ConCd, string IsPrntChng, string objKy)
        {
            bool process = false;
            int  cky     = HTNSession.CKy;
            int  UsrKy   = HTNSession.UsrKy;

            // Dont call each object from UI controller, Change the code to datalayer in API
            //foreach (CdMas model in list)
            //{
            process = operation.InsertUpdateCode(HTNSession.Environment, updateAccmacc, newAccmacc, ConCd, cky, UsrKy, IsPrntChng, objKy);
            if (process)
            {
                HTNCache.ClearCacheItems(prifix.CdID.ToString(), "CKy:" + cky.ToString());
                HTNCache.ClearCacheItems(prifix.CdNm.ToString(), "CKy:" + cky.ToString());
                HTNCache.ClearCacheItems(prifix.BUCode.ToString(), "CKy:" + cky.ToString());
                HTNCache.ClearCacheItems(prifix.BUNm.ToString(), "CKy:" + cky.ToString());
            }
            //}
            return(Json(process, JsonRequestBehavior.AllowGet));
        }