Merge branch 'master' of https://gitea.mjm-staging.developers-homelab.net/BIMS/BIMS
This commit is contained in:
commit
bf61f7aef6
@ -1257,27 +1257,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
|
||||||
|
@ -131,103 +131,246 @@
|
|||||||
<select class="form-control" id="build_menu_sub_modal">
|
<select class="form-control" id="build_menu_sub_modal">
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-12">
|
|
||||||
<label class="form-label"><span class="text-danger">*</span>預設頁面</label>
|
<div class="col-12" id="build_menu_position_l_div">
|
||||||
<div class="row" id="build_menu_drawing_modal">
|
<label class="mb-0 t-gray">左邊區塊</label>
|
||||||
<div class="col">
|
<hr class="mt-1" />
|
||||||
<input type="radio" name="drawing" id="drawing_4" value="4" checked>
|
|
||||||
<label for="drawing_4">
|
<div class="form-group col-12">
|
||||||
昇位圖
|
<label class="form-label"><span class="text-danger">*</span>預設頁面</label>
|
||||||
</label>
|
<div class="row" id="build_menu_drawing_modal">
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<input type="radio" name="drawing" id="drawing_2" value="2">
|
|
||||||
<label for="drawing_2">
|
|
||||||
系統圖
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="col" id="drawing_1_div" style="display: none;">
|
|
||||||
<input type="radio" name="drawing" id="drawing_1" value="1">
|
|
||||||
<label for="drawing_1">
|
|
||||||
樓層平面圖
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-12" id="" name="drawing_extend">
|
|
||||||
<div class="col-12 mb-2 custom-control custom-checkbox align-content-center">
|
|
||||||
<input type="checkbox" class="custom-control-input" name="planimetric_click" id="planimetric_click" value="1" />
|
|
||||||
<label class="custom-control-label" for="planimetric_click">是否顯示平面圖</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-12" id="build_menu_systemurl_modal_div" name="drawing_extend">
|
|
||||||
<label class="form-label" for="build_menu_systemurl_modal"><span class="text-danger">*</span>系統圖URL</label>
|
|
||||||
<input type="text" id="build_menu_systemurl_modal" class="form-control" name="build_menu_systemurl_modal">
|
|
||||||
</div>
|
|
||||||
<div class="form-group col-12" id="build_menu_icon_click_onoff_modal_div" name="drawing_extend">
|
|
||||||
<label class="form-label">昇位圖 - 詳細資料設定</label>
|
|
||||||
@*<div class="row">
|
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<input type="radio" name="icon_click_onoff" id="icon_click_on" value="1">
|
<input type="radio" name="drawing" id="drawing_4" value="4" checked>
|
||||||
<label for="icon_click_on">
|
<label for="drawing_4">
|
||||||
點擊開關
|
昇位圖
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<input type="radio" name="icon_click_onoff" id="icon_click_off" value="0" checked>
|
<input type="radio" name="drawing" id="drawing_2" value="2">
|
||||||
<label for="icon_click_off">
|
<label for="drawing_2">
|
||||||
彈出視窗
|
系統圖
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col" id="drawing_1_div" style="display: none;">
|
||||||
|
<input type="radio" name="drawing" id="drawing_1" value="1">
|
||||||
|
<label for="drawing_1">
|
||||||
|
2D
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<input type="radio" name="drawing" id="drawing_3" value="3">
|
||||||
|
<label for="drawing_3">
|
||||||
|
3D
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<input type="radio" name="drawing" id="drawing_5" value="5">
|
||||||
|
<label for="drawing_5">
|
||||||
|
彈出URL
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-12" id="" name="drawing_extend">
|
||||||
|
<div class="col-12 mb-2 custom-control custom-checkbox align-content-center">
|
||||||
|
<input type="checkbox" class="custom-control-input" name="planimetric_click" id="planimetric_click" value="1" />
|
||||||
|
<label class="custom-control-label" for="planimetric_click">是否顯示平面圖</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-12" id="build_menu_systemurl_modal_div" name="drawing_extend">
|
||||||
|
<label class="form-label" for="build_menu_systemurl_modal"><span class="text-danger">*</span>系統圖URL</label>
|
||||||
|
<input type="text" id="build_menu_systemurl_modal" class="form-control" name="build_menu_systemurl_modal">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-12" id="build_menu_blankurl_modal_div" name="drawing_extend">
|
||||||
|
<label class="form-label" for="build_menu_blankurl_modal"><span class="text-danger">*</span>彈出URL</label>
|
||||||
|
<input type="text" id="build_menu_blankurl_modal" class="form-control" name="build_menu_blankurl_modal">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-12" id="build_menu_icon_click_onoff_modal_div" name="drawing_extend">
|
||||||
|
<label class="form-label">昇位圖 - 詳細資料設定</label>
|
||||||
|
@*<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<input type="radio" name="icon_click_onoff" id="icon_click_on" value="1">
|
||||||
|
<label for="icon_click_on">
|
||||||
|
點擊開關
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<input type="radio" name="icon_click_onoff" id="icon_click_off" value="0" checked>
|
||||||
|
<label for="icon_click_off">
|
||||||
|
彈出視窗
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</div>*@
|
</div>*@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col" style="display:none">
|
<div class="col" style="display:none">
|
||||||
<div class="custom-control custom-checkbox">
|
<div class="custom-control custom-checkbox">
|
||||||
<input type="checkbox" class="custom-control-input" name="icon_click[]" id="icon_click_switch" value="2">
|
<input type="checkbox" class="custom-control-input" name="icon_click[]" id="icon_click_switch" value="2">
|
||||||
<label class="custom-control-label" for="icon_click_switch">點擊開關</label>
|
<label class="custom-control-label" for="icon_click_switch">點擊開關</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col">
|
||||||
<div class="col">
|
<div class="custom-control custom-checkbox">
|
||||||
<div class="custom-control custom-checkbox">
|
<input type="checkbox" class="custom-control-input" name="icon_click[]" id="icon_click_url" value="1">
|
||||||
<input type="checkbox" class="custom-control-input" name="icon_click[]" id="icon_click_url" value="1">
|
<label class="custom-control-label" for="icon_click_url">顯示詳細資料</label>
|
||||||
<label class="custom-control-label" for="icon_click_url">顯示詳細資料</label>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="form-group col-12" id="build_menu_icon_click_url_modal_div" name="drawing_extend">
|
||||||
<div class="form-group col-12" id="build_menu_icon_click_url_modal_div" name="drawing_extend">
|
<label class="form-label" for="build_menu_icon_click_url_modal">詳細資料 URL</label><br>
|
||||||
<label class="form-label" for="build_menu_icon_click_url_modal">詳細資料 URL</label><br>
|
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('device_building_tag')">+/[device_building_tag]</button>
|
||||||
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('device_building_tag')">+/[device_building_tag]</button>
|
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('device_system_tag')">+/[device_system_tag]</button>
|
||||||
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('device_system_tag')">+/[device_system_tag]</button>
|
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('device_floor_tag')">+/[device_floor_tag]</button>
|
||||||
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('device_floor_tag')">+/[device_floor_tag]</button>
|
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('device_name_tag')">+/[device_name_tag]</button>
|
||||||
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('device_name_tag')">+/[device_name_tag]</button>
|
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('device_serial_tag')">+/[device_serial_tag]</button>
|
||||||
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('device_serial_tag')">+/[device_serial_tag]</button>
|
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('tag_name')">+/[tag_name]</button>
|
||||||
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('tag_name')">+/[tag_name]</button>
|
<input type="text" id="build_menu_icon_click_url_modal" class="form-control">
|
||||||
<input type="text" id="build_menu_icon_click_url_modal" class="form-control">
|
</div>
|
||||||
</div>
|
<div class="form-group col-12" id="build_menu_icon_click_url_width_height_modal_div">
|
||||||
<div class="form-group col-12" id="build_menu_icon_click_url_width_height_modal_div">
|
<label class="form-label">詳細資料 顯示視窗設定</label><br>
|
||||||
<label class="form-label">詳細資料 顯示視窗設定</label><br>
|
<div class="row">
|
||||||
<div class="row">
|
<div class="col-6 form-group">
|
||||||
<div class="col-6 form-group">
|
<label class="form-label" for="build_menu_icon_click_url_width_modal">寬(單位:px)</label>
|
||||||
<label class="form-label" for="build_menu_icon_click_url_width_modal">寬(單位:px)</label>
|
<input type="number" step="1" id="build_menu_icon_click_url_width_modal" class="form-control">
|
||||||
<input type="number" step="1" id="build_menu_icon_click_url_width_modal" class="form-control">
|
</div>
|
||||||
</div>
|
<div class="col-6 form-group">
|
||||||
<div class="col-6 form-group">
|
<label class="form-label" for="build_menu_icon_click_url_height_modal">高(單位:px)</label>
|
||||||
<label class="form-label" for="build_menu_icon_click_url_height_modal">高(單位:px)</label>
|
<input type="number" step="1" id="build_menu_icon_click_url_height_modal" class="form-control">
|
||||||
<input type="number" step="1" id="build_menu_icon_click_url_height_modal" class="form-control">
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="form-group col-12" id="build_menu_riser_diagram_url_modal_div" style="display: none">
|
||||||
<div class="form-group col-12" id="build_menu_riser_diagram_url_modal_div" style="display: none">
|
<label class="form-label" for="build_menu_riser_diagram_url_modal">昇位圖 URL</label><br>
|
||||||
<label class="form-label" for="build_menu_riser_diagram_url_modal">昇位圖 URL</label><br>
|
<input type="text" id="build_menu_riser_diagram_url_modal" class="form-control">
|
||||||
<input type="text" id="build_menu_riser_diagram_url_modal" class="form-control">
|
</div>
|
||||||
|
<div class="form-group col-6" id="build_menu_planimetric_floor_modal_div">
|
||||||
|
<label class="form-label" for="build_menu_planimetric_floor_modal"><span class="text-danger">*</span>平面圖預設樓層</label>
|
||||||
|
<select class="form-control" id="build_menu_planimetric_floor_modal">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-6" id="build_menu_planimetric_floor_modal_div">
|
<div class="col-12 mt-3" id="build_menu_position_r_div">
|
||||||
<label class="form-label" for="build_menu_planimetric_floor_modal"><span class="text-danger">*</span>平面圖預設樓層</label>
|
<label class="mb-0 t-gray">右邊區塊</label>
|
||||||
<select class="form-control" id="build_menu_planimetric_floor_modal">
|
<hr class="mt-1" />
|
||||||
</select>
|
|
||||||
|
<div class="form-group col-12">
|
||||||
|
<label class="form-label"><span class="text-danger">*</span>預設頁面</label>
|
||||||
|
<div class="row" id="build_menu_drawing_modal_r">
|
||||||
|
<div class="col">
|
||||||
|
<input type="radio" name="drawing_r" id="drawing_4_r" value="4" checked>
|
||||||
|
<label for="drawing_4_r">
|
||||||
|
昇位圖
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<input type="radio" name="drawing_r" id="drawing_2_r" value="2">
|
||||||
|
<label for="drawing_2_r">
|
||||||
|
系統圖
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="col" id="drawing_1_div_r" style="display: none;">
|
||||||
|
<input type="radio" name="drawing_r" id="drawing_1_r" value="1">
|
||||||
|
<label for="drawing_1_r">
|
||||||
|
2D
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<input type="radio" name="drawing_r" id="drawing_3_r" value="3">
|
||||||
|
<label for="drawing_3_r">
|
||||||
|
3D
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<input type="radio" name="drawing_r" id="drawing_5_r" value="5">
|
||||||
|
<label for="drawing_5_r">
|
||||||
|
彈出URL
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-12" id="" name="drawing_extend_r">
|
||||||
|
<div class="col-12 mb-2 custom-control custom-checkbox align-content-center">
|
||||||
|
<input type="checkbox" class="custom-control-input" name="planimetric_click_r" id="planimetric_click_r" value="1" />
|
||||||
|
<label class="custom-control-label" for="planimetric_click_r">是否顯示平面圖</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-12" id="build_menu_systemurl_modal_div_r" name="drawing_extend">
|
||||||
|
<label class="form-label" for="build_menu_systemurl_modal_r"><span class="text-danger">*</span>系統圖URL</label>
|
||||||
|
<input type="text" id="build_menu_systemurl_modal_r" class="form-control" name="build_menu_systemurl_modal_r">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-12" id="build_menu_blankurl_modal_div_r" name="drawing_extend_r">
|
||||||
|
<label class="form-label" for="build_menu_blankurl_modal_r"><span class="text-danger">*</span>彈出URL</label>
|
||||||
|
<input type="text" id="build_menu_blankurl_modal_r" class="form-control" name="build_menu_blankurl_modal_r">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-12" id="build_menu_icon_click_onoff_modal_div_r" name="drawing_extend_r">
|
||||||
|
<label class="form-label">昇位圖 - 詳細資料設定</label>
|
||||||
|
@*<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<input type="radio" name="icon_click_onoff" id="icon_click_on" value="1">
|
||||||
|
<label for="icon_click_on">
|
||||||
|
點擊開關
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<input type="radio" name="icon_click_onoff" id="icon_click_off" value="0" checked>
|
||||||
|
<label for="icon_click_off">
|
||||||
|
彈出視窗
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>*@
|
||||||
|
<div class="row">
|
||||||
|
<div class="col" style="display:none">
|
||||||
|
<div class="custom-control custom-checkbox">
|
||||||
|
<input type="checkbox" class="custom-control-input" name="icon_click[]_r" id="icon_click_switch_r" value="2">
|
||||||
|
<label class="custom-control-label" for="icon_click_switch_r">點擊開關</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<div class="custom-control custom-checkbox">
|
||||||
|
<input type="checkbox" class="custom-control-input" name="icon_click[]_r" id="icon_click_url_r" value="1">
|
||||||
|
<label class="custom-control-label" for="icon_click_url_r">顯示詳細資料</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-12" id="build_menu_icon_click_url_modal_div_r" name="drawing_extend_r">
|
||||||
|
<label class="form-label" for="build_menu_icon_click_url_modal_r">詳細資料 URL</label><br>
|
||||||
|
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('device_building_tag')">+/[device_building_tag]</button>
|
||||||
|
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('device_system_tag')">+/[device_system_tag]</button>
|
||||||
|
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('device_floor_tag')">+/[device_floor_tag]</button>
|
||||||
|
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('device_name_tag')">+/[device_name_tag]</button>
|
||||||
|
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('device_serial_tag')">+/[device_serial_tag]</button>
|
||||||
|
<button type="button" class="btn btn-secondary waves-effect waves-themed mb-2" onclick="AddTagIntoClickUrl('tag_name')">+/[tag_name]</button>
|
||||||
|
<input type="text" id="build_menu_icon_click_url_modal_r" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-12" id="build_menu_icon_click_url_width_height_modal_div_r">
|
||||||
|
<label class="form-label">詳細資料 顯示視窗設定</label><br>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6 form-group">
|
||||||
|
<label class="form-label" for="build_menu_icon_click_url_width_modal_r">寬(單位:px)</label>
|
||||||
|
<input type="number" step="1" id="build_menu_icon_click_url_width_modal_r" class="form-control">
|
||||||
|
</div>
|
||||||
|
<div class="col-6 form-group">
|
||||||
|
<label class="form-label" for="build_menu_icon_click_url_height_modal_r">高(單位:px)</label>
|
||||||
|
<input type="number" step="1" id="build_menu_icon_click_url_height_modal_r" class="form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-12" id="build_menu_riser_diagram_url_modal_div_r" style="display: none">
|
||||||
|
<label class="form-label" for="build_menu_riser_diagram_url_modal_r">昇位圖 URL</label><br>
|
||||||
|
<input type="text" id="build_menu_riser_diagram_url_modal_r" class="form-control">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-6" id="build_menu_planimetric_floor_modal_div_r">
|
||||||
|
<label class="form-label" for="build_menu_planimetric_floor_modal_r"><span class="text-danger">*</span>平面圖預設樓層</label>
|
||||||
|
<select class="form-control" id="build_menu_planimetric_floor_modal_r">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -258,14 +401,14 @@
|
|||||||
<br>
|
<br>
|
||||||
<span id="menu_floor_main_modal" class="fw-900"></span>
|
<span id="menu_floor_main_modal" class="fw-900"></span>
|
||||||
@*<select class="form-control" id="menu_floor_main_modal" disabled>
|
@*<select class="form-control" id="menu_floor_main_modal" disabled>
|
||||||
</select>*@
|
</select>*@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-6">
|
<div class="form-group col-6">
|
||||||
<label class="form-label" for="menu_floor_sub_modal"><span class="text-danger">*</span>小類</label>
|
<label class="form-label" for="menu_floor_sub_modal"><span class="text-danger">*</span>小類</label>
|
||||||
<br>
|
<br>
|
||||||
<span id="menu_floor_sub_modal" class="fw-900"></span>
|
<span id="menu_floor_sub_modal" class="fw-900"></span>
|
||||||
@*<select class="form-control" id="menu_floor_sub_modal" disabled>
|
@*<select class="form-control" id="menu_floor_sub_modal" disabled>
|
||||||
</select>*@
|
</select>*@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-12">
|
<div class="form-group col-12">
|
||||||
<label class="form-label"><span class="text-danger">*</span>可新增樓層</label>
|
<label class="form-label"><span class="text-danger">*</span>可新增樓層</label>
|
||||||
@ -363,9 +506,9 @@
|
|||||||
this.data = [];
|
this.data = [];
|
||||||
} else {
|
} else {
|
||||||
$.each(this.data, function (k, rel) {
|
$.each(this.data, function (k, rel) {
|
||||||
rel.sub_system_guid_name = "<font color='#7c91df'>" + rel.sub_system_guid_name +"</font>"
|
rel.sub_system_guid_name = "<font color='#7c91df'>" + rel.sub_system_guid_name + "</font>"
|
||||||
if (rel.drawing == 2) {
|
if (rel.drawing == 2) {
|
||||||
rel.drawing_name = rel.drawing_name + "<br>" + '<a href = "' + rel.system_url +'" target="_blank" >點擊連結</a >'
|
rel.drawing_name = rel.drawing_name + "<br>" + '<a href = "' + rel.system_url + '" target="_blank" >點擊連結</a >'
|
||||||
}
|
}
|
||||||
if (rel.drawing == 1) {
|
if (rel.drawing == 1) {
|
||||||
rel.drawing_name = rel.drawing_name + "<br>" + '[' + rel.floor_guid_name + ']'
|
rel.drawing_name = rel.drawing_name + "<br>" + '[' + rel.floor_guid_name + ']'
|
||||||
@ -589,16 +732,17 @@
|
|||||||
$.each($("input[name='icon_click[]']"), function (index, item) {
|
$.each($("input[name='icon_click[]']"), function (index, item) {
|
||||||
$(this).prop("checked", false);
|
$(this).prop("checked", false);
|
||||||
});
|
});
|
||||||
$('#drawing_4').trigger('change');
|
changebuild_menu_drawing_modal();
|
||||||
|
|
||||||
GetSubList($('#build_menu_main_modal').val());
|
GetSubList($('#build_menu_main_modal').val());
|
||||||
GetFloorInSubSystem();
|
GetFloorInSubSystem();
|
||||||
$('#planimetric_click').attr("disabled", false);
|
$('#planimetric_click').attr("disabled", false);
|
||||||
$('#build-menu-modal').modal();
|
$('#build-menu-modal').modal();
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregionplanimetric_click
|
||||||
//#region 修改選擇顯示頁面總類
|
//#region 修改選擇顯示頁面總類
|
||||||
$('#build_menu_drawing_modal').on("change", $("input[name='drawing']"), function () {
|
$('#build-menu-form').on("change", "input[name^=drawing]", function () {
|
||||||
changebuild_menu_drawing_modal();
|
changebuild_menu_drawing_modal(this);
|
||||||
});
|
});
|
||||||
//#endregion
|
//#endregion
|
||||||
$('#build_menu_icon_click_onoff_modal_div').on("click", "input[type=checkbox]", function () {
|
$('#build_menu_icon_click_onoff_modal_div').on("click", "input[type=checkbox]", function () {
|
||||||
@ -709,8 +853,8 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@*$("input[name*='icon_click_onoff'][value='" + rel.data.icon_click + "']").prop("checked", true);*@
|
@*$("input[name*='icon_click_onoff'][value='" + rel.data.icon_click + "']").prop("checked", true);*@
|
||||||
$('#build_menu_icon_click_url_modal').val(rel.data.icon_click_url);
|
$('#build_menu_icon_click_url_modal').val(rel.data.icon_click_url);
|
||||||
if (rel.data.icon_click_url_width != undefined && rel.data.icon_click_url_width != null && rel.data.icon_click_url_width > 0) {
|
if (rel.data.icon_click_url_width != undefined && rel.data.icon_click_url_width != null && rel.data.icon_click_url_width > 0) {
|
||||||
$('#build_menu_icon_click_url_width_modal').val(rel.data.icon_click_url_width);
|
$('#build_menu_icon_click_url_width_modal').val(rel.data.icon_click_url_width);
|
||||||
} else {
|
} else {
|
||||||
@ -730,39 +874,40 @@
|
|||||||
}, 'json');
|
}, 'json');
|
||||||
});
|
});
|
||||||
//#endregion
|
//#endregion
|
||||||
function changebuild_menu_drawing_modal() {
|
function changebuild_menu_drawing_modal(selector = "input[name^='drawing']:checked") {
|
||||||
if ($('input[name="drawing"]:checked').val() == 2) {
|
|
||||||
$('#planimetric_click').attr("disabled", false);
|
$(selector).each(function (index, value) {
|
||||||
$('#build_menu_icon_click_onoff_modal_div').hide();
|
let drawingParent = $(value).parents("[id^=build_menu_position]")
|
||||||
$('#build_menu_icon_click_url_modal_div').hide();
|
$(drawingParent).find('[id^=build_menu_icon_click_onoff_modal_div]').hide();
|
||||||
$('#build_menu_systemurl_modal_div').show();
|
$(drawingParent).find('[id^=build_menu_blankurl_modal_div]').hide();
|
||||||
@*$('#build_menu_riser_diagram_url_modal_div').hide();*@
|
$(drawingParent).find('[id^=build_menu_icon_click_url_modal_div]').hide();
|
||||||
$('#build_menu_icon_click_url_width_height_modal_div').hide();
|
$(drawingParent).find('[id^=build_menu_icon_click_url_width_height_modal_div]').hide();
|
||||||
$('#build_menu_planimetric_floor_modal_div').hide();
|
$(drawingParent).find('[id^=build_menu_planimetric_floor_modal_div]').hide();
|
||||||
} else if ($('input[name="drawing"]:checked').val() == 4) {
|
$(drawingParent).find('[id^=build_menu_systemurl_modal_div]').hide();
|
||||||
$('#planimetric_click').attr("disabled", false);
|
|
||||||
$('#build_menu_systemurl_modal_div').hide();
|
if ($(value).val() == 2) {
|
||||||
$('#build_menu_icon_click_onoff_modal_div').show();
|
$(drawingParent).find('[id^=planimetric_click]').attr("disabled", false);
|
||||||
if ($("#icon_click_url").prop('checked')) {
|
$(drawingParent).find('[id^=build_menu_systemurl_modal_div]').show();
|
||||||
$('#build_menu_icon_click_url_modal_div').show();
|
} else if ($(value).val() == 4) {
|
||||||
$('#build_menu_icon_click_url_width_height_modal_div').show();
|
$(drawingParent).find('[id^="planimetric_click"]').attr("disabled", false);
|
||||||
}
|
$(drawingParent).find('[id^=build_menu_icon_click_onoff_modal_div]').show();
|
||||||
else {
|
if ($(drawingParent).find("[id^=icon_click_url]").prop('checked')) {
|
||||||
$('#build_menu_icon_click_url_modal_div').hide();
|
$(drawingParent).find('[id^=build_menu_icon_click_url_modal_div]').show();
|
||||||
$('#build_menu_icon_click_url_width_height_modal_div').hide();
|
$(drawingParent).find('[id^=build_menu_icon_click_url_width_height_modal_div]').show();
|
||||||
}
|
}
|
||||||
@*$('#build_menu_riser_diagram_url_modal_div').show();*@
|
} else if ($(value).val() == 1) {
|
||||||
|
$(drawingParent).find('[id^=planimetric_click]').prop("checked", true).attr("disabled", true);
|
||||||
|
$(drawingParent).find('[id^=build_menu_planimetric_floor_modal_div]').show();
|
||||||
|
} else if ($(value).val() == 5) {
|
||||||
|
$(drawingParent).find('[id^=planimetric_click]').prop("checked", false);
|
||||||
|
$(drawingParent).find('[id^=build_menu_blankurl_modal_div]').show();
|
||||||
|
} else if ($(value).val() == 3) {
|
||||||
|
$(drawingParent).find('[id^=planimetric_click]').prop("checked", false).attr("disabled", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
$('#build_menu_planimetric_floor_modal_div').hide();
|
|
||||||
} else if ($('input[name="drawing"]:checked').val() == 1) {
|
|
||||||
$('#planimetric_click').prop("checked", true).attr("disabled", true);
|
|
||||||
$('#build_menu_systemurl_modal_div').hide();
|
|
||||||
$('#build_menu_icon_click_onoff_modal_div').hide();
|
|
||||||
$('#build_menu_icon_click_url_modal_div').hide();
|
|
||||||
@*$('#build_menu_riser_diagram_url_modal_div').hide();*@
|
|
||||||
$('#build_menu_icon_click_url_width_height_modal_div').hide();
|
|
||||||
$('#build_menu_planimetric_floor_modal_div').show();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$('#buildMenu_table').on("click", "button.del-btn", function () {
|
$('#buildMenu_table').on("click", "button.del-btn", function () {
|
||||||
var send_data = {
|
var send_data = {
|
||||||
@ -811,9 +956,9 @@
|
|||||||
SelectBuild = $(this).attr('bg-guid');
|
SelectBuild = $(this).attr('bg-guid');
|
||||||
SelectMainSys = $(this).attr('ms-guid');
|
SelectMainSys = $(this).attr('ms-guid');
|
||||||
SelectSubSys = $(this).attr('ss-guid');
|
SelectSubSys = $(this).attr('ss-guid');
|
||||||
@*$('#menu_floor_main_modal').append($("<option />").val($(this).attr('ms-guid')).text($(this).attr('ms-name')));
|
@*$('#menu_floor_main_modal').append($("<option />").val($(this).attr('ms-guid')).text($(this).attr('ms-name')));
|
||||||
$('#menu_floor_sub_modal').append($("<option />").val($(this).attr('ss-guid')).text($(this).attr('ss-name')));*@
|
$('#menu_floor_sub_modal').append($("<option />").val($(this).attr('ss-guid')).text($(this).attr('ss-name')));*@
|
||||||
$('#menu_floor_main_modal').html($(this).attr('ms-name'))
|
$('#menu_floor_main_modal').html($(this).attr('ms-name'))
|
||||||
$('#menu_floor_sub_modal').html($(this).attr('ss-name'))
|
$('#menu_floor_sub_modal').html($(this).attr('ss-name'))
|
||||||
$('#floorcard').show();
|
$('#floorcard').show();
|
||||||
$('#floorcard').find('.card-title').html($(this).attr('ms-name') + "-" + $(this).attr('ss-name') + "-樓層設定");
|
$('#floorcard').find('.card-title').html($(this).attr('ms-name') + "-" + $(this).attr('ss-name') + "-樓層設定");
|
||||||
@ -969,19 +1114,21 @@
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (rel.data.length == 0) {
|
if (rel.data.length == 0) {
|
||||||
$('#drawing_1_div').hide();
|
$('[id^=drawing_1_div]').hide();
|
||||||
$('#build_menu_planimetric_floor_modal_div').hide();
|
$('[id^=build_menu_planimetric_floor_modal_div]').hide();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('#build_menu_planimetric_floor_modal').empty();
|
$('#build_menu_planimetric_floor_modal,#build_menu_planimetric_floor_modal_r').empty();
|
||||||
$.each(rel.data, function (index, val) {
|
$.each(rel.data, function (index, val) {
|
||||||
$('#build_menu_planimetric_floor_modal').append($("<option />").val(val.value).text(val.name));
|
$('#build_menu_planimetric_floor_modal').append($("<option />").val(val.value).text(val.name));
|
||||||
|
$('#build_menu_planimetric_floor_modal_r').append($("<option />").val(val.value).text(val.name));
|
||||||
});
|
});
|
||||||
if (floor != null) {
|
if (floor != null) {
|
||||||
$('#build_menu_planimetric_floor_modal').val(floor);
|
$('#build_menu_planimetric_floor_modal').val(floor);
|
||||||
|
$('#build_menu_planimetric_floor_modal_r').val(floor);
|
||||||
}
|
}
|
||||||
$('#drawing_1_div').show();
|
$('[id^=drawing_1_div]').show();
|
||||||
$('#build_menu_planimetric_floor_modal_div').show();
|
$('[id^=build_menu_planimetric_floor_modal_div]').show();
|
||||||
changebuild_menu_drawing_modal();
|
changebuild_menu_drawing_modal();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,11 @@ for details on configuring this project to bundle and minify static web assets.
|
|||||||
|
|
||||||
/* Sticky footer styles
|
/* Sticky footer styles
|
||||||
-------------------------------------------------- */
|
-------------------------------------------------- */
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--bims-gray:#c3c3c3;
|
||||||
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
@ -38,3 +43,7 @@ label.error {
|
|||||||
.highcharts-credits {
|
.highcharts-credits {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.t-gray {
|
||||||
|
color:var(--bims-gray) !important;
|
||||||
|
}
|
@ -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>
|
@ -74,26 +74,37 @@ namespace tpDomeWinAPP.Models
|
|||||||
public string Device_guid { get; set; }
|
public string Device_guid { get; set; }
|
||||||
public byte Deleted { get; set; }
|
public byte Deleted { get; set; }
|
||||||
public byte Status { get; set; }
|
public byte Status { get; set; }
|
||||||
public string Building_guid { get; set; }
|
public int Priority { get; set; }
|
||||||
public string Building_full_name { get; set; }
|
public int Is_link { get; set; }
|
||||||
public string Main_system_guid { get; set; }
|
//public string Building_guid { get; set; }
|
||||||
public string Main_system_full_name { get; set; }
|
//public string Building_full_name { get; set; }
|
||||||
public string Sub_system_guid { get; set; }
|
//public string Main_system_guid { get; set; }
|
||||||
public string Sub_system_full_name { get; set; }
|
//public string Main_system_full_name { get; set; }
|
||||||
public string Floor_guid { get; set; }
|
//public string Sub_system_guid { get; set; }
|
||||||
public string Floor_full_name { get; set; }
|
//public string Sub_system_full_name { get; set; }
|
||||||
|
//public string Floor_guid { get; set; }
|
||||||
|
//public string Floor_full_name { get; set; }
|
||||||
public string Device_coordinate { get; set; }
|
public string Device_coordinate { get; set; }
|
||||||
public string Device_full_name { get; set; }
|
public string Full_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 { get; set; }
|
||||||
|
public string Device_last_name { get; set; }
|
||||||
|
public string Device_serial_tag { get; set; }
|
||||||
public string Device_number { get; set; } //設備編號
|
public string Device_number { get; set; } //設備編號
|
||||||
public string Device_model { get; set; } //設備型號
|
public string Device_model { get; set; } //設備型號
|
||||||
public string Device_disaster_type_text { get; set; }
|
//public string Device_disaster_type_text { get; set; }
|
||||||
public string Device_system_category_layer3 { get; set; }
|
public string Device_system_category_layer3 { get; set; }
|
||||||
public string Device_image { get; set; }
|
//public string Device_image { get; set; }
|
||||||
public string Device_image_url { get; set; }
|
//public string Device_image_url { get; set; }
|
||||||
public string Device_close_color { get; set; }
|
//public string Device_close_color { get; set; }
|
||||||
public string Device_normal_color { get; set; }
|
//public string Device_normal_color { get; set; }
|
||||||
public string Device_error_color { get; set; }
|
//public string Device_error_color { get; set; }
|
||||||
public string Device_flashing { get; set; }
|
//public string Device_flashing { get; set; }
|
||||||
public string Device_ip { get; set; }
|
public string Device_ip { get; set; }
|
||||||
public string Device_port { get; set; }
|
public string Device_port { get; set; }
|
||||||
public List<DeviceDisaster> Device_disasters { get; set; } //防災類型
|
public List<DeviceDisaster> Device_disasters { get; set; } //防災類型
|
||||||
@ -289,6 +300,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,24 @@ 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 int is_used { 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; }
|
||||||
|
public string device_point_name { 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,16 @@ 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;
|
||||||
|
using static NPOI.HSSF.Util.HSSFColor;
|
||||||
|
|
||||||
namespace tpDomeWinAPP.Service
|
namespace tpDomeWinAPP.Service
|
||||||
{
|
{
|
||||||
@ -25,6 +29,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 +37,318 @@ 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" ;
|
||||||
conn.Execute(ss.ToString());
|
|
||||||
ss = "delete from importTag where building = '" + building + "'";
|
string ss = @" CREATE TABLE IF NOT EXISTS `import_niagara_tag` (
|
||||||
conn.Execute(ss.ToString());
|
`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_unicode_ci;";
|
||||||
|
conn.Execute(ss.ToString());
|
||||||
|
ss = "delete from import_niagara_tag where device_building_tag = '" + building + "'";
|
||||||
|
//string ss = "delete from device where device_building_tag = '" + building + "'";
|
||||||
|
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] + "', '" +
|
||||||
try
|
arrTag[2] + "', '" +
|
||||||
{
|
arrTag[3] + "', '" +
|
||||||
if (i >= 100)
|
arrTag[4] + "', '" +
|
||||||
{
|
arrTag[5] + "', '" +
|
||||||
conn.Execute(sb.ToString());
|
arrTag[6] + "', '" +
|
||||||
sb.Clear();
|
arrTag[7] + "', " +
|
||||||
i = 0;
|
"now());");
|
||||||
}
|
|
||||||
}
|
//sb.Append($@" insert device(device_number, device_guid, deleted, status, priority, device_system_category_layer3, device_area_tag, device_building_tag, device_system_tag,
|
||||||
catch (Exception ex)
|
// device_name_tag, device_floor_tag, device_master, device_last_name, device_serial_tag, created_at, updated_at) values('" +
|
||||||
{
|
// row.tag_name + "', uuid(), 0, 1, 0, '" +
|
||||||
throw ex;
|
// arrTag[0] + "', '" +
|
||||||
}
|
// arrTag[1] + "', '" +
|
||||||
|
// arrTag[2] + "', '" +
|
||||||
|
// arrTag[3] + "', '" +
|
||||||
|
// arrTag[4] + "', '" +
|
||||||
|
// arrTag[5] + "', '" +
|
||||||
|
// arrTag[6] + "', '" +
|
||||||
|
// arrTag[7] + "', " +
|
||||||
|
// "now(), now());");
|
||||||
}
|
}
|
||||||
if (sb.Length > 0)
|
try
|
||||||
{
|
{
|
||||||
conn.Execute(sb.ToString());
|
if (sb.Length > 0)
|
||||||
|
{
|
||||||
|
conn.Execute(sb.ToString());
|
||||||
|
sb.Clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
#region update 其餘 4段 tag
|
{
|
||||||
sb.Clear();
|
throw ex;
|
||||||
sb.Append($@"update importTag set importTag.system_code1 = b.tagName
|
}
|
||||||
from (
|
insertItemFromNiagara(dt, conn, building);
|
||||||
select niagara_tags, building, serial, tagName
|
deviceComparison();
|
||||||
from dbo.importTag a CROSS APPLY [Func_StringSplit](a.niagara_tags, '_')
|
deviceItemComparison();
|
||||||
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_unicode_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 + "'" +
|
||||||
|
");");
|
||||||
|
//var isControll = 0;
|
||||||
|
//var isBool = 0;
|
||||||
|
//if(row2.point_name == "ER" || row2.point_name == "AL" || row2.point_name == "ST")
|
||||||
|
//{
|
||||||
|
// isControll = 1;
|
||||||
|
//}
|
||||||
|
//if(row2.point_name == "ER" || row2.point_name == "ST")
|
||||||
|
//{
|
||||||
|
// isBool = 1;
|
||||||
|
//}
|
||||||
|
//sb.Append($@" insert device_item(deleted, points, is_show, is_show_riserDiagram, is_controll, is_bool, created_at, updated_at)
|
||||||
|
// values('0, " + row2.point_name + "', 1, 0," + isControll + "," + isBool + ", now(), now();");
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (sb.Length > 0)
|
||||||
|
{
|
||||||
|
conn.Execute(sb.ToString());
|
||||||
|
sb.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deviceComparison()
|
||||||
|
{
|
||||||
|
using (MySqlConnection conn = new MySqlConnection(Connection1))
|
||||||
|
{
|
||||||
|
List<NiagaraTags> result;
|
||||||
|
|
||||||
|
conn.Open();
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.Append($@" SELECT m.*
|
||||||
|
FROM import_niagara_tag m
|
||||||
|
LEFT JOIN device d
|
||||||
|
ON m.niagara_tags = d.device_number
|
||||||
|
WHERE d.device_number IS NULL");
|
||||||
|
result = conn.Query<NiagaraTags>(sb.ToString()).ToList<NiagaraTags>();
|
||||||
|
|
||||||
|
sb.Clear();
|
||||||
|
//新增至device, is_link = 1
|
||||||
|
if (result.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var data in result)
|
||||||
|
{
|
||||||
|
sb.Append($@" insert device(device_guid, deleted, status, priority, is_link, device_area_tag,
|
||||||
|
device_building_tag, device_system_tag, device_name_tag, device_floor_tag, device_master,
|
||||||
|
device_last_name, device_serial_tag, device_number, device_system_category_layer3, created_at, updated_at)
|
||||||
|
values(uuid(), 0, 1, 0, 1, '" + //device_guid
|
||||||
|
data.device_area_tag + "', '" + //
|
||||||
|
data.device_building_tag + "', '" +
|
||||||
|
data.device_system_tag + "', '" +
|
||||||
|
data.device_name_tag + "', '" +
|
||||||
|
|
||||||
|
data.device_floor_tag + "', '" +
|
||||||
|
data.device_master_tag + "', '" +
|
||||||
|
data.device_last_name_tag + "', '" +
|
||||||
|
data.device_serial_tag + "', '" +
|
||||||
|
data.niagara_tags + "', '" + //device_number
|
||||||
|
data.device_system_tag + "', now(), now() );");
|
||||||
|
}
|
||||||
|
if(sb.Length > 0)
|
||||||
|
{
|
||||||
|
conn.Execute(sb.ToString());
|
||||||
|
sb.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//device有,niagara沒有,is_link 更新成 0
|
||||||
|
sb.Append($@" SET SQL_SAFE_UPDATES = 0;
|
||||||
|
UPDATE device d LEFT JOIN import_niagara_tag m ON d.device_number = m.niagara_tags
|
||||||
|
SET d.is_link = 0
|
||||||
|
WHERE m.niagara_tags IS NULL");
|
||||||
|
conn.Execute(sb.ToString());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deviceItemComparison()
|
||||||
|
{
|
||||||
|
using (MySqlConnection conn = new MySqlConnection(Connection1))
|
||||||
|
{
|
||||||
|
List<NiagaraTagsForItem> result;
|
||||||
|
|
||||||
|
conn.Open();
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.Append($@" SELECT m.*
|
||||||
|
FROM import_niagara_item m
|
||||||
|
LEFT JOIN device_item d
|
||||||
|
ON m.device_area_tag = d.device_area_tag and m.device_building_tag = d.device_building_tag
|
||||||
|
and m.device_system_tag = d.device_system_tag and m.device_name_tag = d.device_name_tag and m.device_point_name = d.points
|
||||||
|
WHERE d.points IS NULL");
|
||||||
|
result = conn.Query<NiagaraTagsForItem>(sb.ToString()).ToList<NiagaraTagsForItem>();
|
||||||
|
sb.Clear();
|
||||||
|
//新增至device, is_link = 1
|
||||||
|
if (result.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var data in result)
|
||||||
|
{
|
||||||
|
var isControll = 0;
|
||||||
|
var isBool = 0;
|
||||||
|
if (data.device_point_name == "ER" || data.device_point_name == "AL" || data.device_point_name == "ST")
|
||||||
|
{
|
||||||
|
isControll = 1;
|
||||||
|
}
|
||||||
|
if (data.device_point_name == "ER" || data.device_point_name == "ST")
|
||||||
|
{
|
||||||
|
isBool = 1;
|
||||||
|
}
|
||||||
|
sb.Append($@"insert device_item(deleted, points, is_show, is_show_riserDiagram, is_controll, is_bool, is_link, device_area_tag,
|
||||||
|
device_building_tag, device_system_tag, device_name_tag, created_at, updated_at)
|
||||||
|
VALUES (0, '" +
|
||||||
|
data.device_point_name + "', 1, 0, " +
|
||||||
|
isControll + "," +
|
||||||
|
isBool + ", 1, '" +
|
||||||
|
data.device_area_tag + "', '" +
|
||||||
|
data.device_building_tag + "', '" +
|
||||||
|
data.device_system_tag + "', '" +
|
||||||
|
data.device_name_tag + "', " +
|
||||||
|
"now(), now());");
|
||||||
|
}
|
||||||
|
if (sb.Length > 0)
|
||||||
|
{
|
||||||
|
conn.Execute(sb.ToString());
|
||||||
|
sb.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//device有,niagara沒有,is_link 更新成 0
|
||||||
|
sb.Append($@" SET SQL_SAFE_UPDATES = 0;
|
||||||
|
UPDATE device_item d LEFT JOIN import_niagara_item m
|
||||||
|
ON d.device_area_tag = m.device_area_tag and d.device_building_tag = m.device_building_tag
|
||||||
|
and d.device_system_tag = m.device_system_tag and d.device_name_tag = m.device_name_tag and d.points = m.device_point_name
|
||||||
|
SET d.is_link = 0
|
||||||
|
WHERE m.device_point_name IS NULL");
|
||||||
|
conn.Execute(sb.ToString());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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 +360,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 +389,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 +405,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 +418,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 +432,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 +446,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 +467,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 +486,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 +506,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,10 @@ 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 +426,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 +438,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