public JsonResult GetDBMultiDBValues(SCADAFlow_MultiDataBaseView obj, PageInfo pageInfo) { try { if (obj.Connection != null) { DataSet set = new ScadaDBHelper(obj.Connection).Query(obj.SqlString); object obj2 = Pager.ScadaDataTablePaging(set.Tables[0].ToJson(), (long)set.Tables[0].Rows.Count, base.Request["elementId"].Trim()); return(Json(obj2, JsonRequestBehavior.AllowGet)); } return(Json(null, JsonRequestBehavior.AllowGet)); } catch (Exception exception) { return(Json(exception.Message, JsonRequestBehavior.AllowGet)); } }
public JsonResult GetDBSingleValues(SCADAFlow_SingleDataBaseValue dbvalue) { try { if (dbvalue.Connection != null) { SCADAFlow_SingleDataBaseValue value2 = dbvalue; DataSet set = new ScadaDBHelper(value2.Connection).Query(value2.SqlString); object obj2 = Pager.ScadaDataTablePaging(set.Tables[0].ToJson(), (long)set.Tables[0].Rows.Count, base.Request["elementId"].Trim()); return(Json(obj2, JsonRequestBehavior.AllowGet)); } else { return(Json(null, JsonRequestBehavior.AllowGet)); } } catch (Exception exception) { return(base.Json(exception.Message, JsonRequestBehavior.AllowGet)); } }