diff --git a/EuroTran/EasyBL.WEBAPP/EasyBL.WEBAPP.csproj b/EuroTran/EasyBL.WEBAPP/EasyBL.WEBAPP.csproj index b033ebe..2f81843 100644 --- a/EuroTran/EasyBL.WEBAPP/EasyBL.WEBAPP.csproj +++ b/EuroTran/EasyBL.WEBAPP/EasyBL.WEBAPP.csproj @@ -106,6 +106,8 @@ + + diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs index b7b47a6..da4b4e0 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_QryService.cs @@ -1,7 +1,9 @@ using EasyBL.WebApi.Message; +using EasyBL.WEBAPP.ShowEasy; using EasyBL.WEBAPP.WSM; using Entity.Sugar; using Entity.ViewModels; +using Newtonsoft.Json; using SqlSugar; using SqlSugar.Base; using System; @@ -167,13 +169,51 @@ namespace EasyBL.WEBAPP.SYS }) .Single(); + if (!string.IsNullOrEmpty(oEntity.OrganizerIDs)) { + + List rsOrganizerIDs = JsonConvert.DeserializeObject>(oEntity.OrganizerIDs); + + OrganizerMaintain_QryService om_qry = new OrganizerMaintain_QryService(); + + List rsOrganizers = new List(); + + foreach (var OrganizerID in rsOrganizerIDs) { + + System.Diagnostics.Debug.WriteLine("OrganizerID" + ": " + OrganizerID); + + rsOrganizers.Add(om_qry.FindByIDs(i_crm, OrganizerID, sLanguageID)); + + } + + oEntity.JsonOrganizers = JsonConvert.SerializeObject(rsOrganizers); + + } + + if (!string.IsNullOrEmpty(oEntity.VenueIDs)) { + + List rsVenueIDs = JsonConvert.DeserializeObject>(oEntity.VenueIDs); + + VenueMaintain_QryService vm_qry = new VenueMaintain_QryService(); + + List rsVenues = new List(); + + foreach (var VenueID in rsVenueIDs) + { + + rsVenues.Add(vm_qry.FindByIDs(i_crm, VenueID, sLanguageID)); + + } + + oEntity.JsonVenues = JsonConvert.SerializeObject(rsVenues); + + } + rm = new SuccessResponseMessage(null, i_crm); rm.DATA.Add(BLWording.REL, oEntity); } while (false); } catch (Exception ex) { - throw; sMsg = Util.GetLastExceptionMsg(ex); LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(ExhibMaintain_QryService), "", "QueryOne 展覽管理(單筆查詢)", "", "", ""); } @@ -310,6 +350,7 @@ namespace EasyBL.WEBAPP.SYS #endregion 展覽管理(int 查詢筆數) #region 展覽管理(以ID查詢) + /// /// 展覽管理(以ID查詢) /// @@ -435,6 +476,107 @@ namespace EasyBL.WEBAPP.SYS #endregion 展覽管理(List 查詢展覽資訊 call ExhibInfoMaintain_QryService QueryExhibInfo) + #region 展覽管理(List 查詢展覽狀態) + + /// + /// 展覽管理(List 查詢展覽狀態) + /// + /// + /// + public ResponseMessage QueryShowStatusList(RequestMessage i_crm) { + + ResponseMessage rm = null; + string sMsg = null; + var db = SugarBase.GetIntance(); + + List saShowStatus = new List(); + + try + { + do + { + + var sArgumentClassID = "ShowStatus"; + + saShowStatus = db.Queryable() + .Where(x => x.OrgID == i_crm.ORIGID && x.Effective == "Y" && x.DelStatus == "N") + .Where(t1 => t1.ArgumentClassID == sArgumentClassID) + .ToList(); + + rm = new SuccessResponseMessage(null, i_crm); + rm.DATA.Add(BLWording.REL, saShowStatus); + } while (false); + } + catch (Exception ex) + { + sMsg = Util.GetLastExceptionMsg(ex); + LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(ExhibMaintain_QryService), "", "QueryShowStatus(List 查詢展覽狀態)", "", "", ""); + } + finally + { + if (null != sMsg) + { + rm = new ErrorResponseMessage(sMsg, i_crm); + } + } + + return rm; + + } + + #endregion 展覽管理(List 查詢展覽狀態) + + #region 展覽管理(List 查詢展覽週期選單) + + /// + /// 展覽管理(List 查詢展覽週期選單) + /// + /// + /// + public ResponseMessage QueryFrequencyList(RequestMessage i_crm) + { + + ResponseMessage rm = null; + string sMsg = null; + var db = SugarBase.GetIntance(); + + List saFrequency = new List(); + + try + { + do + { + + var sArgumentClassID = "Frequency"; + + saFrequency = db.Queryable() + .Where(x => x.OrgID == i_crm.ORIGID && x.Effective == "Y" && x.DelStatus == "N") + .Where(t1 => t1.ArgumentClassID == sArgumentClassID) + .ToList(); + + rm = new SuccessResponseMessage(null, i_crm); + rm.DATA.Add(BLWording.REL, saFrequency); + } while (false); + } + catch (Exception ex) + { + sMsg = Util.GetLastExceptionMsg(ex); + LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(ExhibMaintain_QryService), "", "QueryFrequencyList 展覽管理(List 查詢展覽週期選單)", "", "", ""); + } + finally + { + if (null != sMsg) + { + rm = new ErrorResponseMessage(sMsg, i_crm); + } + } + + return rm; + + } + + #endregion 展覽管理(List 查詢展覽週期選單) + } } \ No newline at end of file diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_UpdService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_UpdService.cs index 0f40296..40d9cfb 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_UpdService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMaintain_UpdService.cs @@ -7,6 +7,7 @@ using EasyBL.WEBAPP.SYS; using System.Linq; using System.Collections.Generic; using Newtonsoft.Json; +using EasyBL.WEBAPP.ShowEasy; namespace EasyBL.WEBAPP.WSM { @@ -565,8 +566,6 @@ namespace EasyBL.WEBAPP.WSM public ResponseMessage QueryRegionList(RequestMessage i_crm) { - System.Diagnostics.Debug.WriteLine("LangType" + ": " + _fetchString(i_crm, @"LangType")); - RegionMaintain_QryService rm_qry = new RegionMaintain_QryService(); ResponseMessage rm = rm_qry.QueryRegionList(i_crm); @@ -616,6 +615,46 @@ namespace EasyBL.WEBAPP.WSM #endregion 展覽維護(List 查詢國家選單 call CityMaintain_QryService QueryCityList) + #region 展覽維護(List 查詢展館選單 call VenueMaintain_QryService QueryVenueList) + + /// 展覽維護(List 查詢展館選單 call VenueMaintain_QryService QueryVenueList) + /// + /// + /// + /// + public ResponseMessage QueryVenueList(RequestMessage i_crm) + { + + VenueMaintain_QryService vm_qry = new VenueMaintain_QryService(); + + ResponseMessage rm = vm_qry.QueryVenueList(i_crm); + + return rm; + + } + + #endregion 展覽維護(List 查詢展館選單 call VenueMaintain_QryService QueryVenueList) + + #region 展覽維護(List 查詢主辦單位選單 call OrganizerMaintain_QryService QueryOrganizerList) + + /// 展覽維護(List 查詢主辦單位選單 call OrganizerMaintain_QryService QueryOrganizerList) + /// + /// + /// + /// + public ResponseMessage QueryOrganizerList(RequestMessage i_crm) + { + + OrganizerMaintain_QryService om_qry = new OrganizerMaintain_QryService(); + + ResponseMessage rm = om_qry.QueryOrganizerList(i_crm); + + return rm; + + } + + #endregion 展覽維護(List 查詢主辦單位選單 call OrganizerMaintain_QryService QueryOrganizerList) + #region 語言選單(call LanguageMaintainQryService QueryList) /// @@ -635,8 +674,110 @@ namespace EasyBL.WEBAPP.WSM #endregion 語言選單(call LanguageMaintainQryService QueryList) + #region 展覽管理(List 查詢展覽狀態 call ExhibMaintain_QryService QueryShowStatusList) + + /// + /// 展覽管理(List 查詢展覽狀態 call ExhibMaintain_QryService QueryShowStatusList) + /// + /// + /// + public ResponseMessage QueryShowStatusList(RequestMessage i_crm) + { + + ExhibMaintain_QryService em_qry = new ExhibMaintain_QryService(); + + ResponseMessage rm = em_qry.QueryShowStatusList(i_crm); + + return rm; + + } + + #endregion 展覽管理(List 查詢展覽狀態 call ExhibMaintain_QryService QueryShowStatusList) + + #region 展覽管理(List 查詢展覽週期選單 call ExhibMaintain_QryService QueryFrequencyList) + + /// + /// 展覽管理(List 查詢展覽週期選單 call ExhibMaintain_QryService QueryFrequencyList) + /// + /// + /// + public ResponseMessage QueryFrequencyList(RequestMessage i_crm) + { + + ExhibMaintain_QryService em_qry = new ExhibMaintain_QryService(); + + ResponseMessage rm = em_qry.QueryFrequencyList(i_crm); + + return rm; + + } + + #endregion 展覽管理(List 查詢展覽週期選單 call ExhibMaintain_QryService QueryFrequencyList) + + #region 展覽管理(List 查詢多媒體 call ExhibMaintain_QryService QueryMediaList) + + /// + /// 展覽管理(List 查詢多媒體 call ExhibMaintain_QryService QueryMediaList) + /// + /// + /// + public ResponseMessage QueryMediaList(RequestMessage i_crm) + { + + ExhibMediaMaintain_QryService emm_qry = new ExhibMediaMaintain_QryService(); + + ResponseMessage rm = emm_qry.QueryMediaList(i_crm); + + return rm; + + } + + #endregion 展覽管理(List 查詢多媒體 call ExhibMaintain_QryService QueryMediaList) + + #region 展覽維護(處存展覽多媒體 call ExhibMediaMaintain_UpdService Insert/Update) + + /// + /// 展覽維護(處存展覽多媒體 call ExhibMediaMaintain_UpdService Insert/Update) + /// + /// + /// + /// + public ResponseMessage SaveMediaList(RequestMessage i_crm) + { + + ResponseMessage rm = null; + + var MediaList = JsonConvert.DeserializeObject>(_fetchString(i_crm, @"MediaList")); + + ExhibMediaMaintain_UpdService emm_upd = new ExhibMediaMaintain_UpdService(); + ExhibMediaMaintain_QryService emm_qry = new ExhibMediaMaintain_QryService(); + + // Hard delete all + emm_upd.HardDeleteAll(i_crm, MediaList.FirstOrDefault().ExhibitionID); + + foreach (var Media in MediaList) + { + if (emm_qry.Exists(i_crm, Media.MediaID, Media.ExhibitionID)) + { + rm = emm_upd.Update(i_crm, Media); + } + else + { + rm = emm_upd.Insert(i_crm, Media); + } + + } + + rm = new SuccessResponseMessage(null, i_crm); + rm.DATA.Add(BLWording.REL, MediaList); + + return rm; + + } + + #endregion 展覽維護(處存展覽多媒體 call ExhibMediaMaintain_UpdService Insert/Update) + - } - + } \ No newline at end of file diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMediaMaintain_QryService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMediaMaintain_QryService.cs new file mode 100644 index 0000000..a6ed495 --- /dev/null +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMediaMaintain_QryService.cs @@ -0,0 +1,131 @@ +using EasyBL.WebApi.Message; +using Entity.Sugar; +using Entity.ViewModels; +using SqlSugar; +using SqlSugar.Base; +using System; +using System.Collections.Generic; +using EasyBL.WEBAPP.WSM; +using System.Linq; +using System.Collections; + +namespace EasyBL.WEBAPP.SYS +{ + public class ExhibMediaMaintain_QryService : ServiceBase + { + + public static string LANGUAGEID = "zh-TW"; + public static string EN_US = "en-US"; + + #region 展覽多媒體管理(List 查詢多媒體) + + /// + /// 展覽多媒體管理(List 查詢多媒體) + /// + /// + /// + public ResponseMessage QueryMediaList(RequestMessage i_crm) + { + + ResponseMessage rm = null; + string sMsg = null; + var db = SugarBase.GetIntance(); + + List saMediaList = new List(); + + try + { + do + { + + var sExhibitionID = _fetchString(i_crm, @"ExhibitionID"); + var sMediaTypeID = _fetchString(i_crm, @"MediaTypeID"); + + saMediaList = db.Queryable() + .Where(x => x.OrgID == i_crm.ORIGID && x.Effective == "Y" && x.DelStatus == "N") + .Where(t1 => t1.ExhibitionID == sExhibitionID) + .WhereIF(!string.IsNullOrEmpty(sMediaTypeID), t1 => t1.MediaTypeID == sMediaTypeID) + .ToList(); + + rm = new SuccessResponseMessage(null, i_crm); + rm.DATA.Add(BLWording.REL, saMediaList); + } while (false); + } + catch (Exception ex) + { + sMsg = Util.GetLastExceptionMsg(ex); + LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(ExhibMediaMaintain_QryService), "", "QueryMediaList 展覽多媒體管理(List 查詢多媒體)", "", "", ""); + } + finally + { + if (null != sMsg) + { + rm = new ErrorResponseMessage(sMsg, i_crm); + } + } + + return rm; + + } + + #endregion 展覽多媒體管理(List 查詢多媒體) + + #region 展覽多媒體管理(Boolean 檢查是否存在) + + /// + /// 展覽多媒體管理(Boolean 檢查是否存在) + /// + /// + /// + /// + public Boolean Exists(RequestMessage i_crm, string sMediaID, string sExhibitionID) { + + Boolean found = false; + + ResponseMessage rm = null; + string sMsg = null; + var db = SugarBase.GetIntance(); + + int count = 0; + + try + { + do + { + + + count = db.Queryable() + .Where(x => x.OrgID == i_crm.ORIGID && x.Effective == "Y" && x.DelStatus == "N") + .Where(t1 => t1.MediaID == sMediaID) + .Where(t1 => t1.ExhibitionID == sExhibitionID) + .Count(); + + rm = new SuccessResponseMessage(null, i_crm); + rm.DATA.Add(BLWording.REL, count); + } while (false); + } + catch (Exception ex) + { + sMsg = Util.GetLastExceptionMsg(ex); + LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(ExhibStatMaintain_QryService), "", "Exists 展覽統計管理(Boolean 檢查是否存在)", "", "", ""); + + } + finally + { + if (null != sMsg) + { + rm = new ErrorResponseMessage(sMsg, i_crm); + } + } + + if (count > 0) { + found = true; + } + + return found; + + } + + #endregion 展覽多媒體管理(Boolean 檢查是否存在) + } +} \ No newline at end of file diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMediaMaintain_UpdService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMediaMaintain_UpdService.cs new file mode 100644 index 0000000..815eace --- /dev/null +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/ExhibMediaMaintain_UpdService.cs @@ -0,0 +1,189 @@ +using EasyBL.WebApi.Message; +using Entity.Sugar; +using SqlSugar; +using SqlSugar.Base; +using System; +using EasyBL.WEBAPP.SYS; +using Entity.ViewModels; +using Newtonsoft.Json; +using System.Collections.Generic; +using System.Linq; + +namespace EasyBL.WEBAPP.WSM +{ + public class ExhibMediaMaintain_UpdService : ServiceBase + { + + public static string LANGUAGEID = ExhibMaintain_QryService.LANGUAGEID; + public static string EN_US = ExhibMaintain_QryService.EN_US; + + #region 展覽多媒體維護(新增) + + /// + /// 展覽多媒體維護(新增) + /// + /// + /// + /// + public ResponseMessage Insert(RequestMessage i_crm, SETB_CMS_Exhibition_Media Media) + { + ResponseMessage rm = null; + string sMsg = null; + try + { + rm = SugarBase.ExecTran(db => + { + do + { + var sMediaID = _fetchString(i_crm, @"MediaID"); + + if (string.IsNullOrEmpty(sMediaID)) + { + + sMediaID = Guid.NewGuid().ToString(); + + } + + Media.MediaID = sMediaID; + Media.DelStatus = "N"; + Media.Effective = "Y"; + _setEntityBase(Media, i_crm); + + var iRel = 0; + + iRel = db.Insertable(Media).ExecuteCommand(); + rm = new SuccessResponseMessage(null, i_crm); + rm.DATA.Add(BLWording.REL, Media); + } while (false); + + return rm; + }); + } + catch (Exception ex) + { + sMsg = Util.GetLastExceptionMsg(ex); + LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(ExhibMediaMaintain_UpdService), "", "Insert 展覽多媒體維護(新增)", "", "", ""); + } + finally + { + if (null != sMsg) + { + rm = new ErrorResponseMessage(sMsg, i_crm); + } + } + return rm; + } + + #endregion 展覽多媒體維護(新增) + + #region 展覽多媒體維護(修改) + + /// + /// 展覽多媒體維護(修改) + /// + /// + /// + /// Origtek framwork API + public ResponseMessage Update(RequestMessage i_crm, SETB_CMS_Exhibition_Media Media) + { + ResponseMessage rm = null; + string sMsg = null; + try + { + rm = SugarBase.ExecTran(db => + { + do + { + _setEntityBase(Media, i_crm); + Media.DelStatus = "N"; + Media.Effective = "Y"; + + // Update self + var iRel = db.Updateable(Media) + .Where(t1 => t1.MediaID == Media.MediaID) + .Where(t1 => t1.ExhibitionID == Media.ExhibitionID) + .Where(t1 => t1.OrgID == Media.OrgID) + .IgnoreColumns(x => new + { + x.CreateUser, + x.CreateDate + + }).ExecuteCommand(); + + rm = new SuccessResponseMessage(null, i_crm); + rm.DATA.Add(BLWording.REL, Media); + } while (false); + + return rm; + }); + } + catch (Exception ex) + { + sMsg = Util.GetLastExceptionMsg(ex); + LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(ExhibMediaMaintain_UpdService), "", "Update 展覽多媒體維護(修改)", "", "", ""); + + } + finally + { + if (null != sMsg) + { + rm = new ErrorResponseMessage(sMsg, i_crm); + } + } + return rm; + } + + #endregion 展覽多媒體維護(修改) + + #region 展覽多媒體維護(Hard 刪除全部) + + /// + /// 展覽多媒體維護(Hard 刪除全部) + /// + /// + /// + /// + public ResponseMessage HardDeleteAll(RequestMessage i_crm, string sExhibitionID) + { + ResponseMessage rm = null; + string sMsg = null; + try + { + rm = SugarBase.ExecTran(db => + { + do + { + + System.Diagnostics.Debug.WriteLine("Delete sExhibitionID" + ": " + sExhibitionID); + + var iRel = db.Deleteable() + .Where(t1 => t1.OrgID == i_crm.ORIGID) + .Where(t1 => t1.ExhibitionID == sExhibitionID).ExecuteCommand(); + + rm = new SuccessResponseMessage(null, i_crm); + rm.DATA.Add(BLWording.REL, iRel); + } while (false); + + return rm; + }); + } + catch (Exception ex) + { + sMsg = Util.GetLastExceptionMsg(ex); + LogAndSendEmail(sMsg + @"Param:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(ExhibMediaMaintain_UpdService), "", "HardDeleteAll 展覽多媒體維護(Hard 刪除全部)", "", "", ""); + + } + finally + { + if (null != sMsg) + { + rm = new ErrorResponseMessage(sMsg, i_crm); + } + } + return rm; + } + + #endregion 展覽多媒體維護(Hard 刪除全部) + + } +} \ No newline at end of file diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/OrganizerMaintain_QryService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/OrganizerMaintain_QryService.cs index 8e11cf4..f47963c 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/OrganizerMaintain_QryService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/OrganizerMaintain_QryService.cs @@ -235,5 +235,109 @@ namespace EasyBL.WEBAPP.ShowEasy #endregion 參數類別(多筆) + #region 主辦單位管理(List 查詢主辦單位選單) + + /// 主辦單位管理(List 查詢主辦單位選單) + /// + /// + /// + /// + + public ResponseMessage QueryOrganizerList(RequestMessage i_crm) + { + + ResponseMessage rm = null; + string sMsg = null; + var db = SugarBase.GetIntance(); + try + { + do + { + + var sCityID = _fetchString(i_crm, @"CityID"); + var sLangType = _fetchString(i_crm, @"LangType"); + + var saOrganizers = db.Queryable() + .Where((t1) => t1.OrgID == i_crm.ORIGID) + .Where(t1 => t1.Effective == "Y") + .Where((t1) => t1.CityID == sCityID) + .Where((t1) => t1.LangType == sLangType) + .ToList(); + + rm = new SuccessResponseMessage(null, i_crm); + rm.DATA.Add(BLWording.REL, saOrganizers); + + } while (false); + } + catch (Exception ex) + { + sMsg = Util.GetLastExceptionMsg(ex); + LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(OrganizerMaintain_QryService), "", "QueryOrganizerList 主辦單位管理(List 查詢主辦單位選單)", "", "", ""); + } + finally + { + if (null != sMsg) + { + rm = new ErrorResponseMessage(sMsg, i_crm); + } + } + return rm; + + } + + #endregion 主辦單位管理(List 查詢主辦單位選單) + + #region 主辦單位管理(以ID查詢) + + /// 主辦單位管理(以ID查詢) + /// + /// + /// + /// + + public SETB_ORG_Organizer FindByIDs(RequestMessage i_crm, string sOrganizerID, string sLangType) + { + + ResponseMessage rm = null; + string sMsg = null; + var db = SugarBase.GetIntance(); + + SETB_ORG_Organizer rsOrganizer = new SETB_ORG_Organizer(); + + try + { + do + { + + rsOrganizer = db.Queryable() + .Where((t1) => t1.OrgID == i_crm.ORIGID) + .Where((t1) => t1.OrganizerID == sOrganizerID) + .Where((t1) => t1.LangType == sLangType) + .Single(); + + rm = new SuccessResponseMessage(null, i_crm); + rm.DATA.Add(BLWording.REL, rsOrganizer); + + } while (false); + } + catch (Exception ex) + { + sMsg = Util.GetLastExceptionMsg(ex); + LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(OrganizerMaintain_QryService), "", "FindByIDs 主辦單位管理(以ID查詢)", "", "", ""); + } + finally + { + if (null != sMsg) + { + rm = new ErrorResponseMessage(sMsg, i_crm); + } + } + return rsOrganizer; + + } + + #endregion 主辦單位管理(以ID查詢) + + } } \ No newline at end of file diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/VenueMaintain_QryService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/VenueMaintain_QryService.cs index cbf17b9..7297580 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/VenueMaintain_QryService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/VenueMaintain_QryService.cs @@ -274,5 +274,113 @@ namespace EasyBL.WEBAPP.SYS } #endregion 語言管理 (List 查詢) + + #region 展館管理(List 查詢展館選單) + + /// 展館管理(List 查詢展館選單) + /// + /// + /// + /// + + public ResponseMessage QueryVenueList(RequestMessage i_crm) { + + ResponseMessage rm = null; + string sMsg = null; + var db = SugarBase.GetIntance(); + try + { + do + { + + var sCityID = _fetchString(i_crm, @"CityID"); + var sLangType = _fetchString(i_crm, @"LangType"); + + var saVenues = db.Queryable( + (t1, t2, t3, t4) => new object[] { + JoinType.Left, t1.OrgID == t2.OrgID && t1.RegionID == t2.RegionID && t1.LangType == t2.LangType, + JoinType.Left, t1.OrgID == t2.OrgID && t1.CountryID == t3.CountryID && t1.LangType == t3.LangType, + JoinType.Left, t1.OrgID == t2.OrgID && t1.CityID == t4.CityID && t1.LangType == t4.LangType + }) + .Where((t1, t2, t3, t4) => t1.OrgID == i_crm.ORIGID && t1.DelStatus != "Y") + .Where(t1 => t1.Effective == "Y") + .Where((t1) => t1.CityID == sCityID) + .Where((t1) => t1.LangType == sLangType) + .ToList(); + + rm = new SuccessResponseMessage(null, i_crm); + rm.DATA.Add(BLWording.REL, saVenues); + + } while (false); + } + catch (Exception ex) + { + sMsg = Util.GetLastExceptionMsg(ex); + LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(VenueMaintain_QryService), "", "QueryVenueList 展館管理(List 查詢展館選單)", "", "", ""); + } + finally + { + if (null != sMsg) + { + rm = new ErrorResponseMessage(sMsg, i_crm); + } + } + return rm; + + } + + #endregion 展館管理(List 查詢展館選單) + + #region 展館管理(以ID查詢) + + /// 展館管理(以ID查詢) + /// + /// + /// + /// + + public SETB_ORG_Venue FindByIDs(RequestMessage i_crm, string sVenueID, string sLangType) + { + + ResponseMessage rm = null; + string sMsg = null; + var db = SugarBase.GetIntance(); + + SETB_ORG_Venue rsVenue = new SETB_ORG_Venue(); + + try + { + do + { + + rsVenue = db.Queryable() + .Where((t1) => t1.OrgID == i_crm.ORIGID) + .Where((t1) => t1.VenueID == sVenueID) + .Where((t1) => t1.LangType == sLangType) + .Single(); + + rm = new SuccessResponseMessage(null, i_crm); + rm.DATA.Add(BLWording.REL, rsVenue); + + } while (false); + } + catch (Exception ex) + { + sMsg = Util.GetLastExceptionMsg(ex); + LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(VenueMaintain_QryService), "", "FindByIDs 展館管理(以ID查詢)", "", "", ""); + } + finally + { + if (null != sMsg) + { + rm = new ErrorResponseMessage(sMsg, i_crm); + } + } + return rsVenue; + + } + + #endregion 展館管理(以ID查詢) + } } \ No newline at end of file diff --git a/EuroTran/Entity/ViewModels/View_CMS_Exhibition.cs b/EuroTran/Entity/ViewModels/View_CMS_Exhibition.cs index aa3637a..e225393 100644 --- a/EuroTran/Entity/ViewModels/View_CMS_Exhibition.cs +++ b/EuroTran/Entity/ViewModels/View_CMS_Exhibition.cs @@ -1,10 +1,14 @@ using Entity.Sugar; +using System.Collections.Generic; namespace Entity.ViewModels { public class View_CMS_Exhibition : SETB_CMS_Exhibition { - public string ExhibitionName { get; set; } + + public string JsonOrganizers { get; set; } + + public string JsonVenues { get; set; } public int OrderCount { get; set; } } diff --git a/EuroTran/WebApp/Page/ShowEasy/ExhibMaintain_Upd.html b/EuroTran/WebApp/Page/ShowEasy/ExhibMaintain_Upd.html index 9a70c67..6452ef9 100644 --- a/EuroTran/WebApp/Page/ShowEasy/ExhibMaintain_Upd.html +++ b/EuroTran/WebApp/Page/ShowEasy/ExhibMaintain_Upd.html @@ -24,6 +24,12 @@ + @@ -137,7 +143,7 @@ 展覽主類別: - + @@ -145,7 +151,7 @@ 展覽子類別: - + @@ -157,7 +163,7 @@ - + @@ -165,7 +171,7 @@ - + @@ -177,7 +183,7 @@ - + @@ -185,7 +191,7 @@ - + @@ -197,7 +203,7 @@ - + @@ -205,7 +211,7 @@ - + @@ -217,7 +223,7 @@ - + @@ -225,7 +231,7 @@ - + @@ -240,22 +246,47 @@ + + + 標籤: + + + + + + 是線上展覽: + + + 是 + + 否 + + - - 標籤: + + 網站: - + + + 推薦展會: + + + 是 + + 否 + + 展覽狀態: @@ -395,18 +426,29 @@ + + + 多媒體圖檔: + + + + + + + + + 儲存 - 清除 - 刪除 - 多媒體: + + 多媒體: @@ -414,11 +456,11 @@ - # - 多媒體名稱 - 連結 + # + 多媒體名稱 + 連結 - 操作 + 操作 @@ -426,17 +468,17 @@ - + + - - + - + diff --git a/EuroTran/WebApp/Scripts/pages/ShowEasy/ExhibMaintain_Upd.js b/EuroTran/WebApp/Scripts/pages/ShowEasy/ExhibMaintain_Upd.js index 2f7fada..51b44d5 100644 --- a/EuroTran/WebApp/Scripts/pages/ShowEasy/ExhibMaintain_Upd.js +++ b/EuroTran/WebApp/Scripts/pages/ShowEasy/ExhibMaintain_Upd.js @@ -10,10 +10,16 @@ var currentMediaMap = new Map(); var RegionMap = new Map(); +var OrganizerMap = new Map(); +var VenueMap = new Map(); + var ue_Intro = UE.getEditor('UE_Intro'); var ue_Profile = UE.getEditor('UE_Profile'); var ue_Detail = UE.getEditor('UE_Detail'); +var MediaFileMap = new Map(); +var MediaListMap = new Map(); + var fnPageInit = function () { var canDo = new CanDo({ /** @@ -45,10 +51,6 @@ var fnPageInit = function () { currentExhibitionID = data.ExhibitionID; - //ExhibitionID: data.ExhibitionID; - //console.log("ExhibitionID" + ": " + data.ExhibitionID); - - }, /** @@ -63,18 +65,16 @@ var fnPageInit = function () { }, getInsertParams: function (pargs, data) { - data.Media = []; + data.MainCategoryIDs = []; data.SubCategoryIDs = []; - - currentMediaMap.forEach(function (item, key) { - - data.Media.push(item); - - }) + data.OrganizerIDs = []; + data.VenueIDs = []; data.MainCategoryIDs = JSON.stringify($('#MainCategoryID').val()); data.SubCategoryIDs = JSON.stringify($('#SubCategoryID').val()); + data.OrganizerIDs = JSON.stringify($('#OrganizerID').val()); + data.VenueIDs = JSON.stringify($('#VenueID').val()); return data; }, @@ -113,12 +113,16 @@ var fnPageInit = function () { } - postArray.push(fnSetOrderByValueDrop()); + postArray.push(fnSetOrderByValueDrop(), fnFrequencyDrop(), fnShowStatusDrop()); - $.whenArray(postArray).done(function (res) { + var rsMainCategoryIDs = []; + var rsSubCategoryIDs = []; + var rsOrganizerList = []; + var rsOrganizerIDs = []; + var rsVenueList = []; + var rsVenueIDs = []; - var rsMainCategoryIDs = []; - var rsSubCategoryIDs = []; + $.whenArray(postArray).done(function (res) { if (pargs.action === 'upd' && res[0].RESULT) { var oRes = res[0].DATA.rel; @@ -136,18 +140,49 @@ var fnPageInit = function () { rsSubCategoryIDs = JSON.parse(oRes.SubCategoryIDs); } + if (oRes.JsonOrganizers) { + rsOrganizerList = JSON.parse(oRes.JsonOrganizers); + } + + if (oRes.OrganizerIDs) { + rsOrganizerIDs = JSON.parse(oRes.OrganizerIDs); + } + + if (oRes.JsonVenues) { + rsVenueList = JSON.parse(oRes.JsonVenues); + } + + if (oRes.VenueIDs) { + rsVenueIDs = JSON.parse(oRes.VenueIDs); + } + + fnSetOrganizerDrop(rsOrganizerIDs, rsOrganizerList); + fnSetVenueDrop(rsVenueIDs, rsVenueList); + fnGetExhibInfo(); fnGetStatisticList(); + fnGetMediaList(); pargs._setFormVal(oRes); + + if (oRes.IsVirtualEvent) { + + fnResetVirtualEventLink(oRes.IsVirtualEvent); + + } + pargs.data.Logo = pargs.data.Logo || guid(); + pargs.data.MediaFile = pargs.data.MediaFile || guid(); pargs._getPageVal();//緩存頁面值,用於清除 - fnGetUploadFiles(pargs.data.Logo, fnUpload, 'LogoFile'); + fnGetUploadFiles(pargs.data.Logo, fnUploadLogo, 'LogoFile'); + fnGetMediaFile(); + /*fnGetUploadFiles(pargs.data.MediaFile, fnUploadMediaFile, 'MediaFile');*/ } else { - pargs.data.Logo = guid(); - fnUpload(null, pargs.data.Logo, 'LogoFile'); + var parentid = guid(); + pargs.data.Logo = parentid; + fnUploadLogo(null, parentid, 'LogoFile'); } @@ -180,6 +215,18 @@ var fnPageInit = function () { }); + $('#IsVirtualEvent_radio_0').on('change', function () { + + $('#VirtualEventLink').prop('disabled', false); + + }); + + $('#IsVirtualEvent_radio_1').on('change', function () { + + $('#VirtualEventLink').prop('disabled', true); + + }); + $('.addStatRecord').on('click', function () { var oNewData = {}; oNewData.StatisticsID = guid(); @@ -194,17 +241,6 @@ var fnPageInit = function () { fnBindStatData(); }); - $('.addMediaRecord').on('click', function () { - var oNewData = {}; - oNewData.MediaID = guid(); - oNewData.ExhibInfoID = currentExhibInfoID; - oNewData.MediaName = ''; - oNewData.Link = ''; - - currentMediaMap.set(oNewData.MediaID, oNewData); - fnBindMediaData(); - }); - //清除展覽資訊 $('#btnClearInfo').click(function () { @@ -235,18 +271,16 @@ var fnPageInit = function () { }); - //處存展覽統計 $('#btnSaveStat').click(function () { fnSaveStat(); }); - $('#OrgRegionID').on('change', function () { $('#OrgCityID').empty(); - $('#OrganizerIDs').empty(); + //$('#OrganizerIDs').empty(); fnOrgCountryDrop().done(function () { $('#OrgCountryID').trigger('change'); }); @@ -256,7 +290,7 @@ var fnPageInit = function () { $('#VenueRegionID').on('change', function () { $('#VenueCityID').empty(); - $('#VenueIDs').empty(); + //$('#VenueIDs').empty(); fnVenueCountryDrop().done(function () { $('#VenueCountryID').trigger('change'); }); @@ -265,7 +299,7 @@ var fnPageInit = function () { $('#OrgCountryID').on('change', function () { - $('#OrganizerIDs').empty(); + //$('#OrganizerIDs').empty(); fnOrgCityDrop().done(function () { $('#OrgCityID').trigger('change'); }); @@ -274,7 +308,7 @@ var fnPageInit = function () { $('#VenueCountryID').on('change', function () { - $('#VenueIDs').empty(); + //$('#VenueIDs').empty(); fnVenueCityDrop().done(function () { $('#VenueCityID').trigger('change'); }); @@ -283,7 +317,7 @@ var fnPageInit = function () { $('#OrgCityID').on('change', function () { - fnOrgDrop(); + fnOrganizerDrop(); }); $('#VenueCityID').on('change', function () { @@ -292,6 +326,29 @@ var fnPageInit = function () { }); + $('#btnSaveMedia').click(function () { + + fnSaveMediaList(); + + }); + + $('.addMediaRecord').on('click', function () { + var oNewData = {}; + oNewData.MediaID = guid(); + oNewData.ExhibitionID = currentExhibitionID; + oNewData.MediaName = ''; + oNewData.MediaTypeID = 'Link'; + oNewData.Link = ''; + + MediaListMap.set(oNewData.MediaID, oNewData); + fnBindMediaListData(); + }); + + + + + + $('#MainCategoryID').select2(); $('#SubCategoryID').select2(); @@ -304,8 +361,8 @@ var fnPageInit = function () { $('#OrgCityID').select2(); $('#VenueCityID').select2(); - $('#OrganizerIDs').select2(); - $('#VenueIDs').select2(); + $('#OrganizerID').select2(); + $('#VenueID').select2(); } @@ -333,12 +390,12 @@ var fnPageInit = function () { }, /** - * 上傳附件 + * 上傳LOGO附件 * @param {Array} files 當前文件 * @param {String} parentid * @param {String} inputid file input id */ - fnUpload = function (files, parentid, inputid) { + fnUploadLogo = function (files, parentid, inputid) { var option = {}; option.limit = 1; option.type = 'one'; @@ -405,6 +462,9 @@ var fnPageInit = function () { }); }, + /** + * 獲取洲別資料 + */ fnGetRegoin = function () { var result = ''; @@ -436,6 +496,9 @@ var fnPageInit = function () { }, + /** + * 主辦廠商洲別選單 + */ fnOrgRegionDrop = function () { if (RegionMap.size > 0) { @@ -449,6 +512,9 @@ var fnPageInit = function () { }, + /** + * 展館洲別選單 + */ fnVenueRegionDrop = function () { if (RegionMap.size > 0) { @@ -462,6 +528,9 @@ var fnPageInit = function () { }, + /** + * 主辦廠商國家選單 + */ fnOrgCountryDrop = function () { return g_api.ConnectLite(canDo.ProgramId, "QueryCountryList", { @@ -486,6 +555,9 @@ var fnPageInit = function () { }, + /** + * 展館國家選單 + */ fnVenueCountryDrop = function () { return g_api.ConnectLite(canDo.ProgramId, "QueryCountryList", { @@ -511,6 +583,9 @@ var fnPageInit = function () { }, + /** + * 主辦廠商城市選單 + */ fnOrgCityDrop = function () { return g_api.ConnectLite(canDo.ProgramId, "QueryCityList", { @@ -535,6 +610,9 @@ var fnPageInit = function () { }, + /** + * 展館城市選單 + */ fnVenueCityDrop = function () { return g_api.ConnectLite(canDo.ProgramId, "QueryCityList", { @@ -559,12 +637,47 @@ var fnPageInit = function () { }, - fnOrgDrop = function () { + /** + * 設定主辦廠商選單 + */ + fnSetOrganizerDrop = function (rsOrganizerIDs, rsOrganizerList) { + + + $.each(rsOrganizerList, function (index, value) { + + OrganizerMap.set(value.OrganizerID, value); + }); + + var selected = [...new Set(rsOrganizerIDs)]; + + var sOptionHtml = createOptGroup(rsOrganizerList, 'OrganizerID', 'OrganizerName', '', false); + $('#OrganizerID').html(sOptionHtml); + $('#OrganizerID').val(selected); + + }, + + /** + * 主辦廠商選單 + */ + fnOrganizerDrop = function () { + + var resultMap = new Map(); + var selected = $('#OrganizerID').val(); + + if (selected) { + + $.each(selected, function (index, value) { + + resultMap.set(value, OrganizerMap.get(value)); + + }); + + } - return g_api.ConnectLite(canDo.ProgramId, "QueryOrgList", { + return g_api.ConnectLite(canDo.ProgramId, "QueryOrganizerList", { LangType: $('#LanguageID').val(), - CityID: $('#OrgCityID').val(), + CityID: $('#VenueCityID').val(), }, @@ -572,10 +685,16 @@ var fnPageInit = function () { if (res.RESULT) { - var resultList = res.DATA.rel; + var newResult = res.DATA.rel; + + $.each(newResult, function (index, value) { + + resultMap.set(value.OrganizationID, value); + + }); + + fnSetOrganizerDrop(selected, Array.from(resultMap.values())); - var sOptionHtml = createOptGroup(resultList, 'CityID', 'CityName', '', false); - $('#OrgCityID').html(sOptionHtml); } } @@ -583,8 +702,43 @@ var fnPageInit = function () { }, + /** + * 設定展館選單 + */ + fnSetVenueDrop = function (rsVenueIDs, rsVenueList) { + + + $.each(rsVenueList, function (index, value) { + + VenueMap.set(value.VenueID, value); + }); + + var selected = [...new Set(rsVenueIDs)]; + + var sOptionHtml = createOptGroup(rsVenueList, 'VenueID', 'VenueName', '', false); + $('#VenueID').html(sOptionHtml); + $('#VenueID').val(selected); + + }, + + /** + * 展館選單 + */ fnVenueDrop = function () { + var resultMap = new Map(); + var selected = $('#VenueID').val(); + + if (selected) { + + $.each(selected, function (index, value) { + + resultMap.set(value, VenueMap.get(value)); + + }); + + } + return g_api.ConnectLite(canDo.ProgramId, "QueryVenueList", { LangType: $('#LanguageID').val(), @@ -596,10 +750,16 @@ var fnPageInit = function () { if (res.RESULT) { - var resultList = res.DATA.rel; + var newResult = res.DATA.rel; + + $.each(newResult, function (index, value) { + + resultMap.set(value.VenueID, value); + + }); + + fnSetVenueDrop(selected, Array.from(resultMap.values())); - var sOptionHtml = createOptGroup(resultList, 'CityID', 'CityName', '', false); - $('#VenueCityID').html(sOptionHtml); } } @@ -607,6 +767,62 @@ var fnPageInit = function () { }, + /** + * 週期選單 + */ + fnFrequencyDrop = function () { + + return g_api.ConnectLite(canDo.ProgramId, "QueryFrequencyList", { + + LanguageID: $('#LanguageID').val() + + }, + + function (res) { + if (res.RESULT) { + + var frequencyList = res.DATA.rel; + $('#Frequency').html(createOptions(frequencyList, 'ArgumentID', 'ArgumentValue', false)); + + } + }); + + + }, + + /** + * 展覽狀態選單 + */ + fnShowStatusDrop = function () { + + return g_api.ConnectLite(canDo.ProgramId, "QueryShowStatusList", { + + LanguageID: $('#LanguageID').val() + + }, + + function (res) { + if (res.RESULT) { + + var statusList = res.DATA.rel; + $('#ExhibStatus').html(createOptions(statusList, 'ArgumentID', 'ArgumentValue', false)); + + } + }); + + + }, + + fnResetVirtualEventLink = function (status) { + + $('#VirtualEventLink').prop('disabled', true); + + if (status === 'Y') { + $('#VirtualEventLink').prop('disabled', false); + } + + }, + /** * 設定排序下拉選單 */ @@ -634,7 +850,6 @@ var fnPageInit = function () { /** * 停用展覽資訊 - * @return {Object} Ajax 物件 */ fnDisableExhibInfo = function (status) { @@ -669,7 +884,6 @@ var fnPageInit = function () { /** * 停用統計資訊 - * @return {Object} Ajax 物件 */ fnDisableStatistic = function (status) { @@ -693,7 +907,6 @@ var fnPageInit = function () { /** * 停用多媒體資訊 - * @return {Object} Ajax 物件 */ fnDisableMedia = function (status) { @@ -717,7 +930,6 @@ var fnPageInit = function () { /** * 清除展覽資訊 - * @return {Object} Ajax 物件 */ fnResetExhibInfo = function () { @@ -737,7 +949,6 @@ var fnPageInit = function () { /** * 處存展覽資訊 - * @return {Object} Ajax 物件 */ fnSaveExhibInfo = function () { @@ -792,8 +1003,7 @@ var fnPageInit = function () { }, /** - * 展覽資訊 - * @return {Object} Ajax 物件 + * 獲取展覽資訊 */ fnGetExhibInfo = function (data) { @@ -925,10 +1135,8 @@ var fnPageInit = function () { }, /** - * 展覽統計 - * @return {Object} Ajax 物件 + * 獲取展覽統計 */ - fnGetStatisticList = function (data) { return g_api.ConnectLite(canDo.ProgramId, "QueryStatisticsList", { @@ -958,8 +1166,7 @@ var fnPageInit = function () { }, /** - * 處存統計 - * @return {Object} Ajax 物件 + * 處存展覽統計 */ fnSaveStat = function () { @@ -990,15 +1197,46 @@ var fnPageInit = function () { }, + /** + * 上傳多媒體附件 + * @param {Array} files 當前文件 + * @param {String} parentid + * @param {String} inputid file input id + */ + fnUploadMediaFile = function (files, parentid) { + var fileInput = document.getElementById("MediaFile"); + + parentid = currentExhibitionID; + + $("#fileParent").html(""); + $("#fileParent").append(fileInput); + var option = {}; + option.input = $('#MediaFile'); + option.extensions = ['jpg', 'jpeg', 'png', 'bmp', 'gif', 'png']; + option.theme = 'dragdropbox'; + option.folder = 'Exhibition'; + option.type = 'list'; + option.parentid = parentid; + if (files) { + option.files = files; + // 顯示圖標 + //option.showThumbs = true; + } else { + // 隱藏圖標 + //option.showThumbs = false; + } + fnUploadRegister(option); + }, + /** * 綁定多媒體資料 */ - fnBindMediaData = function () { + fnBindMediaListData = function () { var sKeysHtml = ''; var idx = 0; - currentMediaMap.forEach(function (item, key) { + MediaListMap.forEach(function (item, key) { idx += 1; @@ -1017,8 +1255,8 @@ var fnPageInit = function () { var sId = $(this).attr('data-value'); - currentMediaMap.delete(sId); - fnBindMediaData(); + MediaListMap.delete(sId); + fnBindMediaListData(); }); $('#media_box [data-input]').on('change click', function () { @@ -1026,20 +1264,26 @@ var fnPageInit = function () { sId = $(this).parents('tr').attr('data-id'), sVal = this.value; - var item = currentMediaMap.get(sId); + var item = MediaListMap.get(sId); item[sKey] = sVal; - currentMediaMap.set(sId, item); + MediaListMap.set(sId, item); }); + }, + + fnGetMediaFile = function () { + + fnGetUploadFiles(currentExhibitionID, fnUploadMediaFile, 'MediaFile'); }, fnGetMediaList = function (data) { + return g_api.ConnectLite(canDo.ProgramId, "QueryMediaList", { - ExhibInfoID: currentExhibInfoID, + ExhibitionID: currentExhibitionID, }, function (res) { @@ -1051,16 +1295,50 @@ var fnPageInit = function () { $.each(rsMediaList, function (index, value) { - currentMediaMap.set(value.MediaID, value); + MediaListMap.set(value.MediaID, value); }); - fnBindMediaData(); + fnBindMediaListData(); } } }); + + }, + + /** + * 處存多媒體 + */ + fnSaveMediaList = function () { + + // save media list + var mediaList = Array.from(MediaListMap.values()); + + return g_api.ConnectLite(canDo.ProgramId, "SaveMediaList", { + + MediaList: JSON.stringify(mediaList), + + }, function (res) { + if (res.RESULT) { + var oRes = res.DATA.rel; + + if (oRes) { + + showMsg(i18next.t("message.Modify_Success"), 'success'); //╠message.Insert_Success⇒新增成功╣ + + } + + } + else { + showMsg(i18next.t("message.Modify_Failed") + '' + res.MSG, 'error');// ╠message.Insert_Failed⇒新增失敗╣ + } + }, function () { + showMsg(i18next.t("message.Modify_Error"), 'error');// ╠message.Insert_Error⇒新增資料異常╣ + }); + + }, createOptGroup = function (list, id, value, label, showid) {