예제 #1
0
        /// <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));
        }
예제 #2
0
        public string GetMapScriptList(int iStart, int iLimit, string strMapName, int iType)
        {
            int     iTotalCount = 0;
            DataSet ds          = dal.GetMapScriptList(iStart, iLimit, strMapName, iType, ref iTotalCount);

            return(JSonClass.DataTableToJsonEx(ds.Tables[0], iTotalCount));
        }
예제 #3
0
        /// <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));
        }
예제 #4
0
        public string GetHistoryList(int iStart, int iLimit)
        {
            int     iTotalCount = 0;
            DataSet ds          = dal.GetHistoryList(iStart, iLimit, ref iTotalCount);

            return(JSonClass.DataTableToJsonEx(ds.Tables[0], iTotalCount));
        }
예제 #5
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public string GetManagerList(int iStart, int iLimit, int iType, string strUserID)
        {
            int     iTotalCount = 0;
            DataSet ds          = dal.GetList(iStart, iLimit, iType, strUserID, ref iTotalCount);

            return(JSonClass.DataTableToJsonEx(ds.Tables[0], iTotalCount));
        }
예제 #6
0
        public string GetLogList(int iStart, int iLimit, int iType, string strOptID, string strDate)
        {
            int     iTotalCount = 0;
            DataSet ds          = dal.GetLogList(iStart, iLimit, iType, strOptID, strDate, ref iTotalCount);

            return(JSonClass.DataTableToJsonEx(ds.Tables[0], iTotalCount));
        }
예제 #7
0
        /// <summary>
        /// 获取用户列表
        /// </summary>
        /// <param name="iStart"></param>
        /// <param name="iLimit"></param>
        /// <param name="strUserID"></param>
        /// <param name="strParentID"></param>
        /// <param name="iStatus"></param>
        /// <returns></returns>
        public string GetUserList(int iStart, int iLimit, string strUserID, string strParentID, int iStatus)
        {
            int     iTotalCount = 0;
            DataSet ds          = dal.GetUserList(iStart, iLimit, strUserID, strParentID, iStatus, ref iTotalCount);

            return(JSonClass.DataTableToJsonEx(ds.Tables[0], iTotalCount));
        }
예제 #8
0
        public string GetMapScriptFields(string strMapID)
        {
            DataSet ds      = dal.GetSelectMapScript(strMapID);
            string  strJson = "{success:true,data:";

            strJson += JSonClass.DataTableToJson(ds.Tables[0]) + "}";
            return(strJson);
        }
예제 #9
0
        public string GetPhoneSectionFields()
        {
            DataSet ds      = dal.GetPhoneSection();
            string  strJson = "{success:true,data:";

            strJson += JSonClass.DataTableToJson(ds.Tables[0]) + "}";
            return(strJson);
        }
예제 #10
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="strUserID"></param>
        /// <returns></returns>
        public string GetSpgate(string strUserID)
        {
            DataSet ds = dal.GetSpgate(strUserID);

            foreach (DataRow row in ds.Tables[0].Rows)
            {
                row["name"] = row["name"].ToString() + row["value"] + "[" + ReturnPortString(row["gatetype"].ToString()) + "]";
            }
            return(JSonClass.DataTableToJsonEx(ds.Tables[0], ds.Tables[0].Rows.Count));
        }
예제 #11
0
        /// <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);
        }
예제 #12
0
        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));
        }
예제 #13
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="iStart"></param>
        /// <param name="iLimit"></param>
        /// <param name="iType"></param>
        /// <param name="iBusiness"></param>
        /// <param name="strSpgate"></param>
        /// <returns></returns>
        public string GetSpgateList(int iStart, int iLimit, int iType, int iBusiness, string strSpgate)
        {
            int     iTotalCount = 0;
            DataSet ds          = dal.GetList(iStart, iLimit, iType, iBusiness, strSpgate, ref iTotalCount);
            //移除多余字段
            int iCount = ds.Tables[0].Columns.Count;

            for (int i = 16; i < iCount; i++)
            {
                ds.Tables[0].Columns.RemoveAt(16);
            }
            return(JSonClass.DataTableToJsonEx(ds.Tables[0], iTotalCount));
        }
예제 #14
0
        public string GetMapScriptList()
        {
            DataSet ds = dal.GetAllMapScriptList();

            if (ds.Tables[0].Rows.Count > 0)
            {
                string strRet = JSonClass.DataTableToJsonEx(ds.Tables[0], ds.Tables[0].Rows.Count);
                return(strRet);
            }
            else
            {
                return("{success:false,errorInfo:'无数据'}");
            }
        }
예제 #15
0
        /// <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:'无此通道数据'}");
            }
        }
예제 #16
0
        /// <summary>
        /// 得到最大ID
        /// </summary>
        public static string GetBusinessList()
        {
            DataSet ds = SmsServer.DAL.SmsBusiness.GetBusinessList();

            return(JSonClass.DataTableToJsonEx(ds.Tables[0], ds.Tables[0].Rows.Count));
        }