Esempio n. 1
0
        } // model 전체 검색

        public void Proc_req_model_select(string[] receive_data_division, ref NetworkStream stream)
        {
            List <DB_TBL_MODEL> Model = new List <DB_TBL_MODEL>();

            DB_MGR.Model_Select(ref Model);
            string send_data = null;

            foreach (DB_TBL_MODEL ee in Model)
            {
                if (receive_data_division[3] == ee.Model_Id)
                {
                    send_data = ee.Model_Id + "," + ee.Model_Temp + "," + ee.Model_Humidity + "," + ee.Model_Aname;
                }
            }
            byte[] Response_Data = Encoding.Default.GetBytes(send_data);
            stream.Write(Response_Data, 0, Response_Data.Length);
        } // model 선택 검색
Esempio n. 2
0
        } // user 선택 삭제

        public void Proc_req_model_all_select(string[] receive_data_division, ref NetworkStream stream)
        {
            List <DB_TBL_MODEL> Model = new List <DB_TBL_MODEL>();

            DB_MGR.Model_Select(ref Model);
            int    a         = 0;
            string send_data = null;

            foreach (DB_TBL_MODEL ee in Model)
            {
                a++;
                if (Model.Count == a)
                {
                    send_data = send_data + ee.Model_Id + "," + ee.Model_Temp + "," + ee.Model_Humidity + "," + ee.Model_Aname;
                }
                else
                {
                    send_data = send_data + ee.Model_Id + "," + ee.Model_Temp + "," + ee.Model_Humidity + "," + ee.Model_Aname + ",\n";
                }
            }
            byte[] Response_Data = Encoding.Default.GetBytes(send_data);
            stream.Write(Response_Data, 0, Response_Data.Length);
        } // model 전체 검색