public virtual JsonResult UpdateModule(FormCollection frm) { string sPath = Request.QueryString["path"]; clsRequestInfo oRequestInfo = getRequestPathInfo(sPath); var cmd = new clsCmd(); webUtil.addParamFromPost(cmd, frm); if (!sPath.isEmpty()) { try { var result = getTier(oRequestInfo.appName).exec(oRequestInfo.Path, cmd); return(Json(new { msg = result.Message, data = result.Obj }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { msg = ex.Message, data = "" }, JsonRequestBehavior.AllowGet)); } } else { object n = null; return(Json(new { msg = "You have not specified [Module Name] and OperationName", data = n }, JsonRequestBehavior.AllowGet)); } }
public ContentResult getdataAll(FormCollection frm) { var cmd = new clsCmd(); webUtil.addParamFromPost(cmd, frm); string spath = Request.QueryString["path"]; clsRequestInfo oRequestInfo = getRequestPathInfo(spath); DataTable t = null; clsMsg result; if (oRequestInfo.Path.StartsWith("drp\\")) { result = getTier(oRequestInfo.appName).getDropDownData(oRequestInfo.Path.Substring(4), cmd); } else { result = getTier(oRequestInfo.appName).getData(oRequestInfo.Path, cmd); } t = result.Obj as DataTable; return(Content(Newtonsoft.Json.JsonConvert.SerializeObject(t), "application/json")); }
public ContentResult getdataPaging(FormCollection frm) { var cmd = new clsCmd(); webUtil.addParamFromPost(cmd, frm); string sPath = Request.QueryString["path"]; clsRequestInfo oRequestInfo = getRequestPathInfo(sPath); string sSortType = cmd.getStringValue("$sort"); if (cmd.ContainFields("$sort")) { cmd.Remove(cmd["$sort"]); } var result = getTier(oRequestInfo.appName).getData(oRequestInfo.Path, cmd); if (result.Validated) { //var t = _tier.getData(sPath, cmd).Obj as DataTable; DataTable t = result.Obj as DataTable; var tPaging = g.getJsonPaging(t, sSortType, start, length); return(Content(Newtonsoft.Json.JsonConvert.SerializeObject(tPaging), "application/json")); } else { var res = new { draw = draw, recordsTotal = 0, recordsFiltered = 0, data = "", error = true, error_msg = result.Message }; return(Content(Newtonsoft.Json.JsonConvert.SerializeObject(res), "application/json")); } }
public clsMsg exec(string sPath, clsCmd cmd) { clsRequestInfo oRequestInfo = getRequestPathInfo(sPath); return(getTier(oRequestInfo.appName).exec(oRequestInfo.Path, cmd)); }
private clsRequestInfo getRequestPathInfo(string sPath) { var oRequestPathInfo = new clsRequestInfo(AppName, sPath); return(oRequestPathInfo); }
public CRUD.clsCRUD getCRUD(string sCRUDName) { clsRequestInfo oRequestInfo = getRequestPathInfo(sCRUDName); return(getTier(oRequestInfo.appName).getCRUD(oRequestInfo.Path)); }
public clsMsg getDropDownData(string sPath, clsCmd cmd) { clsRequestInfo oRequestInfo = getRequestPathInfo(sPath); return(getTier(oRequestInfo.appName).getDropDownData(oRequestInfo.Path, cmd)); }
private clsRequestInfo getRequestPathInfo(string sPath) { var oRequestPathInfo = new clsRequestInfo(_sMainApp, sPath); return(oRequestPathInfo); }
public clsMsg getFileContent(string sPath, clsCmd cmd) { clsRequestInfo oRequestInfo = getRequestPathInfo(sPath); return(getTier(oRequestInfo.appName).getFileContent(oRequestInfo.Path, cmd)); }
public string getPath(string sPath) { clsRequestInfo oRequestInfo = getRequestPathInfo(sPath); return(getTier(oRequestInfo.appName).getPath(oRequestInfo.Path)); }
public sqlReport.SQLReportBase getSQLReport(string sPath, clsCmd cmd) { clsRequestInfo oRequestInfo = getRequestPathInfo(sPath); return(getTier(oRequestInfo.appName).getSQLReport(oRequestInfo.Path, cmd)); }
public adapter.clsDataAdapterBase getAdapter(string sKey = "") { clsRequestInfo oRequestInfo = getRequestPathInfo(sKey); return(getTier(oRequestInfo.appName).getAdapter(oRequestInfo.Path)); }