public string GetXmlStoreData(string id) { DataTable dt = proxy.GetTemplate(id); string json = DataConverterHelper.ToJson(dt, dt.Rows.Count); return(json); }
public string GetAccList(string svrName) { DBConnectionStringBuilder dbbuilder = new DBConnectionStringBuilder(); string result; string pubConnStr = dbbuilder.GetMainConnStringElement(svrName, out result); //string sql = "select ucode,uname from ngusers order by ucode "; string sql = "select dbname,uname from ngusers order by ucode "; DataTable dt = NG3.Data.Service.DbHelper.GetDataTable(pubConnStr, sql); foreach (DataRow dr in dt.Rows) { //dr["uname"] = dr["ucode"].ToString() + "-" + dr["uname"].ToString(); dr["uname"] = dr["dbname"].ToString() + "-" + dr["uname"].ToString(); } //Ajax.WriteRaw(dt.ToJSON("ucode", "uname")); string str = DataConverterHelper.ToJson(dt, dt.Rows.Count); return(str); //return this.Json(str, JsonRequestBehavior.AllowGet); }
public string GetHrRightApplyPrintInfo(string billno) { DataTable dt = proxy.GetHrRightApplyPrintInfo(billno); int totalRecord = dt.Rows.Count; return(DataConverterHelper.ToJson(dt, totalRecord)); }
/// <summary> /// 获取数据; /// </summary> /// <returns></returns> public string GetSqlValue() { var sqlStr = System.Web.HttpContext.Current.Request.Params["sql"]; var sqlStrDt = System.Web.HttpContext.Current.Request.Params["sqldt"]; if (!string.IsNullOrEmpty(sqlStrDt)) { sqlStr = sqlStrDt; } DataTable dt = Fac.GetDataTable(sqlStr); if (!string.IsNullOrEmpty(sqlStrDt)) { /*此处返回DataTable的JSON串对象;*/ string json = DataConverterHelper.ToJson(dt, dt.Rows.Count); return(json); } else { string value = null; if (dt.Rows.Count > 0) { value = dt.Rows[0][0].ToString(); } if (value == string.Empty) { return("{status : \"fail\", value:\"" + string.Empty + "\"}"); } return("{status : \"ok\", value:\"" + value + "\"}"); } }
public string GetRoleInfo(string fillpsnid, string userid, string orgid, string billno) { DataTable dt = proxy.GetRoleInfo(fillpsnid, userid, orgid, billno); int totalRecord = dt.Rows.Count; return(DataConverterHelper.ToJson(dt, totalRecord)); }
public string GetSelectedData(string helpid, string codes, bool mode) { DataTable dt = proxy.GetSelectedData(helpid, codes, mode); string str = DataConverterHelper.ToJson(dt, dt.Rows.Count); return(str); }
public string GetDetailTableField(string masterId) { DataTable dt = proxy.GetDetailTableField(masterId); string json = DataConverterHelper.ToJson(dt, dt.Rows.Count); return(json); }
/// <summary> /// 获取方案分配grid列表 /// </summary> /// <returns></returns> public string GetUserSchemeAllocation() { string code = System.Web.HttpContext.Current.Request.Params["code"]; string name = System.Web.HttpContext.Current.Request.Params["name"]; string result = string.Empty; DataTable dt = new DataTable(); dt = proxy.GetUserSchemeAllocation(); if (!string.IsNullOrEmpty(code)) { DataRow[] drs = dt.Select("userno like '%" + code + "%'"); if (drs.Length > 0) { dt = drs.CopyToDataTable(); } } if (!string.IsNullOrEmpty(name)) { DataRow[] drs = dt.Select("username like '%" + name + "%'"); if (drs.Length > 0) { dt = drs.CopyToDataTable(); } } int totalRecord = dt != null ? dt.Rows.Count : 0; result = DataConverterHelper.ToJson(dt, totalRecord); return(result); }
public string GetEmpStatus() { DataTable tmpDT = proxy.GetDT("hr_base_enum a left join hr_epm_status_property b on a.ccode=b.ccode", "a.ccode,a.cname", "a.ctype='empstatus' and b.isuse='1'", "a.ccode"); string str = DataConverterHelper.ToJson(tmpDT, tmpDT.Rows.Count); return(str); }
public string GetEmpType() { DataTable tmpDT = proxy.GetDT("pr_emptype", "emptype,typename", "", "emptype"); string str = DataConverterHelper.ToJson(tmpDT, tmpDT.Rows.Count); return(str); }
/// <summary> /// 获取选项明细列表数据 /// </summary> public string GetGridList() { //string url = System.Web.HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) + "/i8/SUP/ShortcutMenu/GetShortcutKey"; //WebClient wc = new WebClient(); //Byte[] pageData = wc.DownloadData(url); //string shortcut = Encoding.UTF8.GetString(pageData); string json = string.Empty; string phid = System.Web.HttpContext.Current.Request.Params["phid"]; string limit = System.Web.HttpContext.Current.Request.Params["limit"]; string page = System.Web.HttpContext.Current.Request.Params["page"]; string type = System.Web.HttpContext.Current.Request.Params["type"];//判断是初始化还是选项设置界面 int pageSize = 20; int.TryParse(limit, out pageSize); int pageIndex = 0; int.TryParse(page, out pageIndex); int totalRecord = 0; DataTable dt = proxy.GetGridList(Convert.ToInt64(phid), pageSize, pageIndex, ref totalRecord, type); json = DataConverterHelper.ToJson(dt, totalRecord); return(json); }
public string GetPropertyUIInfo(string tablename, string bustype) { DataTable dt = proxy.GetPropertyUIInfo(tablename, bustype); string json = DataConverterHelper.ToJson(dt, dt.Rows.Count); return(json); }
public string GetRichQuery(string masterId) { DataTable dt = proxy.GetRichQuery(masterId); string json = DataConverterHelper.ToJson(dt, dt.Rows.Count); return(json); }
public string GetGridByBusTree(string busphid) { DataTable dt = proxy.GetGridByBusTree(busphid); string json = DataConverterHelper.ToJson(dt, dt.Rows.Count); return(json); }
/// <summary> /// 获取帮助列表; /// </summary> /// <returns></returns> public string GetHelpList() { string helpId = System.Web.HttpContext.Current.Request.Params["helpid"]; string limit = System.Web.HttpContext.Current.Request.Params["limit"]; string page = System.Web.HttpContext.Current.Request.Params["page"]; string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"]; //客户端的查询条件,json格式的; string outJsonQuery = System.Web.HttpContext.Current.Request.Params["outqueryfilter"]; //外部json查询条件, =value bool isAutoComplete = false; string clientQuery = System.Web.HttpContext.Current.Request.Params["query"]; //谷歌查询条件 if (!string.IsNullOrEmpty(clientJsonQuery)) //非谷歌,普通查询 { clientQuery = clientJsonQuery; //DataConverterHelper.BuildQuery(clientJsonQuery); } else { isAutoComplete = true; //谷歌查询 } int pageSize = 20; int.TryParse(limit, out pageSize); int pageIndex = 0; int.TryParse(page, out pageIndex); int totalRecord = 0; DataTable dt = Fac.GetHelpList(helpId, pageSize, pageIndex, ref totalRecord, clientQuery, isAutoComplete, outJsonQuery); string json = DataConverterHelper.ToJson(dt, totalRecord); return(json); }
public string GetMyDesktopGroup() { int totalRecord = 0; DataTable dt = proxy.GetMyDesktopGroup(ref totalRecord); string json = DataConverterHelper.ToJson(dt, totalRecord); return(json); }
public string GetLangInfo() { string sql = "select lang_key,lang_desc from ng3_use_lang"; DataTable dt = DbHelper.GetDataTable(sql); int totalRecord = dt.Rows.Count > 0 ? dt.Rows.Count : 0; return(DataConverterHelper.ToJson(dt, totalRecord)); }
public string GetGrid(string code, string suite) { int totalRecord = 0; DataTable dt = proxy.GetFuncIconGrid(code, suite, ref totalRecord); string json = DataConverterHelper.ToJson(dt, totalRecord); return(json); }
public string GetShortcutKey() { DataTable dt = proxy.GetShortcutKey(); int totalRecord = dt.Rows.Count; string json = DataConverterHelper.ToJson(dt, totalRecord); return(json); }
/// <summary> /// 获取用户查询面板自定义信息 /// </summary> /// <returns></returns> public string GetIndividualQueryPanelInfo() { string pageid = System.Web.HttpContext.Current.Request.Params["pageid"]; DataTable dt = proxy.GetIndividualQueryPanelInfo(pageid, AppInfoBase.OCode, AppInfoBase.LoginID); string str = DataConverterHelper.ToJson(dt, dt.Rows.Count); return(str); }
public string LoadDefaultOpenTabForMainFrame() { DataTable dt = proxy.LoadDefaultOpenTabForMainFrame(); int totalRecord = 0; string json = DataConverterHelper.ToJson(dt, totalRecord); return(json); }
public string GetRichQueryUIInfo() { string helpid = System.Web.HttpContext.Current.Request.Params["helpid"]; DataTable dt = proxy.GetRichQueryUIInfo(helpid, AppInfoBase.OCode, AppInfoBase.LoginID); string str = DataConverterHelper.ToJson(dt, dt.Rows.Count); return(str); }
public string GetMyDesktopNode(string index) { int totalRecord = 0; DataTable dt = proxy.GetMyDesktopNode(index, ref totalRecord); string json = DataConverterHelper.ToJson(dt, totalRecord); return(json); }
public string GetSysMaintainCall() { string clientJsonQuery = System.Web.HttpContext.Current.Request.Params["queryfilter"];//查询条件 DataTable dt = proxy.GetSysMaintainCall(clientJsonQuery); int totalRecord = dt.Rows.Count; return(DataConverterHelper.ToJson(dt, totalRecord)); }
public string GetColumnsInfo(string tname) { DataTable dt = proxy.GetColumnsInfo(tname); string json = DataConverterHelper.ToJson(dt, dt.Rows.Count); return(json); }
public string GetBusTables() { string busID = System.Web.HttpContext.Current.Request.Params["busid"]; DataTable dt = proxy.GetBusTables(busID); string json = DataConverterHelper.ToJson(dt, dt.Rows.Count); return(json); }
public string GetIndividualFormList(string bustype) { DataTable dt = proxy.GetIndividualFormList(bustype); string json = DataConverterHelper.ToJson(dt, dt.Rows.Count); return(json); }
public string GetOptionValue() { string phid = System.Web.HttpContext.Current.Request.Params["phid"]; DataTable dt = proxy.GetOptionValue(Convert.ToInt64(phid)); int totalRecord = dt.Rows.Count; string json = DataConverterHelper.ToJson(dt, totalRecord); return(json); }
/// <summary> /// 获取员工列表数据 /// </summary> /// <returns></returns> public string GetEmpList() { string limit = System.Web.HttpContext.Current.Request.Params["limit"]; string page = System.Web.HttpContext.Current.Request.Params["page"]; string sqlFilter = System.Web.HttpContext.Current.Request.Params["sqlfilter"]; //组件定义时传入的默认查询串 string searchTxt = System.Web.HttpContext.Current.Request.Params["searchtxt"]; //输入的查询串 string empstatus = System.Web.HttpContext.Current.Request.Params["empstatus"]; //员工状态 string emptype = System.Web.HttpContext.Current.Request.Params["emptype"]; //员工类型 string partMark = System.Web.HttpContext.Current.Request.Params["partmark"]; //显示兼职 string proyMark = System.Web.HttpContext.Current.Request.Params["proymark"]; //显示代理 string oCode = System.Web.HttpContext.Current.Request.Params["ocode"]; //当前节点 string leaf = System.Web.HttpContext.Current.Request.Params["leaf"]; //是否叶子节点 string relatIndex = System.Web.HttpContext.Current.Request.Params["relatindex"]; //节点关系索引 string and = " and ", assigntypeFilter = "assigntype is null or assigntype='0'"; if (string.IsNullOrEmpty(sqlFilter)) { and = ""; sqlFilter = ""; } if (!string.IsNullOrEmpty(searchTxt)) //查询串 { sqlFilter += and + searchTxt; and = " and "; } if (!string.IsNullOrEmpty(empstatus)) { sqlFilter += and + string.Format("hr_epm_main.empstatus='{0}'", empstatus); //员工状态 and = " and "; } if (!string.IsNullOrEmpty(emptype)) { sqlFilter += and + string.Format("hr_epm_main.emptype='{0}'", emptype); //员工类型 and = " and "; } if (!string.IsNullOrEmpty(partMark)) //显示兼职 { assigntypeFilter += " or assigntype='1'"; } if (!string.IsNullOrEmpty(proyMark)) //显示代理 { assigntypeFilter += " or assigntype='2'"; } sqlFilter += and + "(" + assigntypeFilter + ")"; int totalRecord = 0, pageSize = 20, pageIndex = 0; int.TryParse(limit, out pageSize); int.TryParse(page, out pageIndex); DataTable tmpDT = proxy.GetEmpList(sqlFilter, pageSize, pageIndex, ref totalRecord, oCode, leaf == "true", relatIndex); string str = DataConverterHelper.ToJson(tmpDT, totalRecord); return(str); }
public string GetCommonUseList(string helpid) { bool ormMode = System.Web.HttpContext.Current.Request.Params["ORMMode"] == "true" ? true : false; DataTable dt = proxy.GetCommonUseList(helpid, AppInfoBase.LoginID, AppInfoBase.OCode, ormMode); string str = DataConverterHelper.ToJson(dt, dt.Rows.Count); return(str); }