Пример #1
0
        /// <summary>
        /// 获取所有的机组信息列表【目录】
        /// </summary>
        /// <returns></returns>
        public string GetAllJZId()
        {
            SelectorHelper shelper = new SelectorHelper();

            string    sql    = "SELECT * FROM `web`.`机组表`";
            DataTable dTable = data.GetTable(sql);

            for (int i = 0; i < dTable.Rows.Count; i++)
            {
                string name = dTable.Rows[i]["机组编号"].ToString();
                if (i == 0)
                {
                    shelper.AddItem(name, name, true);
                }
                else
                {
                    shelper.AddItem(name, name, false);
                }
            }
            return(shelper.ToString());
        }
Пример #2
0
        /// <summary>
        /// 获取所有专家名【目录】
        /// </summary>
        /// <returns>用户信息列表的json字符串形式</returns>
        public string GetAllZJUName()
        {
            SelectorHelper shelper = new SelectorHelper();

            string    sql    = "SELECT * FROM `web`.`用户表` where 角色名称='专家'";
            DataTable dTable = data.GetTable(sql);

            for (int i = 0; i < dTable.Rows.Count; i++)
            {
                string name = dTable.Rows[i]["用户名"].ToString();
                if (i == 0)
                {
                    shelper.AddItem(name, name, true);
                }
                else
                {
                    shelper.AddItem(name, name, false);
                }
            }
            return(shelper.ToString());
        }
Пример #3
0
        /// <summary>
        /// 获取部分机组信息列表【目录】
        /// </summary>
        /// <returns></returns>
        public string GetJZ(string jt, string gc)
        {
            SelectorHelper shelper = new SelectorHelper();

            string    sql    = "SELECT * FROM `web`.`机组表` where 集团名称='" + jt + "' and 工厂名称='" + gc + "'";
            DataTable dTable = data.GetTable(sql);

            for (int i = 0; i < dTable.Rows.Count; i++)
            {
                string name = dTable.Rows[i]["工厂名称"].ToString();
                if (i == 0)
                {
                    shelper.AddItem(name, name, true);
                }
                else
                {
                    shelper.AddItem(name, name, false);
                }
            }
            return(shelper.ToString());
        }
Пример #4
0
        /// <summary>
        /// 获取某个集团所有的工厂信息列表【目录】
        /// </summary>
        /// <param name="name">集团名称</param>
        /// <returns></returns>
        public string GetGC(string name)
        {
            SelectorHelper shelper = new SelectorHelper();

            string    sql    = "SELECT * FROM `web`.`工厂表` where 集团名称='" + name + "'";
            DataTable dTable = data.GetTable(sql);

            for (int i = 0; i < dTable.Rows.Count; i++)
            {
                string n = dTable.Rows[i]["工厂名称"].ToString();
                if (i == 0)
                {
                    shelper.AddItem(n, n, true);
                }
                else
                {
                    shelper.AddItem(n, n, false);
                }
            }
            return(shelper.ToString());
        }