/// <summary> /// /// </summary> /// <param name="strUserID"></param> /// <returns></returns> public string GetSpgateEx(string strUserID) { string strSpgates = string.Empty; DataSet ds = dal.GetSpgateEx(strUserID, out strSpgates); string[] strArray = strSpgates.Split(','); Hashtable powerDt = new Hashtable(); for (int i = 0; i < strArray.Length; i++) { powerDt.Add(strArray[i], 1); } int iCount = ds.Tables[0].Rows.Count; ds.Tables[0].Columns.Add("checked"); foreach (DataRow row in ds.Tables[0].Rows) { if (powerDt.Contains(row["id"].ToString())) { row["checked"] = 1; } else { row["checked"] = 0; } row["text"] = row["text"].ToString() + ReturnPortString(row["gatetype"].ToString()) + "[" + row["id"] + "]"; } ds.Tables[0].Columns.Remove("gatetype"); Hashtable hashDt = new Hashtable(); hashDt.Add(3, 1); return(JSonClass.DataTableToJson(ds.Tables[0], hashDt)); }
/// <summary> /// 获取设置权限处的值 /// </summary> /// <param name="strUserID"></param> /// <param name="iParentID"></param> /// <returns></returns> public string GetTreeNodeEx(string strUserID, int iParentID) { string strPower = ""; DataSet ds = dal.GetTreeNodeEx(strUserID, iParentID, out strPower); string[] strArray = strPower.Split(','); Hashtable powerDt = new Hashtable(); for (int i = 0; i < strArray.Length; i++) { powerDt.Add(strArray[i], 1); } int iCount = ds.Tables[0].Rows.Count; foreach (DataRow row in ds.Tables[0].Rows) { if (powerDt.Contains(row["id"].ToString())) { row["checked"] = 1; } else { row["checked"] = 0; } } Hashtable hashDt = new Hashtable(); hashDt.Add(1, 1); hashDt.Add(2, 1); hashDt.Add(4, 1); hashDt.Add(6, 1); hashDt.Add(7, 1); return(JSonClass.DataTableToJson(ds.Tables[0], hashDt)); }
public string GetMapScriptFields(string strMapID) { DataSet ds = dal.GetSelectMapScript(strMapID); string strJson = "{success:true,data:"; strJson += JSonClass.DataTableToJson(ds.Tables[0]) + "}"; return(strJson); }
public string GetPhoneSectionFields() { DataSet ds = dal.GetPhoneSection(); string strJson = "{success:true,data:"; strJson += JSonClass.DataTableToJson(ds.Tables[0]) + "}"; return(strJson); }
/// <summary> /// 返回管理员JSON数据 /// </summary> /// <param name="strUserID"></param> /// <returns></returns> public string GetSelectManager(string strUserID) { DataSet ds = dal.GetSelectManager(strUserID); ds.Tables[0].Columns.Remove("ManagerPwd"); string strJson = "{success:true,data:"; strJson += JSonClass.DataTableToJson(ds.Tables[0]) + "}"; return(strJson); }
public string GetTreeNode(string strUserID, int iParentID) { DataSet ds = dal.GetTreeNode(strUserID, iParentID); Hashtable hashDt = new Hashtable(); hashDt.Add(1, 1); hashDt.Add(2, 1); hashDt.Add(4, 1); hashDt.Add(6, 1); return(JSonClass.DataTableToJson(ds.Tables[0], hashDt)); }
/// <summary> /// /// </summary> /// <param name="strSpgate"></param> /// <returns></returns> public string GetSpgateFields(string strSpgate) { DataSet ds = dal.GetSpgateFields(strSpgate); if (ds.Tables[0].Rows.Count > 0) { string strJson = "{success:true,data:"; strJson += JSonClass.DataTableToJson(ds.Tables[0]) + "}"; return(strJson); } else { return("{success:true,errorInfo:'无此通道数据'}"); } }