import_niagara_tag更替
This commit is contained in:
		
							parent
							
								
									8b547da780
								
							
						
					
					
						commit
						6eb7f0aa66
					
				@ -1259,27 +1259,18 @@ namespace Backend.Controllers
 | 
				
			|||||||
        private async Task ResetDeviceGroup()
 | 
					        private async Task ResetDeviceGroup()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            //先刪除整個device_group
 | 
					            //先刪除整個device_group
 | 
				
			||||||
            var delete_group_sql = @"IF EXISTS(SELECT* FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[device_group]') AND type in (N'U'))
 | 
					            var delete_group_sql = @"DROP  TABLE IF EXISTS `device_group` ;
 | 
				
			||||||
                                    BEGIN
 | 
					                                    CREATE TABLE `device_group` (
 | 
				
			||||||
                                    DROP TABLE[dbo].[device_group]
 | 
					                                      `id` int(11) NOT NULL,
 | 
				
			||||||
                                    END
 | 
					                                      `device_disaster` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '災類',
 | 
				
			||||||
 | 
					                                      `device_building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備東別guid',
 | 
				
			||||||
                                    CREATE TABLE [dbo].[device_group](
 | 
					                                      `device_floor_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備樓層guid',
 | 
				
			||||||
                                        [id] [int] IDENTITY(1,1) NOT NULL,
 | 
					                                      `device_area_tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備區域',
 | 
				
			||||||
                                        [device_disaster] [varchar](50) NULL,
 | 
					                                      `device_system_category_layer2` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '系統大類device_system_tag',
 | 
				
			||||||
                                        [device_building_guid] [varchar](36) NULL,
 | 
					                                      `device_system_category_layer3` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '系統小類device_name_tag',
 | 
				
			||||||
                                        [device_floor_guid] [varchar](36) NULL,
 | 
					                                      `device_amount` int(11) NOT NULL DEFAULT '0' COMMENT '設備總計',
 | 
				
			||||||
                                        [device_system_category_layer2] [varchar](50) NULL,
 | 
					                                      PRIMARY KEY (`id`)
 | 
				
			||||||
                                        [device_system_category_layer3] [varchar](50) NULL,
 | 
					                                    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='設備類別 - UI 過濾用';";
 | 
				
			||||||
                                        [device_amount] [int] NOT NULL,
 | 
					 | 
				
			||||||
                                     CONSTRAINT [PK_device_group] PRIMARY KEY CLUSTERED 
 | 
					 | 
				
			||||||
                                    (
 | 
					 | 
				
			||||||
	                                    [id] ASC
 | 
					 | 
				
			||||||
                                    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
 | 
					 | 
				
			||||||
                                    )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                                    ALTER TABLE [dbo].[device_group] ADD  CONSTRAINT [DF_device_group_device_amount]  DEFAULT ((0)) FOR [device_amount]
 | 
					 | 
				
			||||||
                                    ";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            await backendRepository.ExecuteSql(delete_group_sql);
 | 
					            await backendRepository.ExecuteSql(delete_group_sql);
 | 
				
			||||||
            //更新整個device_group
 | 
					            //更新整個device_group
 | 
				
			||||||
 | 
				
			|||||||
@ -5,9 +5,11 @@
 | 
				
			|||||||
    <!--<add name="DBcs"
 | 
					    <!--<add name="DBcs"
 | 
				
			||||||
      connectionString="Data Source=210.65.10.150;Initial Catalog=STSP;Persist Security Info=True;User ID=sa;Password=jsene2wsx#EDC"
 | 
					      connectionString="Data Source=210.65.10.150;Initial Catalog=STSP;Persist Security Info=True;User ID=sa;Password=jsene2wsx#EDC"
 | 
				
			||||||
      providerName="System.Data.SqlClient" />-->
 | 
					      providerName="System.Data.SqlClient" />-->
 | 
				
			||||||
    <add name="dbConStr"
 | 
					    <!--<add name="dbConStr"
 | 
				
			||||||
     connectionString="Data Source=greencloud.fic.com.tw;Initial Catalog=taipei_dome;Persist Security Info=True;User ID=webuser;Password=FICadmin99"
 | 
					     connectionString="Data Source=192.168.0.201:33306;Initial Catalog=bims_mitsubishi;Persist Security Info=True;User ID=bims;Password=mjmdev_BIMS2022"
 | 
				
			||||||
     providerName="System.Data.SqlClient" /> 
 | 
					     providerName="MySql.Data.MySqlClient" />-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						  <add name="dbConStr" connectionString="server=192.168.0.201;user=bims;Database=bims_mitsubishi;Port=33306;password=mjmdev_BIMS2022;charset='utf8';pooling=true;sslmode=none;;Connection Timeout=6000" providerName="MySql.Data.MySqlClient" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  </connectionStrings>
 | 
					  </connectionStrings>
 | 
				
			||||||
</configuration>
 | 
					</configuration>
 | 
				
			||||||
@ -289,6 +289,27 @@ namespace tpDomeWinAPP.Models
 | 
				
			|||||||
        //public string result_value { get; set; }
 | 
					        //public string result_value { get; set; }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public class device_item8
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public string name { get; set; }
 | 
				
			||||||
 | 
					        public string value { get; set; }
 | 
				
			||||||
 | 
					        public string tag_name { get; set; }
 | 
				
			||||||
 | 
					        public string device_area_tag { get; set; }
 | 
				
			||||||
 | 
					        public string device_building_tag { get; set; }
 | 
				
			||||||
 | 
					        public string device_system_tag { get; set; }
 | 
				
			||||||
 | 
					        public string device_name_tag { get; set; }
 | 
				
			||||||
 | 
					        public string device_floor_tag { get; set; }
 | 
				
			||||||
 | 
					        public string device_master_tag { get; set; }
 | 
				
			||||||
 | 
					        public string device_last_name_tag { get; set; }
 | 
				
			||||||
 | 
					        public string device_serial_tag { get; set; }
 | 
				
			||||||
 | 
					        public string point_name { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        //public string result_value { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public class dbDevice
 | 
					    public class dbDevice
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        public string device_guid { get; set; }
 | 
					        public string device_guid { get; set; }
 | 
				
			||||||
 | 
				
			|||||||
@ -9,11 +9,22 @@ namespace tpDomeWinAPP.Models
 | 
				
			|||||||
        public int id { get; set; }
 | 
					        public int id { get; set; }
 | 
				
			||||||
        public string db_tags { get; set; }
 | 
					        public string db_tags { get; set; }
 | 
				
			||||||
        public string niagara_tags { get; set; }
 | 
					        public string niagara_tags { get; set; }
 | 
				
			||||||
        public string building { get; set; }
 | 
					        public string device_area_tag { get; set; }
 | 
				
			||||||
        public string system_code1 { get; set; }
 | 
					        public string device_building_tag { get; set; }
 | 
				
			||||||
        public string floor { get; set; }
 | 
					        public string device_system_tag { get; set; }
 | 
				
			||||||
        public string system_code2 { get; set; }
 | 
					        public string device_name_tag { get; set; }
 | 
				
			||||||
        public string device_serial { get; set; }  
 | 
					        public string device_floor_tag { get; set; }
 | 
				
			||||||
 | 
					        public string device_master_tag { get; set; }
 | 
				
			||||||
 | 
					        public string device_last_name_tag { get; set; }
 | 
				
			||||||
 | 
					        public string device_serial_tag { get; set; }  
 | 
				
			||||||
        public string atDateTime { get; set; }
 | 
					        public string atDateTime { get; set; }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public class NiagaraTagsForItem
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        public string device_area_tag { get; set; }
 | 
				
			||||||
 | 
					        public string device_building_tag { get; set; }
 | 
				
			||||||
 | 
					        public string device_system_tag { get; set; }
 | 
				
			||||||
 | 
					        public string device_name_tag { get; set; }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -251,7 +251,7 @@ namespace tpDomeWinAPP.Service
 | 
				
			|||||||
                    //1.2.更新欄位 device_number_old
 | 
					                    //1.2.更新欄位 device_number_old
 | 
				
			||||||
                    sb.Append($@" update device set device_system_tag_old = b.tagName
 | 
					                    sb.Append($@" update device set device_system_tag_old = b.tagName
 | 
				
			||||||
	                                from (select device_number, device_number_old, serial, tagName
 | 
						                                from (select device_number, device_number_old, serial, tagName
 | 
				
			||||||
		                                from dbo.device a  CROSS APPLY [Func_StringSplit](a.device_number, '_') 
 | 
							                                from device a  CROSS APPLY [Func_StringSplit](a.device_number, '_') 
 | 
				
			||||||
		                                where serial = 2 and device_system_tag_old is null)b
 | 
							                                where serial = 2 and device_system_tag_old is null)b
 | 
				
			||||||
	                                where device.device_number_old = b.device_number_old and device_system_tag_old is null");
 | 
						                                where device.device_number_old = b.device_number_old and device_system_tag_old is null");
 | 
				
			||||||
                    conn.Execute(sb.ToString());
 | 
					                    conn.Execute(sb.ToString());
 | 
				
			||||||
@ -307,7 +307,7 @@ namespace tpDomeWinAPP.Service
 | 
				
			|||||||
                        #region update  niagara_tags
 | 
					                        #region update  niagara_tags
 | 
				
			||||||
                        sb.Clear();
 | 
					                        sb.Clear();
 | 
				
			||||||
                        sb.Append($@"update import_dbTag_niagaraTag set niagaraTag = b.niagara_tags
 | 
					                        sb.Append($@"update import_dbTag_niagaraTag set niagaraTag = b.niagara_tags
 | 
				
			||||||
                                from [dbo].[importTag] b
 | 
					                                from [dbo].[import_niagara_tag] b
 | 
				
			||||||
                                where import_dbTag_niagaraTag.device_number = b.niagara_tags ");
 | 
					                                where import_dbTag_niagaraTag.device_number = b.niagara_tags ");
 | 
				
			||||||
                        conn.Execute(sb.ToString());
 | 
					                        conn.Execute(sb.ToString());
 | 
				
			||||||
                    #endregion
 | 
					                    #endregion
 | 
				
			||||||
 | 
				
			|||||||
@ -4,12 +4,15 @@ using System.Text;
 | 
				
			|||||||
using System.Configuration;
 | 
					using System.Configuration;
 | 
				
			||||||
using tpDomeWinAPP.Models;
 | 
					using tpDomeWinAPP.Models;
 | 
				
			||||||
using System.Data;
 | 
					using System.Data;
 | 
				
			||||||
using System.Data.SqlClient;
 | 
					//using System.Data.SqlClient;
 | 
				
			||||||
using MySql.Data.MySqlClient;
 | 
					using MySql.Data.MySqlClient;
 | 
				
			||||||
using Repository.Helper;
 | 
					using Repository.Helper;
 | 
				
			||||||
using Repository.BackendRepository.Interface;
 | 
					using Repository.BackendRepository.Interface;
 | 
				
			||||||
using Dapper;
 | 
					using Dapper;
 | 
				
			||||||
using System.Linq;
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using NPOI.SS.Formula.Functions;
 | 
				
			||||||
 | 
					using Microsoft.Extensions.Primitives;
 | 
				
			||||||
 | 
					using MySqlX.XDevAPI.Relational;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace tpDomeWinAPP.Service
 | 
					namespace tpDomeWinAPP.Service
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@ -25,6 +28,7 @@ namespace tpDomeWinAPP.Service
 | 
				
			|||||||
        public bool InsertNiagaraTagList(List<device_value2> dt, string building )
 | 
					        public bool InsertNiagaraTagList(List<device_value2> dt, string building )
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            bool result = false;
 | 
					            bool result = false;
 | 
				
			||||||
 | 
					            //tag
 | 
				
			||||||
            var ds2 = dt.GroupBy(x => new
 | 
					            var ds2 = dt.GroupBy(x => new
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                tag_name2 = x.tag_name
 | 
					                tag_name2 = x.tag_name
 | 
				
			||||||
@ -32,110 +36,174 @@ namespace tpDomeWinAPP.Service
 | 
				
			|||||||
                tag_name = x.Key.tag_name2
 | 
					                tag_name = x.Key.tag_name2
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            using (SqlConnection conn = new SqlConnection(Connection1))
 | 
					            using (MySqlConnection conn = new MySqlConnection(Connection1))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                //CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,
 | 
					                //CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,
 | 
				
			||||||
                conn.Open();
 | 
					                conn.Open();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                #region 不存在就 Create table 
 | 
					                #region 不存在就 Create table 
 | 
				
			||||||
                    string ss = @"IF (not EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'importTag'))
 | 
					                //string ss = @"IF (not EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'import_niagara_tag'))
 | 
				
			||||||
                            BEGIN 
 | 
					                //        BEGIN 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	                            CREATE TABLE [dbo].[importTag](
 | 
					                //         CREATE TABLE [dbo].[import_niagara_tag](
 | 
				
			||||||
		                            [id] [int] IDENTITY(1,1) NOT NULL,
 | 
					                //          [id] [int] IDENTITY(1,1) NOT NULL,
 | 
				
			||||||
		                            [db_tags] [varchar](50) NULL,
 | 
					                //          [db_tags] [varchar](50) NULL,
 | 
				
			||||||
		                            [niagara_tags] [varchar](50) NULL,
 | 
					                //          [niagara_tags] [varchar](50) NULL,
 | 
				
			||||||
		                            [building] [varchar](10) NULL,
 | 
					                //          [building] [varchar](10) NULL,
 | 
				
			||||||
		                            [system_code1] [varchar](10) NULL,
 | 
					                //          [system_code1] [varchar](10) NULL,
 | 
				
			||||||
		                            [floor] [varchar](10) NULL,
 | 
					                //          [floor] [varchar](10) NULL,
 | 
				
			||||||
		                            [system_code2] [varchar](10) NULL,
 | 
					                //          [system_code2] [varchar](10) NULL,
 | 
				
			||||||
		                            [device_serial] [varchar](10) NULL,
 | 
					                //          [device_serial] [varchar](10) NULL,
 | 
				
			||||||
		                            [atDateTime] [smalldatetime] NULL,
 | 
					                //          [atDateTime] [smalldatetime] NULL,
 | 
				
			||||||
	                             CONSTRAINT [PK_importTag] PRIMARY KEY CLUSTERED 
 | 
					                //          CONSTRAINT [PK_import_niagara_tag] PRIMARY KEY CLUSTERED 
 | 
				
			||||||
	                            (
 | 
					                //         (
 | 
				
			||||||
		                            [id] ASC
 | 
					                //          [id] ASC
 | 
				
			||||||
	                            )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
 | 
					                //         )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
 | 
				
			||||||
	                            ) ON [PRIMARY];
 | 
					                //         ) ON [PRIMARY];
 | 
				
			||||||
                            END";
 | 
					                //        END" ;
 | 
				
			||||||
 | 
					                string ss = @" CREATE TABLE IF NOT EXISTS `import_niagara_tag` (
 | 
				
			||||||
 | 
					                                 `id` int(11) NOT NULL AUTO_INCREMENT,
 | 
				
			||||||
 | 
					                                 `db_tags` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                                 `niagara_tags` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                                 `device_area_tag` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                                 `device_building_tag` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                                 `device_system_tag` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                                 `device_name_tag` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                                 `device_floor_tag` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                                 `device_master_tag` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                                 `device_last_name_tag` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                                 `device_serial_tag` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                                 `atDateTime` datetime(1) DEFAULT NULL,
 | 
				
			||||||
 | 
					                                 `is_used` smallint(1) DEFAULT 0,
 | 
				
			||||||
 | 
					                                 PRIMARY KEY (`id`)
 | 
				
			||||||
 | 
					                               ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;";
 | 
				
			||||||
                conn.Execute(ss.ToString());
 | 
					                conn.Execute(ss.ToString());
 | 
				
			||||||
                    ss = "delete from importTag where building = '" + building + "'";
 | 
					                ss = "delete from import_niagara_tag where device_building_tag = '" + building + "'";
 | 
				
			||||||
                conn.Execute(ss.ToString());
 | 
					                conn.Execute(ss.ToString());
 | 
				
			||||||
                #endregion
 | 
					                #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                StringBuilder sb = new StringBuilder();
 | 
					                StringBuilder sb = new StringBuilder();
 | 
				
			||||||
                int i = 0;
 | 
					
 | 
				
			||||||
                foreach (var row in ds2)
 | 
					                foreach (var row in ds2)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    if (string.IsNullOrEmpty(row.tag_name)) continue;
 | 
					                    if (string.IsNullOrEmpty(row.tag_name)) continue;
 | 
				
			||||||
                    sb.Append($@" insert importTag(niagara_tags, building, atDateTime) values('" +
 | 
					                    string[] arrTag = row.tag_name.Split('_');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    sb.Append($@" insert import_niagara_tag(niagara_tags, device_area_tag, device_building_tag, device_system_tag,
 | 
				
			||||||
 | 
					                                device_name_tag, device_floor_tag, device_master_tag, device_last_name_tag, device_serial_tag, atDateTime) values('" +
 | 
				
			||||||
                        row.tag_name + "', '" +
 | 
					                        row.tag_name + "', '" +
 | 
				
			||||||
                        building + "', getDate());");
 | 
					                        arrTag[0] + "', '" +
 | 
				
			||||||
                    i++;
 | 
					                        arrTag[1] + "', '" +
 | 
				
			||||||
 | 
					                        arrTag[2] + "', '" +
 | 
				
			||||||
 | 
					                        arrTag[3] + "', '" +
 | 
				
			||||||
 | 
					                        arrTag[4] + "', '" +
 | 
				
			||||||
 | 
					                        arrTag[5] + "', '" +
 | 
				
			||||||
 | 
					                        arrTag[6] + "', '" +
 | 
				
			||||||
 | 
					                        arrTag[7] + "',  " +
 | 
				
			||||||
 | 
					                        "now());");
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                try
 | 
					                try
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                        if (i >= 100)
 | 
					                    if (sb.Length > 0)
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        conn.Execute(sb.ToString());
 | 
					                        conn.Execute(sb.ToString());
 | 
				
			||||||
                        sb.Clear();
 | 
					                        sb.Clear();
 | 
				
			||||||
                            i = 0;
 | 
					 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                catch (Exception ex)
 | 
					                catch (Exception ex)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    throw ex;
 | 
					                    throw ex;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                }
 | 
					                insertItemFromNiagara(dt, conn, building);
 | 
				
			||||||
                if (sb.Length > 0)
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    conn.Execute(sb.ToString());
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                #region update 其餘 4段 tag
 | 
					 | 
				
			||||||
                sb.Clear();
 | 
					 | 
				
			||||||
                sb.Append($@"update importTag set importTag.system_code1 = b.tagName
 | 
					 | 
				
			||||||
                            from (
 | 
					 | 
				
			||||||
		                            select niagara_tags, building, serial, tagName  
 | 
					 | 
				
			||||||
		                            from dbo.importTag a  CROSS APPLY [Func_StringSplit](a.niagara_tags, '_') 
 | 
					 | 
				
			||||||
		                            where serial = 2 and building = '{building}'
 | 
					 | 
				
			||||||
	                            ) b 
 | 
					 | 
				
			||||||
                            where importTag.niagara_tags = b.niagara_tags and importTag.building = '{building}';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                            update importTag set importTag.floor = b.tagName
 | 
					 | 
				
			||||||
                            from (
 | 
					 | 
				
			||||||
		                            select niagara_tags, building, serial, tagName  
 | 
					 | 
				
			||||||
		                            from dbo.importTag a  CROSS APPLY [Func_StringSplit](a.niagara_tags, '_') 
 | 
					 | 
				
			||||||
		                            where serial = 3 and building = '{building}'
 | 
					 | 
				
			||||||
	                            ) b 
 | 
					 | 
				
			||||||
                            where importTag.niagara_tags = b.niagara_tags and importTag.building = '{building}';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                            update importTag set importTag.system_code2 = b.tagName
 | 
					 | 
				
			||||||
                            from (
 | 
					 | 
				
			||||||
		                            select niagara_tags, building, serial, tagName  
 | 
					 | 
				
			||||||
		                            from dbo.importTag a  CROSS APPLY [Func_StringSplit](a.niagara_tags, '_') 
 | 
					 | 
				
			||||||
		                            where serial = 4 and building = '{building}'
 | 
					 | 
				
			||||||
	                            ) b 
 | 
					 | 
				
			||||||
                            where importTag.niagara_tags = b.niagara_tags and importTag.building = '{building}';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                            update importTag set importTag.device_serial = b.tagName
 | 
					 | 
				
			||||||
                            from (
 | 
					 | 
				
			||||||
		                            select niagara_tags, building, serial, tagName  
 | 
					 | 
				
			||||||
		                            from dbo.importTag a  CROSS APPLY [Func_StringSplit](a.niagara_tags, '_') 
 | 
					 | 
				
			||||||
		                            where serial = 5 and building = '{building}'
 | 
					 | 
				
			||||||
	                            ) b 
 | 
					 | 
				
			||||||
                            where importTag.niagara_tags = b.niagara_tags and importTag.building = '{building}';
 | 
					 | 
				
			||||||
                            
 | 
					 | 
				
			||||||
                            update importTag  set db_tags = b.device_number
 | 
					 | 
				
			||||||
                            from  dbo.device b 
 | 
					 | 
				
			||||||
                            where niagara_tags = b.device_number and importTag.building = '{building}'
 | 
					 | 
				
			||||||
                            ");
 | 
					 | 
				
			||||||
                conn.Execute(sb.ToString());
 | 
					 | 
				
			||||||
                #endregion
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        protected void insertItemFromNiagara(List<device_value2> dt, MySqlConnection conn, string building)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            #region create table
 | 
				
			||||||
 | 
					            string ss = @"CREATE TABLE IF NOT EXISTS `import_niagara_item` (
 | 
				
			||||||
 | 
					                              `id` int(11) NOT NULL AUTO_INCREMENT,
 | 
				
			||||||
 | 
					                              `device_area_tag` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                              `device_building_tag` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                              `device_system_tag` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                              `device_name_tag` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                              `device_point_name` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                              `check_status` varchar(50) DEFAULT NULL,
 | 
				
			||||||
 | 
					                              PRIMARY KEY (`id`)
 | 
				
			||||||
 | 
					                            ) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;";
 | 
				
			||||||
 | 
					            conn.Execute(ss.ToString());
 | 
				
			||||||
 | 
					            ss = "delete from import_niagara_item where device_building_tag = '" + building + "'";
 | 
				
			||||||
 | 
					            conn.Execute(ss.ToString());
 | 
				
			||||||
 | 
					            #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            List<device_item8> dt_item = new List<device_item8>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            foreach (var row in dt)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (string.IsNullOrEmpty(row.tag_name)) continue;
 | 
				
			||||||
 | 
					                string[] arrTag = row.tag_name.Split('_');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                #region for item
 | 
				
			||||||
 | 
					                device_item8 row_item = new device_item8();
 | 
				
			||||||
 | 
					                row_item.tag_name = row.tag_name;
 | 
				
			||||||
 | 
					                row_item.device_area_tag = arrTag[0];
 | 
				
			||||||
 | 
					                row_item.device_building_tag = arrTag[1];
 | 
				
			||||||
 | 
					                row_item.device_system_tag = arrTag[2];
 | 
				
			||||||
 | 
					                row_item.device_name_tag = arrTag[3];
 | 
				
			||||||
 | 
					                row_item.device_floor_tag = arrTag[4];
 | 
				
			||||||
 | 
					                row_item.device_master_tag = arrTag[5];
 | 
				
			||||||
 | 
					                row_item.device_last_name_tag = arrTag[6];
 | 
				
			||||||
 | 
					                row_item.device_serial_tag = arrTag[7];
 | 
				
			||||||
 | 
					                row_item.point_name = row.point_name;
 | 
				
			||||||
 | 
					                dt_item.Add(row_item);
 | 
				
			||||||
 | 
					                #endregion
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //device_item
 | 
				
			||||||
 | 
					            var ds2_item = dt_item.GroupBy(x => new
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                device_area_tag2 = x.device_area_tag,
 | 
				
			||||||
 | 
					                device_building_tag2 = x.device_building_tag,
 | 
				
			||||||
 | 
					                device_system_tag2 = x.device_system_tag,
 | 
				
			||||||
 | 
					                device_name_tag2 = x.device_name_tag,
 | 
				
			||||||
 | 
					                point_name2 = x.point_name
 | 
				
			||||||
 | 
					            }).Select(x => new device_item8
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                device_area_tag = x.Key.device_area_tag2,
 | 
				
			||||||
 | 
					                device_building_tag = x.Key.device_building_tag2,
 | 
				
			||||||
 | 
					                device_system_tag = x.Key.device_system_tag2,
 | 
				
			||||||
 | 
					                device_name_tag = x.Key.device_name_tag2,
 | 
				
			||||||
 | 
					                point_name = x.Key.point_name2
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            StringBuilder sb = new StringBuilder();
 | 
				
			||||||
 | 
					            foreach (var row2 in ds2_item)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                sb.Append($@" insert import_niagara_item(device_area_tag, device_building_tag, device_system_tag, device_name_tag, device_point_name)
 | 
				
			||||||
 | 
					                              values('" +
 | 
				
			||||||
 | 
					                    row2.device_area_tag + "', '" +
 | 
				
			||||||
 | 
					                    row2.device_building_tag + "', '" +
 | 
				
			||||||
 | 
					                    row2.device_system_tag + "', '" +
 | 
				
			||||||
 | 
					                    row2.device_name_tag + "', '" +
 | 
				
			||||||
 | 
					                    row2.point_name + "'" +
 | 
				
			||||||
 | 
					                    ");");
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            try
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (sb.Length > 0)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    conn.Execute(sb.ToString());
 | 
				
			||||||
 | 
					                    sb.Clear();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            catch (Exception ex)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                throw ex;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public bool InsertDbTagList(List<device_value2> dt, string building)
 | 
					        public bool InsertDbTagList(List<device_value2> dt, string building)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            bool result = false;
 | 
					            bool result = false;
 | 
				
			||||||
@ -147,7 +215,7 @@ namespace tpDomeWinAPP.Service
 | 
				
			|||||||
                tag_name = x.Key.tag_name2
 | 
					                tag_name = x.Key.tag_name2
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            using (SqlConnection conn = new SqlConnection(Connection1))
 | 
					            using (MySqlConnection conn = new MySqlConnection(Connection1))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                //CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,
 | 
					                //CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,
 | 
				
			||||||
                conn.Open();
 | 
					                conn.Open();
 | 
				
			||||||
@ -176,7 +244,7 @@ namespace tpDomeWinAPP.Service
 | 
				
			|||||||
                                ) ON [PRIMARY];
 | 
					                                ) ON [PRIMARY];
 | 
				
			||||||
                            END";
 | 
					                            END";
 | 
				
			||||||
                conn.Execute(ss.ToString());
 | 
					                conn.Execute(ss.ToString());
 | 
				
			||||||
                //ss = "delete from importTag where building = '" + building + "'";
 | 
					                //ss = "delete from import_niagara_tag where building = '" + building + "'";
 | 
				
			||||||
                //conn.Execute(ss.ToString());
 | 
					                //conn.Execute(ss.ToString());
 | 
				
			||||||
                #endregion
 | 
					                #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -192,7 +260,7 @@ namespace tpDomeWinAPP.Service
 | 
				
			|||||||
                #region update  niagara_tags
 | 
					                #region update  niagara_tags
 | 
				
			||||||
                sb.Clear();
 | 
					                sb.Clear();
 | 
				
			||||||
                sb.Append($@"update import_dbTag_niagaraTag set niagaraTag = b.niagara_tags
 | 
					                sb.Append($@"update import_dbTag_niagaraTag set niagaraTag = b.niagara_tags
 | 
				
			||||||
                            from [dbo].[importTag] b
 | 
					                            from [dbo].[import_niagara_tag] b
 | 
				
			||||||
                            where import_dbTag_niagaraTag.device_number = b.niagara_tags ");
 | 
					                            where import_dbTag_niagaraTag.device_number = b.niagara_tags ");
 | 
				
			||||||
                conn.Execute(sb.ToString());
 | 
					                conn.Execute(sb.ToString());
 | 
				
			||||||
                #endregion
 | 
					                #endregion
 | 
				
			||||||
@ -205,12 +273,12 @@ namespace tpDomeWinAPP.Service
 | 
				
			|||||||
        public List<NiagaraTags> GetNiagaraTags(string building)
 | 
					        public List<NiagaraTags> GetNiagaraTags(string building)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            List<NiagaraTags> result;
 | 
					            List<NiagaraTags> result;
 | 
				
			||||||
            using (SqlConnection conn = new SqlConnection(Connection1))
 | 
					            using (MySqlConnection conn = new MySqlConnection(Connection1))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                //CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,
 | 
					                //CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,
 | 
				
			||||||
                conn.Open();
 | 
					                conn.Open();
 | 
				
			||||||
                StringBuilder sb = new StringBuilder();
 | 
					                StringBuilder sb = new StringBuilder();
 | 
				
			||||||
                sb.Append($@" select * from importTag where building = '{building}'");
 | 
					                sb.Append($@" select * from import_niagara_tag where device_building_tag = '{building}'");
 | 
				
			||||||
                result = conn.Query<NiagaraTags>(sb.ToString()).ToList<NiagaraTags>(); 
 | 
					                result = conn.Query<NiagaraTags>(sb.ToString()).ToList<NiagaraTags>(); 
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            return result;
 | 
					            return result;
 | 
				
			||||||
@ -219,7 +287,7 @@ namespace tpDomeWinAPP.Service
 | 
				
			|||||||
        public List<NiagaraTags> SearchNiagaraTags(string sql)
 | 
					        public List<NiagaraTags> SearchNiagaraTags(string sql)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            List<NiagaraTags> result;
 | 
					            List<NiagaraTags> result;
 | 
				
			||||||
            using (SqlConnection conn = new SqlConnection(Connection1))
 | 
					            using (MySqlConnection conn = new MySqlConnection(Connection1))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                //CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,
 | 
					                //CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,
 | 
				
			||||||
                conn.Open();
 | 
					                conn.Open();
 | 
				
			||||||
@ -233,7 +301,7 @@ namespace tpDomeWinAPP.Service
 | 
				
			|||||||
        public List<dbDevice> SearchDBTags(string building)
 | 
					        public List<dbDevice> SearchDBTags(string building)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            List<dbDevice> result;
 | 
					            List<dbDevice> result;
 | 
				
			||||||
            using (SqlConnection conn = new SqlConnection(Connection1))
 | 
					            using (MySqlConnection conn = new MySqlConnection(Connection1))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                //CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,
 | 
					                //CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,
 | 
				
			||||||
                conn.Open();
 | 
					                conn.Open();
 | 
				
			||||||
@ -254,7 +322,7 @@ namespace tpDomeWinAPP.Service
 | 
				
			|||||||
        public List<dbDevice> filterDBTags(string sql)
 | 
					        public List<dbDevice> filterDBTags(string sql)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            List<dbDevice> result;
 | 
					            List<dbDevice> result;
 | 
				
			||||||
            using (SqlConnection conn = new SqlConnection(Connection1))
 | 
					            using (MySqlConnection conn = new MySqlConnection(Connection1))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                //CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,
 | 
					                //CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,
 | 
				
			||||||
                conn.Open();
 | 
					                conn.Open();
 | 
				
			||||||
@ -273,7 +341,7 @@ namespace tpDomeWinAPP.Service
 | 
				
			|||||||
        public int updateNiagaraTag_forDBTags(string bilding)
 | 
					        public int updateNiagaraTag_forDBTags(string bilding)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            int i = -1;
 | 
					            int i = -1;
 | 
				
			||||||
            using (SqlConnection conn = new SqlConnection(Connection1))
 | 
					            using (MySqlConnection conn = new MySqlConnection(Connection1))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                //CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,
 | 
					                //CONCAT('{baseURL}', '{deviceKindFilePath}', dk.device_image) AS device_image_url,
 | 
				
			||||||
                conn.Open();
 | 
					                conn.Open();
 | 
				
			||||||
@ -293,7 +361,7 @@ namespace tpDomeWinAPP.Service
 | 
				
			|||||||
                    #endregion
 | 
					                    #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    sb.Append($@"update import_dbTag_niagaraTag set niagaraTag = b.niagara_tags
 | 
					                    sb.Append($@"update import_dbTag_niagaraTag set niagaraTag = b.niagara_tags
 | 
				
			||||||
                                from [dbo].[importTag] b
 | 
					                                from [dbo].[import_niagara_tag] b
 | 
				
			||||||
                                where import_dbTag_niagaraTag.device_number = b.niagara_tags 
 | 
					                                where import_dbTag_niagaraTag.device_number = b.niagara_tags 
 | 
				
			||||||
                                      and import_dbTag_niagaraTag.device_building_tag = '{bilding}'");
 | 
					                                      and import_dbTag_niagaraTag.device_building_tag = '{bilding}'");
 | 
				
			||||||
                    i = conn.Execute(sb.ToString());
 | 
					                    i = conn.Execute(sb.ToString());
 | 
				
			||||||
 | 
				
			|||||||
@ -144,28 +144,32 @@ namespace tpDomeWinAPP.Service
 | 
				
			|||||||
        public List<device_value2> obixQuery(string urlString, string bql)
 | 
					        public List<device_value2> obixQuery(string urlString, string bql)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            List<device_value2> result = new List<device_value2>();
 | 
					            List<device_value2> result = new List<device_value2>();
 | 
				
			||||||
            String username = "stanGG";
 | 
					            String username = "obixUser";
 | 
				
			||||||
            String password = "St12345678";
 | 
					            String password = "Admin123456";
 | 
				
			||||||
            String encoded = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes(username + ":" + password));
 | 
					            String encoded = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes(username + ":" + password));
 | 
				
			||||||
            String API_Url = urlString;
 | 
					            String API_Url = urlString;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            HttpWebRequest Postrequest = (HttpWebRequest)WebRequest.Create(API_Url);
 | 
					            //HttpWebRequest Postrequest = (HttpWebRequest)WebRequest.Create(API_Url);
 | 
				
			||||||
            Postrequest.Method = "POST";
 | 
					            //Postrequest.Method = "POST";
 | 
				
			||||||
            Postrequest.Headers.Add("Authorization", "Basic " + encoded);
 | 
					            //Postrequest.Headers.Add("Authorization", "Basic " + encoded);
 | 
				
			||||||
            Postrequest.PreAuthenticate = true;
 | 
					            //Postrequest.PreAuthenticate = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            using (var streamWriter = new StreamWriter(Postrequest.GetRequestStream()))
 | 
					            //using (var streamWriter = new StreamWriter(Postrequest.GetRequestStream()))
 | 
				
			||||||
            {
 | 
					            //{
 | 
				
			||||||
                string json = "<str val='" + bql + "'/>";
 | 
					            //    string json = "<str val='" + bql + "'/>";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                streamWriter.Write(json);
 | 
					            //    streamWriter.Write(json);
 | 
				
			||||||
            }
 | 
					            //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            HttpWebResponse response = (HttpWebResponse)Postrequest.GetResponse();
 | 
					            //HttpWebResponse response = (HttpWebResponse)Postrequest.GetResponse();
 | 
				
			||||||
            var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
 | 
					            //var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            XmlDocument xmlDoc = new XmlDocument();
 | 
					            XmlDocument xmlDoc = new XmlDocument();
 | 
				
			||||||
            xmlDoc.LoadXml(responseString);
 | 
					            //xmlDoc.LoadXml(responseString);
 | 
				
			||||||
 | 
					            xmlDoc.Load("N4.xml");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //xmlDoc.Save("N4.xml");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										244
									
								
								z01_WinAPP/fmCheckTagName.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										244
									
								
								z01_WinAPP/fmCheckTagName.Designer.cs
									
									
									
										generated
									
									
									
								
							@ -34,7 +34,7 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.rbM = new System.Windows.Forms.RadioButton();
 | 
					            this.rbM = new System.Windows.Forms.RadioButton();
 | 
				
			||||||
            this.btLoad = new System.Windows.Forms.Button();
 | 
					            this.btLoad = new System.Windows.Forms.Button();
 | 
				
			||||||
            this.rbDome2 = new System.Windows.Forms.RadioButton();
 | 
					            this.rbDome2 = new System.Windows.Forms.RadioButton();
 | 
				
			||||||
            this.rbH = new System.Windows.Forms.RadioButton();
 | 
					            this.rbB1 = new System.Windows.Forms.RadioButton();
 | 
				
			||||||
            this.rbCinema = new System.Windows.Forms.RadioButton();
 | 
					            this.rbCinema = new System.Windows.Forms.RadioButton();
 | 
				
			||||||
            this.rbOffice = new System.Windows.Forms.RadioButton();
 | 
					            this.rbOffice = new System.Windows.Forms.RadioButton();
 | 
				
			||||||
            this.tabControl1 = new System.Windows.Forms.TabControl();
 | 
					            this.tabControl1 = new System.Windows.Forms.TabControl();
 | 
				
			||||||
@ -64,11 +64,11 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.dataGridView2 = new System.Windows.Forms.DataGridView();
 | 
					            this.dataGridView2 = new System.Windows.Forms.DataGridView();
 | 
				
			||||||
            this.tabPage3 = new System.Windows.Forms.TabPage();
 | 
					            this.tabPage3 = new System.Windows.Forms.TabPage();
 | 
				
			||||||
            this.tabPage4 = new System.Windows.Forms.TabPage();
 | 
					            this.tabPage4 = new System.Windows.Forms.TabPage();
 | 
				
			||||||
 | 
					            this.tabPage5 = new System.Windows.Forms.TabPage();
 | 
				
			||||||
            this.splitContainer5 = new System.Windows.Forms.SplitContainer();
 | 
					            this.splitContainer5 = new System.Windows.Forms.SplitContainer();
 | 
				
			||||||
            this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
 | 
					            this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
 | 
				
			||||||
            this.label1 = new System.Windows.Forms.Label();
 | 
					            this.label1 = new System.Windows.Forms.Label();
 | 
				
			||||||
            this.label2 = new System.Windows.Forms.Label();
 | 
					            this.label2 = new System.Windows.Forms.Label();
 | 
				
			||||||
            this.tabPage5 = new System.Windows.Forms.TabPage();
 | 
					 | 
				
			||||||
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
 | 
					            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
 | 
				
			||||||
            this.splitContainer1.Panel1.SuspendLayout();
 | 
					            this.splitContainer1.Panel1.SuspendLayout();
 | 
				
			||||||
            this.splitContainer1.Panel2.SuspendLayout();
 | 
					            this.splitContainer1.Panel2.SuspendLayout();
 | 
				
			||||||
@ -100,6 +100,7 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.splitContainer1.Cursor = System.Windows.Forms.Cursors.VSplit;
 | 
					            this.splitContainer1.Cursor = System.Windows.Forms.Cursors.VSplit;
 | 
				
			||||||
            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
 | 
					            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
 | 
				
			||||||
            this.splitContainer1.Location = new System.Drawing.Point(0, 0);
 | 
					            this.splitContainer1.Location = new System.Drawing.Point(0, 0);
 | 
				
			||||||
 | 
					            this.splitContainer1.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.splitContainer1.Name = "splitContainer1";
 | 
					            this.splitContainer1.Name = "splitContainer1";
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // splitContainer1.Panel1
 | 
					            // splitContainer1.Panel1
 | 
				
			||||||
@ -109,7 +110,7 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.splitContainer1.Panel1.Controls.Add(this.rbM);
 | 
					            this.splitContainer1.Panel1.Controls.Add(this.rbM);
 | 
				
			||||||
            this.splitContainer1.Panel1.Controls.Add(this.btLoad);
 | 
					            this.splitContainer1.Panel1.Controls.Add(this.btLoad);
 | 
				
			||||||
            this.splitContainer1.Panel1.Controls.Add(this.rbDome2);
 | 
					            this.splitContainer1.Panel1.Controls.Add(this.rbDome2);
 | 
				
			||||||
            this.splitContainer1.Panel1.Controls.Add(this.rbH);
 | 
					            this.splitContainer1.Panel1.Controls.Add(this.rbB1);
 | 
				
			||||||
            this.splitContainer1.Panel1.Controls.Add(this.rbCinema);
 | 
					            this.splitContainer1.Panel1.Controls.Add(this.rbCinema);
 | 
				
			||||||
            this.splitContainer1.Panel1.Controls.Add(this.rbOffice);
 | 
					            this.splitContainer1.Panel1.Controls.Add(this.rbOffice);
 | 
				
			||||||
            this.splitContainer1.Panel1.Cursor = System.Windows.Forms.Cursors.Arrow;
 | 
					            this.splitContainer1.Panel1.Cursor = System.Windows.Forms.Cursors.Arrow;
 | 
				
			||||||
@ -117,8 +118,9 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            // splitContainer1.Panel2
 | 
					            // splitContainer1.Panel2
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.splitContainer1.Panel2.Controls.Add(this.tabControl1);
 | 
					            this.splitContainer1.Panel2.Controls.Add(this.tabControl1);
 | 
				
			||||||
            this.splitContainer1.Size = new System.Drawing.Size(1502, 764);
 | 
					            this.splitContainer1.Size = new System.Drawing.Size(1168, 603);
 | 
				
			||||||
            this.splitContainer1.SplitterDistance = 225;
 | 
					            this.splitContainer1.SplitterDistance = 174;
 | 
				
			||||||
 | 
					            this.splitContainer1.SplitterWidth = 3;
 | 
				
			||||||
            this.splitContainer1.TabIndex = 0;
 | 
					            this.splitContainer1.TabIndex = 0;
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // rbDome3
 | 
					            // rbDome3
 | 
				
			||||||
@ -126,9 +128,10 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.rbDome3.AutoSize = true;
 | 
					            this.rbDome3.AutoSize = true;
 | 
				
			||||||
            this.rbDome3.Cursor = System.Windows.Forms.Cursors.Hand;
 | 
					            this.rbDome3.Cursor = System.Windows.Forms.Cursors.Hand;
 | 
				
			||||||
            this.rbDome3.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
					            this.rbDome3.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
				
			||||||
            this.rbDome3.Location = new System.Drawing.Point(20, 248);
 | 
					            this.rbDome3.Location = new System.Drawing.Point(16, 196);
 | 
				
			||||||
 | 
					            this.rbDome3.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.rbDome3.Name = "rbDome3";
 | 
					            this.rbDome3.Name = "rbDome3";
 | 
				
			||||||
            this.rbDome3.Size = new System.Drawing.Size(125, 29);
 | 
					            this.rbDome3.Size = new System.Drawing.Size(100, 24);
 | 
				
			||||||
            this.rbDome3.TabIndex = 5;
 | 
					            this.rbDome3.TabIndex = 5;
 | 
				
			||||||
            this.rbDome3.TabStop = true;
 | 
					            this.rbDome3.TabStop = true;
 | 
				
			||||||
            this.rbDome3.Tag = "D3";
 | 
					            this.rbDome3.Tag = "D3";
 | 
				
			||||||
@ -141,9 +144,10 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.rbM.AutoSize = true;
 | 
					            this.rbM.AutoSize = true;
 | 
				
			||||||
            this.rbM.Cursor = System.Windows.Forms.Cursors.Hand;
 | 
					            this.rbM.Cursor = System.Windows.Forms.Cursors.Hand;
 | 
				
			||||||
            this.rbM.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
					            this.rbM.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
				
			||||||
            this.rbM.Location = new System.Drawing.Point(20, 288);
 | 
					            this.rbM.Location = new System.Drawing.Point(16, 227);
 | 
				
			||||||
 | 
					            this.rbM.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.rbM.Name = "rbM";
 | 
					            this.rbM.Name = "rbM";
 | 
				
			||||||
            this.rbM.Size = new System.Drawing.Size(118, 29);
 | 
					            this.rbM.Size = new System.Drawing.Size(95, 24);
 | 
				
			||||||
            this.rbM.TabIndex = 4;
 | 
					            this.rbM.TabIndex = 4;
 | 
				
			||||||
            this.rbM.TabStop = true;
 | 
					            this.rbM.TabStop = true;
 | 
				
			||||||
            this.rbM.Tag = "M";
 | 
					            this.rbM.Tag = "M";
 | 
				
			||||||
@ -153,9 +157,10 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // btLoad
 | 
					            // btLoad
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.btLoad.Location = new System.Drawing.Point(41, 32);
 | 
					            this.btLoad.Location = new System.Drawing.Point(32, 25);
 | 
				
			||||||
 | 
					            this.btLoad.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.btLoad.Name = "btLoad";
 | 
					            this.btLoad.Name = "btLoad";
 | 
				
			||||||
            this.btLoad.Size = new System.Drawing.Size(94, 29);
 | 
					            this.btLoad.Size = new System.Drawing.Size(73, 23);
 | 
				
			||||||
            this.btLoad.TabIndex = 0;
 | 
					            this.btLoad.TabIndex = 0;
 | 
				
			||||||
            this.btLoad.Text = "LoadData";
 | 
					            this.btLoad.Text = "LoadData";
 | 
				
			||||||
            this.btLoad.UseVisualStyleBackColor = true;
 | 
					            this.btLoad.UseVisualStyleBackColor = true;
 | 
				
			||||||
@ -166,9 +171,10 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.rbDome2.AutoSize = true;
 | 
					            this.rbDome2.AutoSize = true;
 | 
				
			||||||
            this.rbDome2.Cursor = System.Windows.Forms.Cursors.Hand;
 | 
					            this.rbDome2.Cursor = System.Windows.Forms.Cursors.Hand;
 | 
				
			||||||
            this.rbDome2.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
					            this.rbDome2.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
				
			||||||
            this.rbDome2.Location = new System.Drawing.Point(20, 208);
 | 
					            this.rbDome2.Location = new System.Drawing.Point(16, 164);
 | 
				
			||||||
 | 
					            this.rbDome2.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.rbDome2.Name = "rbDome2";
 | 
					            this.rbDome2.Name = "rbDome2";
 | 
				
			||||||
            this.rbDome2.Size = new System.Drawing.Size(125, 29);
 | 
					            this.rbDome2.Size = new System.Drawing.Size(100, 24);
 | 
				
			||||||
            this.rbDome2.TabIndex = 3;
 | 
					            this.rbDome2.TabIndex = 3;
 | 
				
			||||||
            this.rbDome2.TabStop = true;
 | 
					            this.rbDome2.TabStop = true;
 | 
				
			||||||
            this.rbDome2.Tag = "D2";
 | 
					            this.rbDome2.Tag = "D2";
 | 
				
			||||||
@ -176,29 +182,31 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.rbDome2.UseVisualStyleBackColor = true;
 | 
					            this.rbDome2.UseVisualStyleBackColor = true;
 | 
				
			||||||
            this.rbDome2.CheckedChanged += new System.EventHandler(this.rbM_CheckedChanged);
 | 
					            this.rbDome2.CheckedChanged += new System.EventHandler(this.rbM_CheckedChanged);
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // rbH
 | 
					            // rbB1
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.rbH.AutoSize = true;
 | 
					            this.rbB1.AutoSize = true;
 | 
				
			||||||
            this.rbH.Cursor = System.Windows.Forms.Cursors.Hand;
 | 
					            this.rbB1.Cursor = System.Windows.Forms.Cursors.Hand;
 | 
				
			||||||
            this.rbH.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
					            this.rbB1.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
				
			||||||
            this.rbH.Location = new System.Drawing.Point(20, 88);
 | 
					            this.rbB1.Location = new System.Drawing.Point(16, 69);
 | 
				
			||||||
            this.rbH.Name = "rbH";
 | 
					            this.rbB1.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.rbH.Size = new System.Drawing.Size(129, 29);
 | 
					            this.rbB1.Name = "rbB1";
 | 
				
			||||||
            this.rbH.TabIndex = 0;
 | 
					            this.rbB1.Size = new System.Drawing.Size(78, 24);
 | 
				
			||||||
            this.rbH.TabStop = true;
 | 
					            this.rbB1.TabIndex = 0;
 | 
				
			||||||
            this.rbH.Tag = "H";
 | 
					            this.rbB1.TabStop = true;
 | 
				
			||||||
            this.rbH.Text = "旅館 Hotel";
 | 
					            this.rbB1.Tag = "B1";
 | 
				
			||||||
            this.rbH.UseVisualStyleBackColor = true;
 | 
					            this.rbB1.Text = "三菱B1";
 | 
				
			||||||
            this.rbH.CheckedChanged += new System.EventHandler(this.rbM_CheckedChanged);
 | 
					            this.rbB1.UseVisualStyleBackColor = true;
 | 
				
			||||||
 | 
					            this.rbB1.CheckedChanged += new System.EventHandler(this.rbM_CheckedChanged);
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // rbCinema
 | 
					            // rbCinema
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.rbCinema.AutoSize = true;
 | 
					            this.rbCinema.AutoSize = true;
 | 
				
			||||||
            this.rbCinema.Cursor = System.Windows.Forms.Cursors.Hand;
 | 
					            this.rbCinema.Cursor = System.Windows.Forms.Cursors.Hand;
 | 
				
			||||||
            this.rbCinema.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
					            this.rbCinema.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
				
			||||||
            this.rbCinema.Location = new System.Drawing.Point(20, 168);
 | 
					            this.rbCinema.Location = new System.Drawing.Point(16, 133);
 | 
				
			||||||
 | 
					            this.rbCinema.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.rbCinema.Name = "rbCinema";
 | 
					            this.rbCinema.Name = "rbCinema";
 | 
				
			||||||
            this.rbCinema.Size = new System.Drawing.Size(169, 29);
 | 
					            this.rbCinema.Size = new System.Drawing.Size(137, 24);
 | 
				
			||||||
            this.rbCinema.TabIndex = 2;
 | 
					            this.rbCinema.TabIndex = 2;
 | 
				
			||||||
            this.rbCinema.TabStop = true;
 | 
					            this.rbCinema.TabStop = true;
 | 
				
			||||||
            this.rbCinema.Tag = "C";
 | 
					            this.rbCinema.Tag = "C";
 | 
				
			||||||
@ -211,9 +219,10 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.rbOffice.AutoSize = true;
 | 
					            this.rbOffice.AutoSize = true;
 | 
				
			||||||
            this.rbOffice.Cursor = System.Windows.Forms.Cursors.Hand;
 | 
					            this.rbOffice.Cursor = System.Windows.Forms.Cursors.Hand;
 | 
				
			||||||
            this.rbOffice.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
					            this.rbOffice.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
				
			||||||
            this.rbOffice.Location = new System.Drawing.Point(20, 128);
 | 
					            this.rbOffice.Location = new System.Drawing.Point(16, 101);
 | 
				
			||||||
 | 
					            this.rbOffice.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.rbOffice.Name = "rbOffice";
 | 
					            this.rbOffice.Name = "rbOffice";
 | 
				
			||||||
            this.rbOffice.Size = new System.Drawing.Size(154, 29);
 | 
					            this.rbOffice.Size = new System.Drawing.Size(123, 24);
 | 
				
			||||||
            this.rbOffice.TabIndex = 1;
 | 
					            this.rbOffice.TabIndex = 1;
 | 
				
			||||||
            this.rbOffice.TabStop = true;
 | 
					            this.rbOffice.TabStop = true;
 | 
				
			||||||
            this.rbOffice.Tag = "O";
 | 
					            this.rbOffice.Tag = "O";
 | 
				
			||||||
@ -229,14 +238,14 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.tabControl1.Controls.Add(this.tabPage3);
 | 
					            this.tabControl1.Controls.Add(this.tabPage3);
 | 
				
			||||||
            this.tabControl1.Controls.Add(this.tabPage4);
 | 
					            this.tabControl1.Controls.Add(this.tabPage4);
 | 
				
			||||||
            this.tabControl1.Controls.Add(this.tabPage5);
 | 
					            this.tabControl1.Controls.Add(this.tabPage5);
 | 
				
			||||||
            this.tabControl1.Cursor = System.Windows.Forms.Cursors.Arrow;
 | 
					 | 
				
			||||||
            this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
 | 
					            this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
 | 
				
			||||||
            this.tabControl1.HotTrack = true;
 | 
					            this.tabControl1.HotTrack = true;
 | 
				
			||||||
            this.tabControl1.ItemSize = new System.Drawing.Size(150, 40);
 | 
					            this.tabControl1.ItemSize = new System.Drawing.Size(150, 40);
 | 
				
			||||||
            this.tabControl1.Location = new System.Drawing.Point(0, 0);
 | 
					            this.tabControl1.Location = new System.Drawing.Point(0, 0);
 | 
				
			||||||
 | 
					            this.tabControl1.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.tabControl1.Name = "tabControl1";
 | 
					            this.tabControl1.Name = "tabControl1";
 | 
				
			||||||
            this.tabControl1.SelectedIndex = 0;
 | 
					            this.tabControl1.SelectedIndex = 0;
 | 
				
			||||||
            this.tabControl1.Size = new System.Drawing.Size(1273, 764);
 | 
					            this.tabControl1.Size = new System.Drawing.Size(991, 603);
 | 
				
			||||||
            this.tabControl1.TabIndex = 0;
 | 
					            this.tabControl1.TabIndex = 0;
 | 
				
			||||||
            this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
 | 
					            this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
@ -246,10 +255,10 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.tabPage1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
 | 
					            this.tabPage1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
 | 
				
			||||||
            this.tabPage1.Controls.Add(this.splitContainer2);
 | 
					            this.tabPage1.Controls.Add(this.splitContainer2);
 | 
				
			||||||
            this.tabPage1.Location = new System.Drawing.Point(4, 44);
 | 
					            this.tabPage1.Location = new System.Drawing.Point(4, 44);
 | 
				
			||||||
            this.tabPage1.Margin = new System.Windows.Forms.Padding(5);
 | 
					            this.tabPage1.Margin = new System.Windows.Forms.Padding(4);
 | 
				
			||||||
            this.tabPage1.Name = "tabPage1";
 | 
					            this.tabPage1.Name = "tabPage1";
 | 
				
			||||||
            this.tabPage1.Padding = new System.Windows.Forms.Padding(5);
 | 
					            this.tabPage1.Padding = new System.Windows.Forms.Padding(4);
 | 
				
			||||||
            this.tabPage1.Size = new System.Drawing.Size(1265, 716);
 | 
					            this.tabPage1.Size = new System.Drawing.Size(983, 555);
 | 
				
			||||||
            this.tabPage1.TabIndex = 0;
 | 
					            this.tabPage1.TabIndex = 0;
 | 
				
			||||||
            this.tabPage1.Text = "Niagara Tag";
 | 
					            this.tabPage1.Text = "Niagara Tag";
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
@ -257,7 +266,8 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.splitContainer2.Cursor = System.Windows.Forms.Cursors.HSplit;
 | 
					            this.splitContainer2.Cursor = System.Windows.Forms.Cursors.HSplit;
 | 
				
			||||||
            this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
 | 
					            this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
 | 
				
			||||||
            this.splitContainer2.Location = new System.Drawing.Point(5, 5);
 | 
					            this.splitContainer2.Location = new System.Drawing.Point(4, 4);
 | 
				
			||||||
 | 
					            this.splitContainer2.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.splitContainer2.Name = "splitContainer2";
 | 
					            this.splitContainer2.Name = "splitContainer2";
 | 
				
			||||||
            this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
 | 
					            this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
@ -273,24 +283,27 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            // splitContainer2.Panel2
 | 
					            // splitContainer2.Panel2
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.splitContainer2.Panel2.Controls.Add(this.splitContainer4);
 | 
					            this.splitContainer2.Panel2.Controls.Add(this.splitContainer4);
 | 
				
			||||||
            this.splitContainer2.Size = new System.Drawing.Size(1251, 702);
 | 
					            this.splitContainer2.Size = new System.Drawing.Size(971, 543);
 | 
				
			||||||
            this.splitContainer2.SplitterDistance = 87;
 | 
					            this.splitContainer2.SplitterDistance = 67;
 | 
				
			||||||
 | 
					            this.splitContainer2.SplitterWidth = 3;
 | 
				
			||||||
            this.splitContainer2.TabIndex = 1;
 | 
					            this.splitContainer2.TabIndex = 1;
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // fp_tab1
 | 
					            // fp_tab1
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.fp_tab1.Dock = System.Windows.Forms.DockStyle.Right;
 | 
					            this.fp_tab1.Dock = System.Windows.Forms.DockStyle.Right;
 | 
				
			||||||
            this.fp_tab1.Location = new System.Drawing.Point(399, 0);
 | 
					            this.fp_tab1.Location = new System.Drawing.Point(308, 0);
 | 
				
			||||||
 | 
					            this.fp_tab1.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.fp_tab1.Name = "fp_tab1";
 | 
					            this.fp_tab1.Name = "fp_tab1";
 | 
				
			||||||
            this.fp_tab1.Size = new System.Drawing.Size(852, 87);
 | 
					            this.fp_tab1.Size = new System.Drawing.Size(663, 67);
 | 
				
			||||||
            this.fp_tab1.TabIndex = 10;
 | 
					            this.fp_tab1.TabIndex = 10;
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // lbMsg
 | 
					            // lbMsg
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.lbMsg.AutoSize = true;
 | 
					            this.lbMsg.AutoSize = true;
 | 
				
			||||||
            this.lbMsg.Location = new System.Drawing.Point(14, 79);
 | 
					            this.lbMsg.Location = new System.Drawing.Point(11, 62);
 | 
				
			||||||
 | 
					            this.lbMsg.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
 | 
				
			||||||
            this.lbMsg.Name = "lbMsg";
 | 
					            this.lbMsg.Name = "lbMsg";
 | 
				
			||||||
            this.lbMsg.Size = new System.Drawing.Size(18, 19);
 | 
					            this.lbMsg.Size = new System.Drawing.Size(16, 15);
 | 
				
			||||||
            this.lbMsg.TabIndex = 2;
 | 
					            this.lbMsg.TabIndex = 2;
 | 
				
			||||||
            this.lbMsg.Text = "...";
 | 
					            this.lbMsg.Text = "...";
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
@ -298,9 +311,10 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.rball.AutoSize = true;
 | 
					            this.rball.AutoSize = true;
 | 
				
			||||||
            this.rball.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
					            this.rball.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
				
			||||||
            this.rball.Location = new System.Drawing.Point(14, 47);
 | 
					            this.rball.Location = new System.Drawing.Point(11, 37);
 | 
				
			||||||
 | 
					            this.rball.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.rball.Name = "rball";
 | 
					            this.rball.Name = "rball";
 | 
				
			||||||
            this.rball.Size = new System.Drawing.Size(73, 29);
 | 
					            this.rball.Size = new System.Drawing.Size(59, 24);
 | 
				
			||||||
            this.rball.TabIndex = 1;
 | 
					            this.rball.TabIndex = 1;
 | 
				
			||||||
            this.rball.Text = "全部";
 | 
					            this.rball.Text = "全部";
 | 
				
			||||||
            this.rball.UseVisualStyleBackColor = true;
 | 
					            this.rball.UseVisualStyleBackColor = true;
 | 
				
			||||||
@ -311,9 +325,10 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.rb100.AutoSize = true;
 | 
					            this.rb100.AutoSize = true;
 | 
				
			||||||
            this.rb100.Checked = true;
 | 
					            this.rb100.Checked = true;
 | 
				
			||||||
            this.rb100.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
					            this.rb100.Font = new System.Drawing.Font("Microsoft JhengHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
 | 
				
			||||||
            this.rb100.Location = new System.Drawing.Point(14, 12);
 | 
					            this.rb100.Location = new System.Drawing.Point(11, 9);
 | 
				
			||||||
 | 
					            this.rb100.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.rb100.Name = "rb100";
 | 
					            this.rb100.Name = "rb100";
 | 
				
			||||||
            this.rb100.Size = new System.Drawing.Size(94, 29);
 | 
					            this.rb100.Size = new System.Drawing.Size(74, 24);
 | 
				
			||||||
            this.rb100.TabIndex = 0;
 | 
					            this.rb100.TabIndex = 0;
 | 
				
			||||||
            this.rb100.TabStop = true;
 | 
					            this.rb100.TabStop = true;
 | 
				
			||||||
            this.rb100.Text = "100 筆";
 | 
					            this.rb100.Text = "100 筆";
 | 
				
			||||||
@ -325,6 +340,7 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.splitContainer4.Cursor = System.Windows.Forms.Cursors.VSplit;
 | 
					            this.splitContainer4.Cursor = System.Windows.Forms.Cursors.VSplit;
 | 
				
			||||||
            this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
 | 
					            this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
 | 
				
			||||||
            this.splitContainer4.Location = new System.Drawing.Point(0, 0);
 | 
					            this.splitContainer4.Location = new System.Drawing.Point(0, 0);
 | 
				
			||||||
 | 
					            this.splitContainer4.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.splitContainer4.Name = "splitContainer4";
 | 
					            this.splitContainer4.Name = "splitContainer4";
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // splitContainer4.Panel1
 | 
					            // splitContainer4.Panel1
 | 
				
			||||||
@ -334,32 +350,33 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            // splitContainer4.Panel2
 | 
					            // splitContainer4.Panel2
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.splitContainer4.Panel2.Cursor = System.Windows.Forms.Cursors.Arrow;
 | 
					            this.splitContainer4.Panel2.Cursor = System.Windows.Forms.Cursors.Arrow;
 | 
				
			||||||
            this.splitContainer4.Size = new System.Drawing.Size(1251, 611);
 | 
					            this.splitContainer4.Size = new System.Drawing.Size(971, 473);
 | 
				
			||||||
            this.splitContainer4.SplitterDistance = 849;
 | 
					            this.splitContainer4.SplitterDistance = 658;
 | 
				
			||||||
            this.splitContainer4.SplitterWidth = 10;
 | 
					            this.splitContainer4.SplitterWidth = 8;
 | 
				
			||||||
            this.splitContainer4.TabIndex = 0;
 | 
					            this.splitContainer4.TabIndex = 0;
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // dataGridView1
 | 
					            // dataGridView1
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.dataGridView1.AllowUserToOrderColumns = true;
 | 
					            this.dataGridView1.AllowUserToOrderColumns = true;
 | 
				
			||||||
            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
 | 
					            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
 | 
				
			||||||
            this.dataGridView1.Cursor = System.Windows.Forms.Cursors.Arrow;
 | 
					 | 
				
			||||||
            this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
 | 
					            this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
 | 
				
			||||||
            this.dataGridView1.Location = new System.Drawing.Point(0, 0);
 | 
					            this.dataGridView1.Location = new System.Drawing.Point(0, 0);
 | 
				
			||||||
 | 
					            this.dataGridView1.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.dataGridView1.Name = "dataGridView1";
 | 
					            this.dataGridView1.Name = "dataGridView1";
 | 
				
			||||||
            this.dataGridView1.RowHeadersWidth = 51;
 | 
					            this.dataGridView1.RowHeadersWidth = 51;
 | 
				
			||||||
            this.dataGridView1.Size = new System.Drawing.Size(849, 611);
 | 
					            this.dataGridView1.Size = new System.Drawing.Size(658, 473);
 | 
				
			||||||
            this.dataGridView1.TabIndex = 1;
 | 
					            this.dataGridView1.TabIndex = 1;
 | 
				
			||||||
 | 
					            this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
 | 
				
			||||||
            this.dataGridView1.DataBindingComplete += new System.Windows.Forms.DataGridViewBindingCompleteEventHandler(this.dataGridView1_DataBindingComplete);
 | 
					            this.dataGridView1.DataBindingComplete += new System.Windows.Forms.DataGridViewBindingCompleteEventHandler(this.dataGridView1_DataBindingComplete);
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // tabPage2
 | 
					            // tabPage2
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.tabPage2.Controls.Add(this.splitContainer3);
 | 
					            this.tabPage2.Controls.Add(this.splitContainer3);
 | 
				
			||||||
            this.tabPage2.Location = new System.Drawing.Point(4, 44);
 | 
					            this.tabPage2.Location = new System.Drawing.Point(4, 44);
 | 
				
			||||||
            this.tabPage2.Margin = new System.Windows.Forms.Padding(5);
 | 
					            this.tabPage2.Margin = new System.Windows.Forms.Padding(4);
 | 
				
			||||||
            this.tabPage2.Name = "tabPage2";
 | 
					            this.tabPage2.Name = "tabPage2";
 | 
				
			||||||
            this.tabPage2.Padding = new System.Windows.Forms.Padding(5);
 | 
					            this.tabPage2.Padding = new System.Windows.Forms.Padding(4);
 | 
				
			||||||
            this.tabPage2.Size = new System.Drawing.Size(1265, 716);
 | 
					            this.tabPage2.Size = new System.Drawing.Size(983, 555);
 | 
				
			||||||
            this.tabPage2.TabIndex = 1;
 | 
					            this.tabPage2.TabIndex = 1;
 | 
				
			||||||
            this.tabPage2.Text = "Niagara -> DB";
 | 
					            this.tabPage2.Text = "Niagara -> DB";
 | 
				
			||||||
            this.tabPage2.UseVisualStyleBackColor = true;
 | 
					            this.tabPage2.UseVisualStyleBackColor = true;
 | 
				
			||||||
@ -368,7 +385,8 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.splitContainer3.Cursor = System.Windows.Forms.Cursors.HSplit;
 | 
					            this.splitContainer3.Cursor = System.Windows.Forms.Cursors.HSplit;
 | 
				
			||||||
            this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
 | 
					            this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
 | 
				
			||||||
            this.splitContainer3.Location = new System.Drawing.Point(5, 5);
 | 
					            this.splitContainer3.Location = new System.Drawing.Point(4, 4);
 | 
				
			||||||
 | 
					            this.splitContainer3.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.splitContainer3.Name = "splitContainer3";
 | 
					            this.splitContainer3.Name = "splitContainer3";
 | 
				
			||||||
            this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
 | 
					            this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
@ -383,8 +401,9 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            // splitContainer3.Panel2
 | 
					            // splitContainer3.Panel2
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.splitContainer3.Panel2.Controls.Add(this.dataGridView2);
 | 
					            this.splitContainer3.Panel2.Controls.Add(this.dataGridView2);
 | 
				
			||||||
            this.splitContainer3.Size = new System.Drawing.Size(1255, 706);
 | 
					            this.splitContainer3.Size = new System.Drawing.Size(975, 547);
 | 
				
			||||||
            this.splitContainer3.SplitterDistance = 86;
 | 
					            this.splitContainer3.SplitterDistance = 66;
 | 
				
			||||||
 | 
					            this.splitContainer3.SplitterWidth = 3;
 | 
				
			||||||
            this.splitContainer3.TabIndex = 2;
 | 
					            this.splitContainer3.TabIndex = 2;
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // tableLayoutPanel1
 | 
					            // tableLayoutPanel1
 | 
				
			||||||
@ -406,85 +425,95 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.tableLayoutPanel1.Controls.Add(this.cbShowEmpty, 0, 0);
 | 
					            this.tableLayoutPanel1.Controls.Add(this.cbShowEmpty, 0, 0);
 | 
				
			||||||
            this.tableLayoutPanel1.Controls.Add(this.btSearch_N4vsDB, 0, 1);
 | 
					            this.tableLayoutPanel1.Controls.Add(this.btSearch_N4vsDB, 0, 1);
 | 
				
			||||||
            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Right;
 | 
					            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Right;
 | 
				
			||||||
            this.tableLayoutPanel1.Location = new System.Drawing.Point(300, 0);
 | 
					            this.tableLayoutPanel1.Location = new System.Drawing.Point(232, 0);
 | 
				
			||||||
 | 
					            this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
 | 
					            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
 | 
				
			||||||
            this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(5);
 | 
					            this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(4);
 | 
				
			||||||
            this.tableLayoutPanel1.RowCount = 2;
 | 
					            this.tableLayoutPanel1.RowCount = 2;
 | 
				
			||||||
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
 | 
					            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
 | 
				
			||||||
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
 | 
					            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
 | 
				
			||||||
            this.tableLayoutPanel1.Size = new System.Drawing.Size(955, 86);
 | 
					            this.tableLayoutPanel1.Size = new System.Drawing.Size(743, 66);
 | 
				
			||||||
            this.tableLayoutPanel1.TabIndex = 4;
 | 
					            this.tableLayoutPanel1.TabIndex = 4;
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // lbSec2
 | 
					            // lbSec2
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.lbSec2.AutoSize = true;
 | 
					            this.lbSec2.AutoSize = true;
 | 
				
			||||||
            this.lbSec2.Location = new System.Drawing.Point(197, 5);
 | 
					            this.lbSec2.Location = new System.Drawing.Point(153, 4);
 | 
				
			||||||
 | 
					            this.lbSec2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
 | 
				
			||||||
            this.lbSec2.Name = "lbSec2";
 | 
					            this.lbSec2.Name = "lbSec2";
 | 
				
			||||||
            this.lbSec2.Size = new System.Drawing.Size(167, 19);
 | 
					            this.lbSec2.Size = new System.Drawing.Size(133, 15);
 | 
				
			||||||
            this.lbSec2.TabIndex = 1;
 | 
					            this.lbSec2.TabIndex = 1;
 | 
				
			||||||
            this.lbSec2.Text = "第二碼 - system_code1";
 | 
					            this.lbSec2.Text = "第二碼 - system_code1";
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // lbSec3
 | 
					            // lbSec3
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.lbSec3.AutoSize = true;
 | 
					            this.lbSec3.AutoSize = true;
 | 
				
			||||||
            this.lbSec3.Location = new System.Drawing.Point(386, 5);
 | 
					            this.lbSec3.Location = new System.Drawing.Point(300, 4);
 | 
				
			||||||
 | 
					            this.lbSec3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
 | 
				
			||||||
            this.lbSec3.Name = "lbSec3";
 | 
					            this.lbSec3.Name = "lbSec3";
 | 
				
			||||||
            this.lbSec3.Size = new System.Drawing.Size(101, 19);
 | 
					            this.lbSec3.Size = new System.Drawing.Size(81, 15);
 | 
				
			||||||
            this.lbSec3.TabIndex = 2;
 | 
					            this.lbSec3.TabIndex = 2;
 | 
				
			||||||
            this.lbSec3.Text = "第三碼 - floor";
 | 
					            this.lbSec3.Text = "第三碼 - floor";
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // lbSec4
 | 
					            // lbSec4
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.lbSec4.AutoSize = true;
 | 
					            this.lbSec4.AutoSize = true;
 | 
				
			||||||
            this.lbSec4.Location = new System.Drawing.Point(575, 5);
 | 
					            this.lbSec4.Location = new System.Drawing.Point(447, 4);
 | 
				
			||||||
 | 
					            this.lbSec4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
 | 
				
			||||||
            this.lbSec4.Name = "lbSec4";
 | 
					            this.lbSec4.Name = "lbSec4";
 | 
				
			||||||
            this.lbSec4.Size = new System.Drawing.Size(167, 19);
 | 
					            this.lbSec4.Size = new System.Drawing.Size(133, 15);
 | 
				
			||||||
            this.lbSec4.TabIndex = 3;
 | 
					            this.lbSec4.TabIndex = 3;
 | 
				
			||||||
            this.lbSec4.Text = "第四碼 - system_code2";
 | 
					            this.lbSec4.Text = "第四碼 - system_code2";
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // lbSec5
 | 
					            // lbSec5
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.lbSec5.AutoSize = true;
 | 
					            this.lbSec5.AutoSize = true;
 | 
				
			||||||
            this.lbSec5.Location = new System.Drawing.Point(764, 5);
 | 
					            this.lbSec5.Location = new System.Drawing.Point(594, 4);
 | 
				
			||||||
 | 
					            this.lbSec5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
 | 
				
			||||||
            this.lbSec5.Name = "lbSec5";
 | 
					            this.lbSec5.Name = "lbSec5";
 | 
				
			||||||
            this.lbSec5.Size = new System.Drawing.Size(157, 19);
 | 
					            this.lbSec5.Size = new System.Drawing.Size(125, 15);
 | 
				
			||||||
            this.lbSec5.TabIndex = 4;
 | 
					            this.lbSec5.TabIndex = 4;
 | 
				
			||||||
            this.lbSec5.Text = "第五碼 - device_serial";
 | 
					            this.lbSec5.Text = "第五碼 - device_serial";
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // tbSec2
 | 
					            // tbSec2
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.tbSec2.Location = new System.Drawing.Point(197, 46);
 | 
					            this.tbSec2.Location = new System.Drawing.Point(153, 35);
 | 
				
			||||||
 | 
					            this.tbSec2.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.tbSec2.Name = "tbSec2";
 | 
					            this.tbSec2.Name = "tbSec2";
 | 
				
			||||||
            this.tbSec2.Size = new System.Drawing.Size(125, 27);
 | 
					            this.tbSec2.Size = new System.Drawing.Size(98, 23);
 | 
				
			||||||
            this.tbSec2.TabIndex = 5;
 | 
					            this.tbSec2.TabIndex = 5;
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // tbSec3
 | 
					            // tbSec3
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.tbSec3.Location = new System.Drawing.Point(386, 46);
 | 
					            this.tbSec3.Location = new System.Drawing.Point(300, 35);
 | 
				
			||||||
 | 
					            this.tbSec3.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.tbSec3.Name = "tbSec3";
 | 
					            this.tbSec3.Name = "tbSec3";
 | 
				
			||||||
            this.tbSec3.Size = new System.Drawing.Size(125, 27);
 | 
					            this.tbSec3.Size = new System.Drawing.Size(98, 23);
 | 
				
			||||||
            this.tbSec3.TabIndex = 6;
 | 
					            this.tbSec3.TabIndex = 6;
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // tbSec4
 | 
					            // tbSec4
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.tbSec4.Location = new System.Drawing.Point(575, 46);
 | 
					            this.tbSec4.Location = new System.Drawing.Point(447, 35);
 | 
				
			||||||
 | 
					            this.tbSec4.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.tbSec4.Name = "tbSec4";
 | 
					            this.tbSec4.Name = "tbSec4";
 | 
				
			||||||
            this.tbSec4.Size = new System.Drawing.Size(125, 27);
 | 
					            this.tbSec4.Size = new System.Drawing.Size(98, 23);
 | 
				
			||||||
            this.tbSec4.TabIndex = 7;
 | 
					            this.tbSec4.TabIndex = 7;
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // tbSec5
 | 
					            // tbSec5
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.tbSec5.Location = new System.Drawing.Point(764, 46);
 | 
					            this.tbSec5.Location = new System.Drawing.Point(594, 35);
 | 
				
			||||||
 | 
					            this.tbSec5.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.tbSec5.Name = "tbSec5";
 | 
					            this.tbSec5.Name = "tbSec5";
 | 
				
			||||||
            this.tbSec5.Size = new System.Drawing.Size(125, 27);
 | 
					            this.tbSec5.Size = new System.Drawing.Size(98, 23);
 | 
				
			||||||
            this.tbSec5.TabIndex = 8;
 | 
					            this.tbSec5.TabIndex = 8;
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // cbShowEmpty
 | 
					            // cbShowEmpty
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.cbShowEmpty.AutoSize = true;
 | 
					            this.cbShowEmpty.AutoSize = true;
 | 
				
			||||||
            this.cbShowEmpty.Location = new System.Drawing.Point(8, 8);
 | 
					            this.cbShowEmpty.Location = new System.Drawing.Point(6, 6);
 | 
				
			||||||
 | 
					            this.cbShowEmpty.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.cbShowEmpty.Name = "cbShowEmpty";
 | 
					            this.cbShowEmpty.Name = "cbShowEmpty";
 | 
				
			||||||
            this.cbShowEmpty.Size = new System.Drawing.Size(136, 23);
 | 
					            this.cbShowEmpty.Size = new System.Drawing.Size(110, 19);
 | 
				
			||||||
            this.cbShowEmpty.TabIndex = 0;
 | 
					            this.cbShowEmpty.TabIndex = 0;
 | 
				
			||||||
            this.cbShowEmpty.Text = "只顯示缺失部分";
 | 
					            this.cbShowEmpty.Text = "只顯示缺失部分";
 | 
				
			||||||
            this.cbShowEmpty.UseVisualStyleBackColor = true;
 | 
					            this.cbShowEmpty.UseVisualStyleBackColor = true;
 | 
				
			||||||
@ -492,9 +521,10 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // btSearch_N4vsDB
 | 
					            // btSearch_N4vsDB
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.btSearch_N4vsDB.Location = new System.Drawing.Point(8, 46);
 | 
					            this.btSearch_N4vsDB.Location = new System.Drawing.Point(6, 35);
 | 
				
			||||||
 | 
					            this.btSearch_N4vsDB.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.btSearch_N4vsDB.Name = "btSearch_N4vsDB";
 | 
					            this.btSearch_N4vsDB.Name = "btSearch_N4vsDB";
 | 
				
			||||||
            this.btSearch_N4vsDB.Size = new System.Drawing.Size(94, 29);
 | 
					            this.btSearch_N4vsDB.Size = new System.Drawing.Size(73, 23);
 | 
				
			||||||
            this.btSearch_N4vsDB.TabIndex = 9;
 | 
					            this.btSearch_N4vsDB.TabIndex = 9;
 | 
				
			||||||
            this.btSearch_N4vsDB.Text = "查詢";
 | 
					            this.btSearch_N4vsDB.Text = "查詢";
 | 
				
			||||||
            this.btSearch_N4vsDB.UseVisualStyleBackColor = true;
 | 
					            this.btSearch_N4vsDB.UseVisualStyleBackColor = true;
 | 
				
			||||||
@ -502,9 +532,10 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // btTagCompare
 | 
					            // btTagCompare
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.btTagCompare.Location = new System.Drawing.Point(14, 8);
 | 
					            this.btTagCompare.Location = new System.Drawing.Point(11, 6);
 | 
				
			||||||
 | 
					            this.btTagCompare.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.btTagCompare.Name = "btTagCompare";
 | 
					            this.btTagCompare.Name = "btTagCompare";
 | 
				
			||||||
            this.btTagCompare.Size = new System.Drawing.Size(121, 38);
 | 
					            this.btTagCompare.Size = new System.Drawing.Size(94, 30);
 | 
				
			||||||
            this.btTagCompare.TabIndex = 3;
 | 
					            this.btTagCompare.TabIndex = 3;
 | 
				
			||||||
            this.btTagCompare.Text = "資料比對";
 | 
					            this.btTagCompare.Text = "資料比對";
 | 
				
			||||||
            this.btTagCompare.UseVisualStyleBackColor = true;
 | 
					            this.btTagCompare.UseVisualStyleBackColor = true;
 | 
				
			||||||
@ -513,9 +544,10 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            // lbMsg2
 | 
					            // lbMsg2
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.lbMsg2.AutoSize = true;
 | 
					            this.lbMsg2.AutoSize = true;
 | 
				
			||||||
            this.lbMsg2.Location = new System.Drawing.Point(14, 51);
 | 
					            this.lbMsg2.Location = new System.Drawing.Point(11, 40);
 | 
				
			||||||
 | 
					            this.lbMsg2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
 | 
				
			||||||
            this.lbMsg2.Name = "lbMsg2";
 | 
					            this.lbMsg2.Name = "lbMsg2";
 | 
				
			||||||
            this.lbMsg2.Size = new System.Drawing.Size(258, 19);
 | 
					            this.lbMsg2.Size = new System.Drawing.Size(207, 15);
 | 
				
			||||||
            this.lbMsg2.TabIndex = 2;
 | 
					            this.lbMsg2.TabIndex = 2;
 | 
				
			||||||
            this.lbMsg2.Text = "依據上頁 Niagara 查詢結果與DB比對";
 | 
					            this.lbMsg2.Text = "依據上頁 Niagara 查詢結果與DB比對";
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
@ -523,21 +555,22 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.dataGridView2.AllowUserToOrderColumns = true;
 | 
					            this.dataGridView2.AllowUserToOrderColumns = true;
 | 
				
			||||||
            this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
 | 
					            this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
 | 
				
			||||||
            this.dataGridView2.Cursor = System.Windows.Forms.Cursors.Arrow;
 | 
					 | 
				
			||||||
            this.dataGridView2.Dock = System.Windows.Forms.DockStyle.Fill;
 | 
					            this.dataGridView2.Dock = System.Windows.Forms.DockStyle.Fill;
 | 
				
			||||||
            this.dataGridView2.Location = new System.Drawing.Point(0, 0);
 | 
					            this.dataGridView2.Location = new System.Drawing.Point(0, 0);
 | 
				
			||||||
 | 
					            this.dataGridView2.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.dataGridView2.Name = "dataGridView2";
 | 
					            this.dataGridView2.Name = "dataGridView2";
 | 
				
			||||||
            this.dataGridView2.RowHeadersWidth = 51;
 | 
					            this.dataGridView2.RowHeadersWidth = 51;
 | 
				
			||||||
            this.dataGridView2.Size = new System.Drawing.Size(1255, 616);
 | 
					            this.dataGridView2.Size = new System.Drawing.Size(975, 478);
 | 
				
			||||||
            this.dataGridView2.TabIndex = 0;
 | 
					            this.dataGridView2.TabIndex = 0;
 | 
				
			||||||
            this.dataGridView2.DataBindingComplete += new System.Windows.Forms.DataGridViewBindingCompleteEventHandler(this.dataGridView1_DataBindingComplete);
 | 
					            this.dataGridView2.DataBindingComplete += new System.Windows.Forms.DataGridViewBindingCompleteEventHandler(this.dataGridView1_DataBindingComplete);
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // tabPage3
 | 
					            // tabPage3
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.tabPage3.Location = new System.Drawing.Point(4, 44);
 | 
					            this.tabPage3.Location = new System.Drawing.Point(4, 44);
 | 
				
			||||||
 | 
					            this.tabPage3.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.tabPage3.Name = "tabPage3";
 | 
					            this.tabPage3.Name = "tabPage3";
 | 
				
			||||||
            this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
 | 
					            this.tabPage3.Padding = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.tabPage3.Size = new System.Drawing.Size(1265, 716);
 | 
					            this.tabPage3.Size = new System.Drawing.Size(983, 555);
 | 
				
			||||||
            this.tabPage3.TabIndex = 2;
 | 
					            this.tabPage3.TabIndex = 2;
 | 
				
			||||||
            this.tabPage3.Text = "DB -> Niagara";
 | 
					            this.tabPage3.Text = "DB -> Niagara";
 | 
				
			||||||
            this.tabPage3.UseVisualStyleBackColor = true;
 | 
					            this.tabPage3.UseVisualStyleBackColor = true;
 | 
				
			||||||
@ -545,13 +578,25 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            // tabPage4
 | 
					            // tabPage4
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.tabPage4.Location = new System.Drawing.Point(4, 44);
 | 
					            this.tabPage4.Location = new System.Drawing.Point(4, 44);
 | 
				
			||||||
 | 
					            this.tabPage4.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.tabPage4.Name = "tabPage4";
 | 
					            this.tabPage4.Name = "tabPage4";
 | 
				
			||||||
            this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
 | 
					            this.tabPage4.Padding = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.tabPage4.Size = new System.Drawing.Size(1265, 716);
 | 
					            this.tabPage4.Size = new System.Drawing.Size(983, 555);
 | 
				
			||||||
            this.tabPage4.TabIndex = 3;
 | 
					            this.tabPage4.TabIndex = 3;
 | 
				
			||||||
            this.tabPage4.Text = "Excel 匯入";
 | 
					            this.tabPage4.Text = "Excel 匯入";
 | 
				
			||||||
            this.tabPage4.UseVisualStyleBackColor = true;
 | 
					            this.tabPage4.UseVisualStyleBackColor = true;
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
 | 
					            // tabPage5
 | 
				
			||||||
 | 
					            // 
 | 
				
			||||||
 | 
					            this.tabPage5.Location = new System.Drawing.Point(4, 44);
 | 
				
			||||||
 | 
					            this.tabPage5.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
 | 
					            this.tabPage5.Name = "tabPage5";
 | 
				
			||||||
 | 
					            this.tabPage5.Padding = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
 | 
					            this.tabPage5.Size = new System.Drawing.Size(983, 555);
 | 
				
			||||||
 | 
					            this.tabPage5.TabIndex = 4;
 | 
				
			||||||
 | 
					            this.tabPage5.Text = "即時狀態";
 | 
				
			||||||
 | 
					            this.tabPage5.UseVisualStyleBackColor = true;
 | 
				
			||||||
 | 
					            // 
 | 
				
			||||||
            // splitContainer5
 | 
					            // splitContainer5
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.splitContainer5.Cursor = System.Windows.Forms.Cursors.HSplit;
 | 
					            this.splitContainer5.Cursor = System.Windows.Forms.Cursors.HSplit;
 | 
				
			||||||
@ -586,7 +631,7 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.label1.AutoSize = true;
 | 
					            this.label1.AutoSize = true;
 | 
				
			||||||
            this.label1.Location = new System.Drawing.Point(43, 0);
 | 
					            this.label1.Location = new System.Drawing.Point(43, 0);
 | 
				
			||||||
            this.label1.Name = "label1";
 | 
					            this.label1.Name = "label1";
 | 
				
			||||||
            this.label1.Size = new System.Drawing.Size(34, 171);
 | 
					            this.label1.Size = new System.Drawing.Size(34, 90);
 | 
				
			||||||
            this.label1.TabIndex = 1;
 | 
					            this.label1.TabIndex = 1;
 | 
				
			||||||
            this.label1.Text = "第二碼 - system_code1";
 | 
					            this.label1.Text = "第二碼 - system_code1";
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
@ -599,22 +644,13 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            this.label2.TabIndex = 2;
 | 
					            this.label2.TabIndex = 2;
 | 
				
			||||||
            this.label2.Text = "第三碼 - floor";
 | 
					            this.label2.Text = "第三碼 - floor";
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            // tabPage5
 | 
					 | 
				
			||||||
            // 
 | 
					 | 
				
			||||||
            this.tabPage5.Location = new System.Drawing.Point(4, 44);
 | 
					 | 
				
			||||||
            this.tabPage5.Name = "tabPage5";
 | 
					 | 
				
			||||||
            this.tabPage5.Padding = new System.Windows.Forms.Padding(3);
 | 
					 | 
				
			||||||
            this.tabPage5.Size = new System.Drawing.Size(1265, 716);
 | 
					 | 
				
			||||||
            this.tabPage5.TabIndex = 4;
 | 
					 | 
				
			||||||
            this.tabPage5.Text = "即時狀態";
 | 
					 | 
				
			||||||
            this.tabPage5.UseVisualStyleBackColor = true;
 | 
					 | 
				
			||||||
            // 
 | 
					 | 
				
			||||||
            // fmCheckTagName
 | 
					            // fmCheckTagName
 | 
				
			||||||
            // 
 | 
					            // 
 | 
				
			||||||
            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 19F);
 | 
					            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
 | 
				
			||||||
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
 | 
					            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
 | 
				
			||||||
            this.ClientSize = new System.Drawing.Size(1502, 764);
 | 
					            this.ClientSize = new System.Drawing.Size(1168, 603);
 | 
				
			||||||
            this.Controls.Add(this.splitContainer1);
 | 
					            this.Controls.Add(this.splitContainer1);
 | 
				
			||||||
 | 
					            this.Margin = new System.Windows.Forms.Padding(2);
 | 
				
			||||||
            this.Name = "fmCheckTagName";
 | 
					            this.Name = "fmCheckTagName";
 | 
				
			||||||
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
 | 
					            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
 | 
				
			||||||
            this.Text = "Niagara Tag Management";
 | 
					            this.Text = "Niagara Tag Management";
 | 
				
			||||||
@ -660,7 +696,7 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
        private System.Windows.Forms.RadioButton rbDome2;
 | 
					        private System.Windows.Forms.RadioButton rbDome2;
 | 
				
			||||||
        private System.Windows.Forms.RadioButton rbCinema;
 | 
					        private System.Windows.Forms.RadioButton rbCinema;
 | 
				
			||||||
        private System.Windows.Forms.RadioButton rbOffice;
 | 
					        private System.Windows.Forms.RadioButton rbOffice;
 | 
				
			||||||
        private System.Windows.Forms.RadioButton rbH;
 | 
					        private System.Windows.Forms.RadioButton rbB1;
 | 
				
			||||||
        private System.Windows.Forms.TabControl tabControl1;
 | 
					        private System.Windows.Forms.TabControl tabControl1;
 | 
				
			||||||
        private System.Windows.Forms.TabPage tabPage1;
 | 
					        private System.Windows.Forms.TabPage tabPage1;
 | 
				
			||||||
        private System.Windows.Forms.SplitContainer splitContainer2;
 | 
					        private System.Windows.Forms.SplitContainer splitContainer2;
 | 
				
			||||||
 | 
				
			|||||||
@ -167,7 +167,8 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            {
 | 
					            {
 | 
				
			||||||
                webRequestSvc svc = new webRequestSvc();
 | 
					                webRequestSvc svc = new webRequestSvc();
 | 
				
			||||||
                string bql = url_slot + "bql:select " + top100 + " * from control:ControlPoint ";
 | 
					                string bql = url_slot + "bql:select " + top100 + " * from control:ControlPoint ";
 | 
				
			||||||
                ds = svc.obixQuery("http://60.251.164.125:8080/obix/config/Arena/Program/ObixQuery/query/", bql);
 | 
					                //ds = svc.obixQuery("http://60.251.164.125:8080/obix/config/Arena/Program/ObixQuery/query/", bql);//原本的
 | 
				
			||||||
 | 
					                ds = svc.obixQuery("http://localhost:8080/obix/config/Program/ObixQuery/query/", bql);
 | 
				
			||||||
                dataGridView1.DataSource = ds;
 | 
					                dataGridView1.DataSource = ds;
 | 
				
			||||||
                dataGridView1.Columns[0].Visible = false;
 | 
					                dataGridView1.Columns[0].Visible = false;
 | 
				
			||||||
                dataGridView1.Columns[1].Width = 400;
 | 
					                dataGridView1.Columns[1].Width = 400;
 | 
				
			||||||
@ -423,7 +424,7 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            sb.Insert(0, $@"select * from importTag where building = '{building}' ");
 | 
					            sb.Insert(0, $@"select * from import_niagara_tag where building = '{building}' ");
 | 
				
			||||||
            if (cbShowEmpty.Checked)
 | 
					            if (cbShowEmpty.Checked)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                sb.Append( $@" and db_tags is null;");
 | 
					                sb.Append( $@" and db_tags is null;");
 | 
				
			||||||
@ -435,6 +436,11 @@ namespace tpDomeWinAPP
 | 
				
			|||||||
            
 | 
					            
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //public async void getFireAsync(int deviceKind, IEnumerable<device> ds, DataGridView gv)
 | 
					        //public async void getFireAsync(int deviceKind, IEnumerable<device> ds, DataGridView gv)
 | 
				
			||||||
        //{
 | 
					        //{
 | 
				
			||||||
        //    ///消防設備一次報警1http://greencloud.fic.com.tw:8080/obix/config/NHI/Taipei/Fire/Fire1Level1/out
 | 
					        //    ///消防設備一次報警1http://greencloud.fic.com.tw:8080/obix/config/NHI/Taipei/Fire/Fire1Level1/out
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user