// POST api/ExcuteOracle public string Post(ValueModelOracle value) { if (dicAppSet == null || dicAppSet.Count == 0) { general gn = new general(); dicAppSet = gn.ReadAppseting(); if (dicAppSet == null || dicAppSet.Count == 0) { return("{\"result\":\"ERROR\",\"data\":[{\"status\":\"Đọc appsetting lỗi\"}]}"); } } if (value == null || value.config == null) { return("{\"result\":\"ERROR\",\"data\":[{\"status\":\"Kiểm tra lại định dạng json đầu vào\"}]}"); } Db_Access ac = new Db_Access(); var check = ac.checkRequertLienTuc(HttpContext.Current, dicAppSet, value.config, value.para); if (!check) { return("{\"result\":\"ERROR\",\"data\":[{\"status\":\"Không cho phép request liên tục\"}]}"); } var json = ""; gnOracleXml orc = new gnOracleXml(); json = orc.ExcuteStores(value.config, value.para, dicAppSet); return(json); }
// POST api/ExcuteOracle public string Post(ValueModelOracle value) { if (dicAppSet == null || dicAppSet.Count == 0) { general gn = new general(); dicAppSet = gn.ReadAppseting(); if (dicAppSet == null || dicAppSet.Count == 0) { return("{\"result\":\"ERROR\",\"data\":[{\"status\":\"Đọc appsetting lỗi\"}]}"); } } if (value == null || value.config == null) { return("{\"result\":\"ERROR\",\"data\":[{\"status\":\"Kiểm tra lại định dạng json đầu vào\"}]}"); } Db_Access ac = new Db_Access(); var check = ac.checkRequertLienTuc(HttpContext.Current, dicAppSet, value.config, value.para); if (!check) { return("{\"result\":\"ERROR\",\"data\":[{\"status\":\"Không cho phép request liên tục\"}]}"); } //Db_Access_Cookie cook = new Db_Access_Cookie(); //HttpCookie cookie = HttpContext.Current.Request.Cookies["Cookie"]; //var checkCook = cook.checkCookie(cookie, dicAppSet, value.config); //var json = ""; //if (checkCook == "ERROR") //{ // return "{\"result\":\"CookieError\",\"data\":[]}"; //} //else //{ gnOracle orc = new gnOracle(); var json = orc.ExcuteStores(value.config, value.para, dicAppSet); // } return(json); }