public override void FMB_View_UDR_Group(FMB_View_UDR_Group_In_Tag View_UDR_Group_In, ref FMB_View_UDR_Group_Out_Tag View_UDR_Group_Out) { DataTable adoFacTable = null; DataTable adoGroupTable = null; DB_Common DBC = new DB_Common(); DBC_MWIPFACDEF MWIPFACDEF = new DBC_MWIPFACDEF(ref DBC); DBC_MFMBUDRDEF MFMBUDRDEF = new DBC_MFMBUDRDEF(ref DBC); try { DBC.gDBConnectionString = StdGlobalVariable.ROXml.GetValue("//appSettings//add[@key='MESConnectionString']"); if (DBC.OpenDB() != true) { View_UDR_Group_Out.h_db_err_msg = DBC.gErrors.ErrMsg; return; } DBC.DB_BeginTransaction(); View_UDR_Group_Out.h_status_value = StdGlobalConstant.MP_FAIL; MWIPFACDEF.Init(); MWIPFACDEF.FACTORY = View_UDR_Group_In.h_factory; if (MWIPFACDEF.SelectData(1, ref adoFacTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { View_UDR_Group_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } View_UDR_Group_Out.h_msg = DBC.gErrors.SqlCode.ToString(); View_UDR_Group_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } MFMBUDRDEF.Init(); MFMBUDRDEF.FACTORY = View_UDR_Group_In.h_factory; MFMBUDRDEF.GROUP_ID = View_UDR_Group_In.group_id; if (MFMBUDRDEF.SelectData(1, ref adoGroupTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { View_UDR_Group_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } View_UDR_Group_Out.h_msg = DBC.gErrors.SqlCode.ToString(); View_UDR_Group_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } View_UDR_Group_Out.group_id = MFMBUDRDEF.GROUP_ID; View_UDR_Group_Out.group_desc = MFMBUDRDEF.GROUP_DESC; View_UDR_Group_Out.create_time = MFMBUDRDEF.CREATE_TIME; View_UDR_Group_Out.update_time = MFMBUDRDEF.UPDATE_TIME; View_UDR_Group_Out.width = MFMBUDRDEF.WIDTH; View_UDR_Group_Out.height = MFMBUDRDEF.HEIGHT; View_UDR_Group_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; } catch (Exception ex) { View_UDR_Group_Out.h_field_msg = ex.Message; return; } finally { DBC.DB_Close(); } }
public override void FMB_View_FMB_Group_List(FMB_View_FMB_Group_List_In_Tag View_FMB_Group_List_In, ref FMB_View_FMB_Group_List_Out_Tag View_FMB_Group_List_Out) { int i_case, i = 0; DataTable adoDataTable = null; DB_Common DBC = new DB_Common(); DBC_MFMBGRPUSR MFMBGRPUSR = new DBC_MFMBGRPUSR(ref DBC); DBC_MFMBUDRDEF MFMBUDRDEF = new DBC_MFMBUDRDEF(ref DBC); DBC_MSECUSRDEF MSECUSRDEF = new DBC_MSECUSRDEF(ref DBC); try { DBC.gDBConnectionString = StdGlobalVariable.ROXml.GetValue("//appSettings//add[@key='MESConnectionString']"); if (DBC.OpenDB() != true) { View_FMB_Group_List_Out.h_db_err_msg = DBC.gErrors.ErrMsg; return; } DBC.DB_BeginTransaction(); View_FMB_Group_List_Out.h_status_value = StdGlobalConstant.MP_FAIL; View_FMB_Group_List_Out._size_udr_group_list = 0; View_FMB_Group_List_Out.count = 0; i_case = 0; if (View_FMB_Group_List_In.h_proc_step == '1') { i_case = 1; } else if (View_FMB_Group_List_In.h_proc_step == '2') { i_case = 2; } MFMBGRPUSR.Init(); MFMBGRPUSR.FACTORY = View_FMB_Group_List_In.h_factory; MFMBGRPUSR.GROUP_ID = View_FMB_Group_List_In.next_group; MFMBGRPUSR.USER_ID = View_FMB_Group_List_In.next_user; if (MFMBGRPUSR.FillData(i_case, ref adoDataTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { View_FMB_Group_List_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } View_FMB_Group_List_Out.h_msg = DBC.gErrors.SqlCode.ToString(); View_FMB_Group_List_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } if (adoDataTable.Rows.Count > 0) { View_FMB_Group_List_Out.udr_group_list = new FMB_View_FMB_Group_List_Out_Tag_udr_group_list[adoDataTable.Rows.Count]; for (i = 0; i < adoDataTable.Rows.Count; i++) { if (i == MAX_FMB_GROUP_COUNT) { View_FMB_Group_List_Out.next_group = adoDataTable.Rows[i]["GROUP_ID"].ToString(); View_FMB_Group_List_Out.next_user = adoDataTable.Rows[i]["USER_ID"].ToString(); break; } View_FMB_Group_List_Out.udr_group_list[i] = new FMB_View_FMB_Group_List_Out_Tag_udr_group_list(); if (View_FMB_Group_List_In.h_proc_step == '1') { View_FMB_Group_List_Out.udr_group_list[i].user = adoDataTable.Rows[i]["USER_ID"].ToString(); MSECUSRDEF.Init(); MSECUSRDEF.FACTORY = View_FMB_Group_List_In.h_factory; MSECUSRDEF.USER_ID = adoDataTable.Rows[i]["USER_ID"].ToString(); MSECUSRDEF.SelectData(i_case, ref adoDataTable); View_FMB_Group_List_Out.udr_group_list[i].user_desc = MSECUSRDEF.USER_DESC; } else if (View_FMB_Group_List_In.h_proc_step == '2') { View_FMB_Group_List_Out.udr_group_list[i].group = adoDataTable.Rows[i]["USER_ID"].ToString(); MFMBUDRDEF.Init(); MFMBUDRDEF.FACTORY = View_FMB_Group_List_In.h_factory; MFMBUDRDEF.GROUP_ID = adoDataTable.Rows[i]["USER_ID"].ToString(); MFMBUDRDEF.SelectData(i_case, ref adoDataTable); View_FMB_Group_List_Out.udr_group_list[i].group_desc = MFMBUDRDEF.GROUP_DESC; } } i++; } View_FMB_Group_List_Out.count = i; View_FMB_Group_List_Out._size_udr_group_list = i; View_FMB_Group_List_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; } catch (Exception ex) { View_FMB_Group_List_Out.h_field_msg = ex.Message; return; } finally { DBC.DB_Close(); } }
public override void FMB_View_LayOut_List(FMB_View_LayOut_List_In_Tag View_LayOut_List_In, ref FMB_View_LayOut_List_Out_Tag View_LayOut_List_Out) { int i = 0; DataTable adoDataTable = null; DB_Common DBC = new DB_Common(); DBC_MFMBFACLYT MFMBFACLYT = new DBC_MFMBFACLYT(ref DBC); try { DBC.gDBConnectionString = StdGlobalVariable.ROXml.GetValue("//appSettings//add[@key='MESConnectionString']"); if (DBC.OpenDB() != true) { View_LayOut_List_Out.h_db_err_msg = DBC.gErrors.ErrMsg; return; } DBC.DB_BeginTransaction(); View_LayOut_List_Out.h_status_value = StdGlobalConstant.MP_FAIL; View_LayOut_List_Out._size_layout_list = 0; View_LayOut_List_Out.count = 0; MFMBFACLYT.Init(); MFMBFACLYT.FACTORY = View_LayOut_List_In.h_factory; MFMBFACLYT.LAYOUT_ID = View_LayOut_List_In.next_layout_id; if (MFMBFACLYT.FillData(1, ref adoDataTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { View_LayOut_List_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } View_LayOut_List_Out.h_msg = DBC.gErrors.SqlCode.ToString(); View_LayOut_List_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } if (adoDataTable.Rows.Count > 0) { View_LayOut_List_Out.layout_list = new FMB_View_LayOut_List_Out_Tag_layout_list[adoDataTable.Rows.Count]; for (i = 0; i < adoDataTable.Rows.Count; i++) { if (i == MAX_LAYOUT_LIST) { View_LayOut_List_Out.next_layout_id = adoDataTable.Rows[i]["LAYOUT_ID"].ToString(); break; } View_LayOut_List_Out.layout_list[i] = new FMB_View_LayOut_List_Out_Tag_layout_list(); View_LayOut_List_Out.layout_list[i].layout_id = adoDataTable.Rows[i]["LAYOUT_ID"].ToString(); View_LayOut_List_Out.layout_list[i].layout_desc = adoDataTable.Rows[i]["LAYOUT_DESC"].ToString(); View_LayOut_List_Out.layout_list[i].width = Convert.ToInt32(adoDataTable.Rows[i]["WIDTH"]); View_LayOut_List_Out.layout_list[i].height = Convert.ToInt32(adoDataTable.Rows[i]["HEIGHT"]); } } View_LayOut_List_Out.count = i; View_LayOut_List_Out._size_layout_list = i; View_LayOut_List_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; } catch (Exception ex) { View_LayOut_List_Out.h_field_msg = ex.Message; return; } finally { DBC.DB_Close(); } }
public override void FMB_UDR_Priority(FMB_UDR_Priority_In_Tag UDR_Priority_In, ref FMB_Cmn_Out_Tag Cmn_Out) { DataTable adoDataTable = null; DB_Common DBC = new DB_Common(); DBC_MFMBUDRLOC MFMBUDRLOC = new DBC_MFMBUDRLOC(ref DBC); try { DBC.gDBConnectionString = StdGlobalVariable.ROXml.GetValue("//appSettings//add[@key='MESConnectionString']"); if (DBC.OpenDB() != true) { Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; return; } DBC.DB_BeginTransaction(); Cmn_Out.h_status_value = StdGlobalConstant.MP_FAIL; MFMBUDRLOC.Init(); MFMBUDRLOC.FACTORY = UDR_Priority_In._C.h_factory; MFMBUDRLOC.GROUP_ID = UDR_Priority_In._C.group; MFMBUDRLOC.RES_ID = UDR_Priority_In._C.res_id; MFMBUDRLOC.RES_TYPE = UDR_Priority_In._C.res_type.ToString(); if (MFMBUDRLOC.SelectData(1, ref adoDataTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } /*Bring to Front*/ if (UDR_Priority_In._C.h_proc_step == '1') { if (MFMBUDRLOC.UpdateData(4) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } if (MFMBUDRLOC.SelectData(2, ref adoDataTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } MFMBUDRLOC.SEQ = MFMBUDRLOC.SEQ + 1; if (MFMBUDRLOC.UpdateData(1) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } } /*Send to Back*/ else if (UDR_Priority_In._C.h_proc_step == '2') { if (MFMBUDRLOC.UpdateData(5) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } MFMBUDRLOC.SEQ = 1; if (MFMBUDRLOC.UpdateData(1) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } } Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; } catch (Exception ex) { Cmn_Out.h_field_msg = ex.Message; return; } finally { DBC.DB_Close(); } }
public override void FMB_View_Resource_List(FMB_View_Resource_List_In_Tag View_Resource_List_In, ref FMB_View_Resource_List_Out_Tag View_Resource_List_Out) { int i, i_case = 0; DataTable adoDataTable = null; DataTable adoResTable = null; DataTable adoImgTable = null; DB_Common DBC = new DB_Common(); DBC_MRASRESDEF MRASRESDEF = new DBC_MRASRESDEF(ref DBC); DBC_MFMBRESIMG MFMBRESIMG = new DBC_MFMBRESIMG(ref DBC); DBC_MFMBRESLOC MFMBRESLOC = new DBC_MFMBRESLOC(ref DBC); DBC_FMBJOIN FMBJOIN = new DBC_FMBJOIN(ref DBC); try { DBC.gDBConnectionString = StdGlobalVariable.ROXml.GetValue("//appSettings//add[@key='MESConnectionString']"); if (DBC.OpenDB() != true) { View_Resource_List_Out.h_db_err_msg = DBC.gErrors.ErrMsg; return; } DBC.DB_BeginTransaction(); View_Resource_List_Out.h_status_value = StdGlobalConstant.MP_FAIL; View_Resource_List_Out._size_res_list = 0; View_Resource_List_Out.count = 0; i = 0; i_case = 0; if (View_Resource_List_In.h_proc_step == '1') { i_case = 1; } else if (View_Resource_List_In.h_proc_step == '4') { i_case = 2; } if (View_Resource_List_In.h_proc_step == '1' || View_Resource_List_In.h_proc_step == '4') { FMBJOIN.Init(); FMBJOIN.FACTORY = View_Resource_List_In.h_factory; FMBJOIN.RES_ID = View_Resource_List_In.next_res_id; if (FMBJOIN.FillResLocList(1, ref adoDataTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { View_Resource_List_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } View_Resource_List_Out.h_msg = DBC.gErrors.SqlCode.ToString(); View_Resource_List_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } if (adoDataTable.Rows.Count > 0) { View_Resource_List_Out.res_list = new FMB_View_Resource_List_Out_Tag_res_list[adoDataTable.Rows.Count]; for (i = 0; i < adoDataTable.Rows.Count; i++) { if (i == MAX_RES_LIST) { View_Resource_List_Out.next_res_id = adoDataTable.Rows[i]["RES_ID"].ToString(); break; } MRASRESDEF.Init(); MRASRESDEF.FACTORY = View_Resource_List_In.h_factory; MRASRESDEF.RES_ID = adoDataTable.Rows[i]["RES_ID"].ToString(); MRASRESDEF.SelectData(1, ref adoResTable); MFMBRESIMG.Init(); MFMBRESIMG.FACTORY = View_Resource_List_In.h_factory; MFMBRESIMG.RES_ID = adoDataTable.Rows[i]["RES_ID"].ToString(); MFMBRESIMG.SelectData(1, ref adoImgTable); View_Resource_List_Out.res_list[i] = new FMB_View_Resource_List_Out_Tag_res_list(); View_Resource_List_Out.res_list[i].res_id = adoDataTable.Rows[i]["RES_ID"].ToString(); View_Resource_List_Out.res_list[i].res_desc = adoDataTable.Rows[i]["RES_DESC"].ToString(); View_Resource_List_Out.res_list[i].attached_flag = adoDataTable.Rows[i]["ATTACHED_FLAG"].ToString()[0]; View_Resource_List_Out.res_list[i].layout_id = adoDataTable.Rows[i]["LAYOUT_ID"].ToString(); View_Resource_List_Out.res_list[i].res_up_down_flag = adoDataTable.Rows[i]["UP_DOWN_FLAG"].ToString()[0]; View_Resource_List_Out.res_list[i].res_type = MRASRESDEF.RES_TYPE; View_Resource_List_Out.res_list[i].area_id = MRASRESDEF.AREA_ID; View_Resource_List_Out.res_list[i].sub_area_id = MRASRESDEF.SUB_AREA_ID; View_Resource_List_Out.res_list[i].res_pri_sts = MRASRESDEF.RES_PRI_STS; View_Resource_List_Out.res_list[i].res_ctrl_mode = MRASRESDEF.RES_CTRL_MODE; View_Resource_List_Out.res_list[i].res_proc_mode = MRASRESDEF.RES_PROC_MODE; View_Resource_List_Out.res_list[i].last_start_time = MRASRESDEF.LAST_START_TIME; View_Resource_List_Out.res_list[i].last_end_time = MRASRESDEF.LAST_END_TIME; View_Resource_List_Out.res_list[i].last_down_time = MRASRESDEF.LAST_DOWN_TIME; View_Resource_List_Out.res_list[i].last_event = MRASRESDEF.LAST_EVENT_ID; View_Resource_List_Out.res_list[i].last_event_time = MRASRESDEF.LAST_EVENT_TIME; View_Resource_List_Out.res_list[i].img_idx = MFMBRESIMG.IMAGE_IDX; } } } if (View_Resource_List_In.h_proc_step == '2' || View_Resource_List_In.h_proc_step == '3') { MRASRESDEF.Init(); MRASRESDEF.FACTORY = View_Resource_List_In.h_factory; MRASRESDEF.RES_ID = View_Resource_List_In.next_res_id; if (MRASRESDEF.FillData(6, ref adoDataTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { View_Resource_List_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } View_Resource_List_Out.h_msg = DBC.gErrors.SqlCode.ToString(); View_Resource_List_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } if (adoDataTable.Rows.Count > 0) { View_Resource_List_Out.res_list = new FMB_View_Resource_List_Out_Tag_res_list[adoDataTable.Rows.Count]; for (i = 0; i < adoDataTable.Rows.Count; i++) { if (i == MAX_RES_LIST) { View_Resource_List_Out.next_res_id = adoDataTable.Rows[i]["RES_ID"].ToString(); break; } View_Resource_List_Out.res_list[i] = new FMB_View_Resource_List_Out_Tag_res_list(); View_Resource_List_Out.res_list[i].res_id = adoDataTable.Rows[i]["RES_ID"].ToString(); View_Resource_List_Out.res_list[i].res_desc = adoDataTable.Rows[i]["RES_DESC"].ToString(); View_Resource_List_Out.res_list[i].res_up_down_flag = adoDataTable.Rows[i]["RES_UP_DOWN_FLAG"].ToString()[0]; View_Resource_List_Out.res_list[i].delete_flag = adoDataTable.Rows[i]["DELETE_FLAG"].ToString()[0]; } } } if (View_Resource_List_In.h_proc_step == '5') { MFMBRESLOC.Init(); MFMBRESLOC.FACTORY = View_Resource_List_In.h_factory; MFMBRESLOC.RES_ID = View_Resource_List_In.next_res_id; MFMBRESLOC.LAYOUT_ID = View_Resource_List_In.layout_id; if (MFMBRESLOC.FillData(2, ref adoDataTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { View_Resource_List_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } View_Resource_List_Out.h_msg = DBC.gErrors.SqlCode.ToString(); View_Resource_List_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } if (adoDataTable.Rows.Count > 0) { View_Resource_List_Out.res_list = new FMB_View_Resource_List_Out_Tag_res_list[adoDataTable.Rows.Count]; for (i = 0; i < adoDataTable.Rows.Count; i++) { if (i == MAX_RES_LIST) { View_Resource_List_Out.next_res_id = adoDataTable.Rows[i]["RES_ID"].ToString(); break; } MRASRESDEF.Init(); MRASRESDEF.FACTORY = View_Resource_List_In.h_factory; MRASRESDEF.RES_ID = adoDataTable.Rows[i]["RES_ID"].ToString(); MRASRESDEF.SelectData(1, ref adoResTable); View_Resource_List_Out.res_list[i] = new FMB_View_Resource_List_Out_Tag_res_list(); View_Resource_List_Out.res_list[i].res_id = adoDataTable.Rows[i]["RES_ID"].ToString(); View_Resource_List_Out.res_list[i].res_desc = adoDataTable.Rows[i]["RES_DESC"].ToString(); View_Resource_List_Out.res_list[i].res_up_down_flag = adoDataTable.Rows[i]["RES_UP_DOWN_FLAG"].ToString()[0]; } } } View_Resource_List_Out.count = i; View_Resource_List_Out._size_res_list = i; View_Resource_List_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; } catch (Exception ex) { View_Resource_List_Out.h_field_msg = ex.Message; return; } finally { DBC.DB_Close(); } }
public override void FMB_Update_Resource_Location(FMB_Update_ResLoc_In_Tag Update_ResLoc_In, ref FMB_Cmn_Out_Tag Cmn_Out) { string sSysTime = String.Empty; DataTable adoDataTable = null; DB_Common DBC = new DB_Common(); DBC_MFMBRESLOC MFMBRESLOC = new DBC_MFMBRESLOC(ref DBC); try { DBC.gDBConnectionString = StdGlobalVariable.ROXml.GetValue("//appSettings//add[@key='MESConnectionString']"); if (DBC.OpenDB() != true) { Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; return; } DBC.DB_BeginTransaction(); Cmn_Out.h_status_value = StdGlobalConstant.MP_FAIL; DBC.DB_GetSysTime(ref sSysTime); if (Update_ResLoc_In._C.res_type == 'R') { MFMBRESLOC.Init(); MFMBRESLOC.FACTORY = Update_ResLoc_In._C.h_factory; MFMBRESLOC.RES_ID = Update_ResLoc_In._C.res_id; MFMBRESLOC.RES_TYPE = Update_ResLoc_In._C.res_type.ToString(); if (MFMBRESLOC.SelectDataForUpdate(2, ref adoDataTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } if (Update_ResLoc_In._C.h_proc_step == StdGlobalConstant.MP_STEP_CREATE) { MFMBRESLOC.Init(); MFMBRESLOC.FACTORY = Update_ResLoc_In._C.h_factory; MFMBRESLOC.LAYOUT_ID = Update_ResLoc_In._C.layout_id; if (MFMBRESLOC.SelectData(3, ref adoDataTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } if (MFMBRESLOC.SEQ == 0) { MFMBRESLOC.SEQ = 1; } else { MFMBRESLOC.SEQ = MFMBRESLOC.SEQ + 1; } } MFMBRESLOC.FACTORY = Update_ResLoc_In._C.h_factory; MFMBRESLOC.RES_ID = Update_ResLoc_In._C.res_id; MFMBRESLOC.RES_TYPE = Update_ResLoc_In._C.res_type.ToString(); MFMBRESLOC.LAYOUT_ID = Update_ResLoc_In._C.layout_id; MFMBRESLOC.LOC_X = Update_ResLoc_In._C.loc_x; MFMBRESLOC.LOC_Y = Update_ResLoc_In._C.loc_y; MFMBRESLOC.LOC_WIDTH = Update_ResLoc_In._C.loc_width; MFMBRESLOC.LOC_HEIGHT = Update_ResLoc_In._C.loc_height; MFMBRESLOC.TEXT = Update_ResLoc_In._C.text; MFMBRESLOC.TEXT_SIZE = Update_ResLoc_In._C.text_size; MFMBRESLOC.TEXT_COLOR = Update_ResLoc_In._C.text_color; MFMBRESLOC.TEXT_STYLE = Update_ResLoc_In._C.text_style.ToString(); MFMBRESLOC.TAG_TYPE = Update_ResLoc_In._C.tag_type; MFMBRESLOC.BACK_COLOR = Update_ResLoc_In._C.back_color; MFMBRESLOC.NO_MOUSE_EVENT = Update_ResLoc_In._C.no_mouse_event.ToString(); MFMBRESLOC.SIGNAL_FLAG = Update_ResLoc_In._C.signal_flag.ToString(); if (Update_ResLoc_In._C.h_proc_step == StdGlobalConstant.MP_STEP_CREATE) { MFMBRESLOC.CREATE_USER_ID = Update_ResLoc_In._C.h_user_id; MFMBRESLOC.CREATE_TIME = sSysTime; if (MFMBRESLOC.InsertData() == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } } else if (Update_ResLoc_In._C.h_proc_step == StdGlobalConstant.MP_STEP_UPDATE) { MFMBRESLOC.UPDATE_USER_ID = Update_ResLoc_In._C.h_user_id; MFMBRESLOC.UPDATE_TIME = sSysTime; if (MFMBRESLOC.UpdateData(2) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } } else if (Update_ResLoc_In._C.h_proc_step == StdGlobalConstant.MP_STEP_DELETE) { if (MFMBRESLOC.DeleteData(3) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } if (MFMBRESLOC.UpdateData(5) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } } } else if (Update_ResLoc_In._C.res_type == 'T') { MFMBRESLOC.Init(); MFMBRESLOC.FACTORY = Update_ResLoc_In._C.h_factory; MFMBRESLOC.RES_ID = Update_ResLoc_In._C.res_id; MFMBRESLOC.RES_TYPE = Update_ResLoc_In._C.res_type.ToString(); MFMBRESLOC.LAYOUT_ID = Update_ResLoc_In._C.layout_id; if (MFMBRESLOC.SelectDataForUpdate(1, ref adoDataTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } if (Update_ResLoc_In._C.h_proc_step == StdGlobalConstant.MP_STEP_CREATE) { MFMBRESLOC.Init(); MFMBRESLOC.FACTORY = Update_ResLoc_In._C.h_factory; MFMBRESLOC.LAYOUT_ID = Update_ResLoc_In._C.layout_id; if (MFMBRESLOC.SelectData(3, ref adoDataTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } if (MFMBRESLOC.SEQ == 0) { MFMBRESLOC.SEQ = 1; } else { MFMBRESLOC.SEQ = MFMBRESLOC.SEQ + 1; } } MFMBRESLOC.FACTORY = Update_ResLoc_In._C.h_factory; MFMBRESLOC.RES_ID = Update_ResLoc_In._C.res_id; MFMBRESLOC.RES_TYPE = Update_ResLoc_In._C.res_type.ToString(); MFMBRESLOC.LAYOUT_ID = Update_ResLoc_In._C.layout_id; MFMBRESLOC.LOC_X = Update_ResLoc_In._C.loc_x; MFMBRESLOC.LOC_Y = Update_ResLoc_In._C.loc_y; MFMBRESLOC.LOC_WIDTH = Update_ResLoc_In._C.loc_width; MFMBRESLOC.LOC_HEIGHT = Update_ResLoc_In._C.loc_height; MFMBRESLOC.TEXT = Update_ResLoc_In._C.text; MFMBRESLOC.TEXT_SIZE = Update_ResLoc_In._C.text_size; MFMBRESLOC.TEXT_COLOR = Update_ResLoc_In._C.text_color; MFMBRESLOC.TEXT_STYLE = Update_ResLoc_In._C.text_style.ToString(); MFMBRESLOC.TAG_TYPE = Update_ResLoc_In._C.tag_type; MFMBRESLOC.BACK_COLOR = Update_ResLoc_In._C.back_color; MFMBRESLOC.NO_MOUSE_EVENT = Update_ResLoc_In._C.no_mouse_event.ToString(); MFMBRESLOC.SIGNAL_FLAG = Update_ResLoc_In._C.signal_flag.ToString(); if (Update_ResLoc_In._C.h_proc_step == StdGlobalConstant.MP_STEP_CREATE) { MFMBRESLOC.CREATE_USER_ID = Update_ResLoc_In._C.h_user_id; MFMBRESLOC.CREATE_TIME = sSysTime; if (MFMBRESLOC.InsertData() == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } } else if (Update_ResLoc_In._C.h_proc_step == StdGlobalConstant.MP_STEP_UPDATE) { MFMBRESLOC.UPDATE_USER_ID = Update_ResLoc_In._C.h_user_id; MFMBRESLOC.UPDATE_TIME = sSysTime; if (MFMBRESLOC.UpdateData(1) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } } else if (Update_ResLoc_In._C.h_proc_step == StdGlobalConstant.MP_STEP_DELETE) { if (MFMBRESLOC.DeleteData(1) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } if (MFMBRESLOC.UpdateData(5) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } Cmn_Out.h_msg = DBC.gErrors.SqlCode.ToString(); Cmn_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } } } Cmn_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; } catch (Exception ex) { Cmn_Out.h_field_msg = ex.Message; return; } finally { DBC.DB_Close(); } }
public override void WIP_View_Factory_List(WIP_View_Factory_List_In_Tag View_Factory_List_In, ref WIP_View_Factory_List_Out_Tag View_Factory_List_Out) { int i = 0; DataTable adoDataTable = null; DB_Common DBC = new DB_Common(); DBC_MWIPFACDEF MWIPFACDEF = new DBC_MWIPFACDEF(ref DBC); try { DBC.gDBConnectionString = StdGlobalVariable.ROXml.GetValue("//appSettings//add[@key='MESConnectionString']"); if (DBC.OpenDB() != true) { View_Factory_List_Out.h_db_err_msg = DBC.gErrors.ErrMsg; return; } DBC.DB_BeginTransaction(); View_Factory_List_Out.h_status_value = StdGlobalConstant.MP_FAIL; View_Factory_List_Out._size_factory_list = 0; View_Factory_List_Out.count = 0; MWIPFACDEF.Init(); if (MWIPFACDEF.FillData(1, ref adoDataTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { View_Factory_List_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } View_Factory_List_Out.h_msg = DBC.gErrors.SqlCode.ToString(); View_Factory_List_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } if (adoDataTable.Rows.Count > 0) { View_Factory_List_Out.factory_list = new WIP_View_Factory_List_Out_Tag_factory_list[adoDataTable.Rows.Count]; for (i = 0; i < adoDataTable.Rows.Count; i++) { View_Factory_List_Out.factory_list[i] = new WIP_View_Factory_List_Out_Tag_factory_list(); View_Factory_List_Out.factory_list[i].factory = adoDataTable.Rows[i]["FACTORY"].ToString(); View_Factory_List_Out.factory_list[i].fac_desc = adoDataTable.Rows[i]["FAC_DESC"].ToString(); } } View_Factory_List_Out.count = i; View_Factory_List_Out._size_factory_list = i; View_Factory_List_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; } catch (Exception ex) { View_Factory_List_Out.h_field_msg = ex.Message; return; } finally { DBC.DB_Close(); } }
//public const int MAX_RES_LIST = 1000; public override void FMB_View_Resource_List_Detail(FMB_View_Resource_List_In_Tag View_Resource_List_In, ref FMB_View_Resource_List_Out_Detail_Tag View_Resource_List_Out) { int i = 0; DataTable adoDataTable = null; DataTable adoImgTable = null; DB_Common DBC = new DB_Common(); DBC_FMBJOIN FMBJOIN = new DBC_FMBJOIN(ref DBC); DBC_MFMBRESLOC MFMBRESLOC = new DBC_MFMBRESLOC(ref DBC); DBC_MFMBRESIMG MFMBRESIMG = new DBC_MFMBRESIMG(ref DBC); try { DBC.gDBConnectionString = StdGlobalVariable.ROXml.GetValue("//appSettings//add[@key='MESConnectionString']"); if (DBC.OpenDB() != true) { View_Resource_List_Out.h_db_err_msg = DBC.gErrors.ErrMsg; return; } DBC.DB_BeginTransaction(); View_Resource_List_Out.h_status_value = StdGlobalConstant.MP_FAIL; View_Resource_List_Out._size_res_list = 0; View_Resource_List_Out.count = 0; View_Resource_List_Out.next_res_id = String.Empty; View_Resource_List_Out.next_seq = 0; /*Type 별 List*/ if (View_Resource_List_In.h_proc_step == '1') { if (View_Resource_List_In.res_type == 'R') { FMBJOIN.Init(); FMBJOIN.FACTORY = View_Resource_List_In.h_factory; FMBJOIN.LAYOUT_ID = View_Resource_List_In.layout_id; FMBJOIN.SEQ = View_Resource_List_In.next_seq; if (FMBJOIN.FillResDetail(1, ref adoDataTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { View_Resource_List_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } View_Resource_List_Out.h_msg = DBC.gErrors.SqlCode.ToString(); View_Resource_List_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } if (adoDataTable.Rows.Count > 0) { View_Resource_List_Out.res_list = new FMB_View_Resource_List_Out_Detail_Tag_res_list[adoDataTable.Rows.Count]; for (i = 0; i < adoDataTable.Rows.Count; i++) { if (i == MAX_UDR_LIST) { View_Resource_List_Out.next_seq = Convert.ToInt32(adoDataTable.Rows[i]["SEQ"]); break; } MFMBRESIMG.Init(); MFMBRESIMG.FACTORY = View_Resource_List_In.h_factory; MFMBRESIMG.RES_ID = adoDataTable.Rows[i]["RES_ID"].ToString(); MFMBRESIMG.SelectData(1, ref adoImgTable); View_Resource_List_Out.res_list[i] = new FMB_View_Resource_List_Out_Detail_Tag_res_list(); View_Resource_List_Out.res_list[i].res_id = adoDataTable.Rows[i]["RES_ID"].ToString(); View_Resource_List_Out.res_list[i].res_tag_flag = adoDataTable.Rows[i]["RES_TAG_FLAG"].ToString()[0]; View_Resource_List_Out.res_list[i].layout_id = adoDataTable.Rows[i]["LAYOUT_ID"].ToString(); View_Resource_List_Out.res_list[i].seq = Convert.ToInt32(adoDataTable.Rows[i]["SEQ"]); View_Resource_List_Out.res_list[i].loc_x = Convert.ToInt32(adoDataTable.Rows[i]["LOC_X"]); View_Resource_List_Out.res_list[i].loc_y = Convert.ToInt32(adoDataTable.Rows[i]["LOC_Y"]); View_Resource_List_Out.res_list[i].loc_width = Convert.ToInt32(adoDataTable.Rows[i]["LOC_WIDTH"]); View_Resource_List_Out.res_list[i].loc_height = Convert.ToInt32(adoDataTable.Rows[i]["LOC_HEIGHT"]); View_Resource_List_Out.res_list[i].text = adoDataTable.Rows[i]["TEXT"].ToString(); View_Resource_List_Out.res_list[i].text_size = Convert.ToInt32(adoDataTable.Rows[i]["TEXT_SIZE"]); View_Resource_List_Out.res_list[i].text_color = Convert.ToInt32(adoDataTable.Rows[i]["TEXT_COLOR"]); View_Resource_List_Out.res_list[i].text_style = adoDataTable.Rows[i]["TEXT_STYLE"].ToString()[0]; View_Resource_List_Out.res_list[i].tag_type = Convert.ToInt32(adoDataTable.Rows[i]["TAG_TYPE"]); View_Resource_List_Out.res_list[i].back_color = Convert.ToInt32(adoDataTable.Rows[i]["BACK_COLOR"]); View_Resource_List_Out.res_list[i].create_time = adoDataTable.Rows[i]["CREATE_TIME"].ToString(); View_Resource_List_Out.res_list[i].update_time = adoDataTable.Rows[i]["UPDATE_TIME"].ToString(); View_Resource_List_Out.res_list[i].no_mouse_event = adoDataTable.Rows[i]["NO_MOUSE_EVENT"].ToString()[0]; View_Resource_List_Out.res_list[i].signal_flag = adoDataTable.Rows[i]["SIGNAL_FLAG"].ToString()[0]; View_Resource_List_Out.res_list[i].seq = Convert.ToInt32(adoDataTable.Rows[i]["SEQ"]); View_Resource_List_Out.res_list[i].res_desc = adoDataTable.Rows[i]["RES_DESC"].ToString(); View_Resource_List_Out.res_list[i].res_type = adoDataTable.Rows[i]["RES_TYPE"].ToString(); View_Resource_List_Out.res_list[i].area_id = adoDataTable.Rows[i]["AREA_ID"].ToString(); View_Resource_List_Out.res_list[i].sub_area_id = adoDataTable.Rows[i]["SUB_AREA_ID"].ToString(); View_Resource_List_Out.res_list[i].res_location = adoDataTable.Rows[i]["RES_LOCATION"].ToString(); View_Resource_List_Out.res_list[i].proc_rule = adoDataTable.Rows[i]["PROC_RULE"].ToString()[0]; View_Resource_List_Out.res_list[i].max_proc_count = Convert.ToInt32(adoDataTable.Rows[i]["MAX_PROC_COUNT"]); View_Resource_List_Out.res_list[i].res_up_down_flag = adoDataTable.Rows[i]["RES_UP_DOWN_FLAG"].ToString()[0]; View_Resource_List_Out.res_list[i].res_pri_sts = adoDataTable.Rows[i]["RES_PRI_STS"].ToString(); View_Resource_List_Out.res_list[i].res_ctrl_mode = adoDataTable.Rows[i]["RES_CTRL_MODE"].ToString(); View_Resource_List_Out.res_list[i].res_proc_mode = adoDataTable.Rows[i]["RES_PROC_MODE"].ToString(); View_Resource_List_Out.res_list[i].last_recipe_id = adoDataTable.Rows[i]["LAST_RECIPE_ID"].ToString(); View_Resource_List_Out.res_list[i].proc_count = Convert.ToInt32(adoDataTable.Rows[i]["PROC_COUNT"]); View_Resource_List_Out.res_list[i].last_start_time = adoDataTable.Rows[i]["LAST_START_TIME"].ToString(); View_Resource_List_Out.res_list[i].last_end_time = adoDataTable.Rows[i]["LAST_END_TIME"].ToString(); View_Resource_List_Out.res_list[i].last_down_time = adoDataTable.Rows[i]["LAST_DOWN_TIME"].ToString(); View_Resource_List_Out.res_list[i].last_down_hist_seq = Convert.ToInt32(adoDataTable.Rows[i]["LAST_DOWN_HIST_SEQ"]); View_Resource_List_Out.res_list[i].last_event = adoDataTable.Rows[i]["LAST_EVENT_ID"].ToString(); View_Resource_List_Out.res_list[i].last_event_time = adoDataTable.Rows[i]["LAST_EVENT_TIME"].ToString(); View_Resource_List_Out.res_list[i].last_active_hist_seq = Convert.ToInt32(adoDataTable.Rows[i]["LAST_ACTIVE_HIST_SEQ"]); View_Resource_List_Out.res_list[i].last_hist_seq = Convert.ToInt32(adoDataTable.Rows[i]["LAST_HIST_SEQ"]); View_Resource_List_Out.res_list[i].img_idx = MFMBRESIMG.IMAGE_IDX; View_Resource_List_Out.res_list[i].lot_id = adoDataTable.Rows[i]["LOT_ID"].ToString(); } } } else if (View_Resource_List_In.res_type == 'T') { MFMBRESLOC.Init(); MFMBRESLOC.FACTORY = View_Resource_List_In.h_factory; MFMBRESLOC.LAYOUT_ID = View_Resource_List_In.layout_id; MFMBRESLOC.SEQ = View_Resource_List_In.next_seq; if (MFMBRESLOC.FillData(1, ref adoDataTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { View_Resource_List_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } View_Resource_List_Out.h_msg = DBC.gErrors.SqlCode.ToString(); View_Resource_List_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } for (i = 0; i < adoDataTable.Rows.Count; i++) { if (i == MAX_UDR_LIST) { View_Resource_List_Out.next_seq = Convert.ToInt32(adoDataTable.Rows[i]["SEQ"]); break; } View_Resource_List_Out.res_list[i].seq = Convert.ToInt32(adoDataTable.Rows[i]["SEQ"]); View_Resource_List_Out.res_list[i].res_id = adoDataTable.Rows[i]["RES_ID"].ToString(); View_Resource_List_Out.res_list[i].res_tag_flag = adoDataTable.Rows[i]["RES_TYPE"].ToString()[0]; View_Resource_List_Out.res_list[i].loc_x = Convert.ToInt32(adoDataTable.Rows[i]["LOC_X"]); View_Resource_List_Out.res_list[i].loc_y = Convert.ToInt32(adoDataTable.Rows[i]["LOC_Y"]); View_Resource_List_Out.res_list[i].loc_width = Convert.ToInt32(adoDataTable.Rows[i]["LOC_WIDTH"]); View_Resource_List_Out.res_list[i].loc_height = Convert.ToInt32(adoDataTable.Rows[i]["LOC_HEIGHT"]); View_Resource_List_Out.res_list[i].text = adoDataTable.Rows[i]["TEXT"].ToString(); View_Resource_List_Out.res_list[i].text_size = Convert.ToInt32(adoDataTable.Rows[i]["TEXT_SIZE"]); View_Resource_List_Out.res_list[i].text_color = Convert.ToInt32(adoDataTable.Rows[i]["TEXT_COLOR"]); View_Resource_List_Out.res_list[i].text_size = Convert.ToInt32(adoDataTable.Rows[i]["TEXT_SIZE"]); View_Resource_List_Out.res_list[i].text_style = adoDataTable.Rows[i]["TEXT_STYLE"].ToString()[0]; View_Resource_List_Out.res_list[i].tag_type = Convert.ToInt32(adoDataTable.Rows[i]["TAG_TYPE"]); View_Resource_List_Out.res_list[i].back_color = Convert.ToInt32(adoDataTable.Rows[i]["BACK_COLOR"]); View_Resource_List_Out.res_list[i].create_time = adoDataTable.Rows[i]["CREATE_TIME"].ToString(); View_Resource_List_Out.res_list[i].update_time = adoDataTable.Rows[i]["UPDATE_TIME"].ToString(); View_Resource_List_Out.res_list[i].no_mouse_event = adoDataTable.Rows[i]["NO_MOUSE_EVENT"].ToString()[0]; View_Resource_List_Out.res_list[i].signal_flag = adoDataTable.Rows[i]["SIGNAL_FLAG"].ToString()[0]; } } } /*Control Sequence 별 List*/ else if (View_Resource_List_In.h_proc_step == '2') { FMBJOIN.Init(); FMBJOIN.FACTORY = View_Resource_List_In.h_factory; FMBJOIN.LAYOUT_ID = View_Resource_List_In.layout_id; FMBJOIN.SEQ = View_Resource_List_In.next_seq; if (FMBJOIN.FillUdrDetail(2, ref adoDataTable) == false) { if (DBC.gErrors.SqlCode == SQL_CODE.SQL_NOT_FOUND) { View_Resource_List_Out.h_status_value = StdGlobalConstant.MP_SUCCESS; return; } View_Resource_List_Out.h_msg = DBC.gErrors.SqlCode.ToString(); View_Resource_List_Out.h_db_err_msg = DBC.gErrors.ErrMsg; DBC.DB_Rollback(); return; } if (adoDataTable.Rows.Count > 0) { View_Resource_List_Out.res_list = new FMB_View_Resource_List_Out_Detail_Tag_res_list[adoDataTable.Rows.Count]; for (i = 0; i < adoDataTable.Rows.Count; i++) { if (i == MAX_UDR_LIST) { View_Resource_List_Out.next_seq = Convert.ToInt32(adoDataTable.Rows[i]["SEQ"]); break; } MFMBRESIMG.Init(); MFMBRESIMG.FACTORY = View_Resource_List_In.h_factory; MFMBRESIMG.RES_ID = adoDataTable.Rows[i]["RES_ID"].ToString(); MFMBRESIMG.SelectData(1, ref adoImgTable); View_Resource_List_Out.res_list[i].res_id = adoDataTable.Rows[i]["RES_ID"].ToString(); View_Resource_List_Out.res_list[i].res_tag_flag = adoDataTable.Rows[i]["RES_TAG_FLAG"].ToString()[0]; View_Resource_List_Out.res_list[i].loc_x = Convert.ToInt32(adoDataTable.Rows[i]["LOC_X"]); View_Resource_List_Out.res_list[i].loc_y = Convert.ToInt32(adoDataTable.Rows[i]["LOC_Y"]); View_Resource_List_Out.res_list[i].loc_width = Convert.ToInt32(adoDataTable.Rows[i]["LOC_WIDTH"]); View_Resource_List_Out.res_list[i].loc_height = Convert.ToInt32(adoDataTable.Rows[i]["LOC_HEIGHT"]); View_Resource_List_Out.res_list[i].text = adoDataTable.Rows[i]["TEXT"].ToString(); View_Resource_List_Out.res_list[i].text_size = Convert.ToInt32(adoDataTable.Rows[i]["TEXT_SIZE"]); View_Resource_List_Out.res_list[i].text_color = Convert.ToInt32(adoDataTable.Rows[i]["TEXT_COLOR"]); View_Resource_List_Out.res_list[i].text_size = Convert.ToInt32(adoDataTable.Rows[i]["TEXT_SIZE"]); View_Resource_List_Out.res_list[i].text_style = adoDataTable.Rows[i]["TEXT_STYLE"].ToString()[0]; View_Resource_List_Out.res_list[i].tag_type = Convert.ToInt32(adoDataTable.Rows[i]["TAG_TYPE"]); View_Resource_List_Out.res_list[i].back_color = Convert.ToInt32(adoDataTable.Rows[i]["BACK_COLOR"]); View_Resource_List_Out.res_list[i].create_time = adoDataTable.Rows[i]["CREATE_TIME"].ToString(); View_Resource_List_Out.res_list[i].update_time = adoDataTable.Rows[i]["UPDATE_TIME"].ToString(); View_Resource_List_Out.res_list[i].no_mouse_event = adoDataTable.Rows[i]["NO_MOUSE_EVENT"].ToString()[0]; View_Resource_List_Out.res_list[i].signal_flag = adoDataTable.Rows[i]["SIGNAL_FLAG"].ToString()[0]; View_Resource_List_Out.res_list[i].seq = Convert.ToInt32(adoDataTable.Rows[i]["SEQ"]); View_Resource_List_Out.res_list[i].res_desc = adoDataTable.Rows[i]["RES_DESC"].ToString(); View_Resource_List_Out.res_list[i].res_type = adoDataTable.Rows[i]["RES_TYPE"].ToString(); View_Resource_List_Out.res_list[i].area_id = adoDataTable.Rows[i]["AREA_ID"].ToString(); View_Resource_List_Out.res_list[i].sub_area_id = adoDataTable.Rows[i]["SUB_AREA_ID"].ToString(); View_Resource_List_Out.res_list[i].res_location = adoDataTable.Rows[i]["RES_LOCATION"].ToString(); View_Resource_List_Out.res_list[i].proc_rule = adoDataTable.Rows[i]["PROC_RULE"].ToString()[0]; View_Resource_List_Out.res_list[i].max_proc_count = Convert.ToInt32(adoDataTable.Rows[i]["MAX_PROC_COUNT"]); View_Resource_List_Out.res_list[i].res_up_down_flag = adoDataTable.Rows[i]["RES_UP_DOWN_FLAG"].ToString()[0]; View_Resource_List_Out.res_list[i].res_pri_sts = adoDataTable.Rows[i]["RES_PRI_STS"].ToString(); View_Resource_List_Out.res_list[i].res_ctrl_mode = adoDataTable.Rows[i]["RES_CTRL_MODE"].ToString(); View_Resource_List_Out.res_list[i].res_proc_mode = adoDataTable.Rows[i]["RES_PROC_MODE"].ToString(); View_Resource_List_Out.res_list[i].last_recipe_id = adoDataTable.Rows[i]["LAST_RECIPE_ID"].ToString(); View_Resource_List_Out.res_list[i].proc_count = Convert.ToInt32(adoDataTable.Rows[i]["PROC_COUNT"]); View_Resource_List_Out.res_list[i].last_start_time = adoDataTable.Rows[i]["LAST_START_TIME"].ToString(); View_Resource_List_Out.res_list[i].last_end_time = adoDataTable.Rows[i]["LAST_END_TIME"].ToString(); View_Resource_List_Out.res_list[i].last_down_time = adoDataTable.Rows[i]["LAST_DOWN_TIME"].ToString(); View_Resource_List_Out.res_list[i].last_down_hist_seq = Convert.ToInt32(adoDataTable.Rows[i]["LAST_DOWN_HIST_SEQ"]); View_Resource_List_Out.res_list[i].last_event = adoDataTable.Rows[i]["LAST_EVENT_ID"].ToString(); View_Resource_List_Out.res_list[i].last_event_time = adoDataTable.Rows[i]["LAST_EVENT_TIME"].ToString(); View_Resource_List_Out.res_list[i].last_active_hist_seq = Convert.ToInt32(adoDataTable.Rows[i]["LAST_ACTIVE_HIST_SEQ"]); View_Resource_List_Out.res_list[i].last_hist_seq = Convert.ToInt32(adoDataTable.Rows[i]["LAST_HIST_SEQ"]); View_Resource_List_Out.res_list[i].img_idx = Convert.ToInt32(adoDataTable.Rows[i]["IMAGE_IDX"]); } } } } catch (Exception ex) { View_Resource_List_Out.h_field_msg = ex.Message; return; } finally { DBC.DB_Close(); } }