diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/CategoryMaintain_QryService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/CategoryMaintain_QryService.cs
index ca6ed30..5b91136 100644
--- a/EuroTran/EasyBL.WEBAPP/ShowEasy/CategoryMaintain_QryService.cs
+++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/CategoryMaintain_QryService.cs
@@ -416,5 +416,60 @@ namespace EasyBL.WEBAPP.SYS
#endregion 類別管理(以ID查詢)
+ #region 類別管理(List 查詢所有子類別)
+
+ ///
+ /// 類別管理(List 查詢所有子類別)
+ ///
+ ///
+ ///
+ public ResponseMessage QueryAllSubCategoryList(RequestMessage i_crm)
+ {
+ ResponseMessage rm = null;
+ string sMsg = null;
+ var db = SugarBase.GetIntance();
+
+ var sIsMainCategory = "N";
+
+ try
+ {
+ do
+ {
+
+ var sLanguageID = _fetchString(i_crm, @"LanguageID");
+
+ if (string.IsNullOrEmpty(sLanguageID))
+ {
+ sLanguageID = WebAppGlobalConstWord.DEFAULT_LANGUAGE;
+ }
+
+ var saCategory = db.Queryable()
+ //搜尋條件
+ .Where(x => x.OrgID == i_crm.ORIGID && x.Effective == "Y" && x.DelStatus == "N")
+ .Where(x => x.IsMainCategory == sIsMainCategory)
+ .Where(t1 => t1.LanguageID == sLanguageID)
+ .ToList();
+
+ rm = new SuccessResponseMessage(null, i_crm);
+ rm.DATA.Add(BLWording.REL, saCategory);
+ } while (false);
+ }
+ catch (Exception ex)
+ {
+ sMsg = Util.GetLastExceptionMsg(ex);
+ LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(SurveyMaintain_QryService), "", "QueryCategoryList 問卷管理-類別查詢(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/SurveyMaintain_QryService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/SurveyMaintain_QryService.cs
index b33ba2f..0a6568b 100644
--- a/EuroTran/EasyBL.WEBAPP/ShowEasy/SurveyMaintain_QryService.cs
+++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/SurveyMaintain_QryService.cs
@@ -274,51 +274,24 @@ namespace EasyBL.WEBAPP.SYS
#endregion 問卷管理-問卷類別查詢(List 查詢類別)
- #region 問卷管理-類別查詢(List 查詢類別)
+ #region 問卷管理(List 查詢所有子類別 Call CategoryMaintain_QryService QueryAllSubCategoryList)
///
- /// 問卷管理-類別查詢(List 查詢類別)
+ /// 問卷管理(List 查詢所有子類別 Call CategoryMaintain_QryService QueryAllSubCategoryList)
///
///
///
public ResponseMessage QueryCategoryList(RequestMessage i_crm)
{
- ResponseMessage rm = null;
- string sMsg = null;
- var db = SugarBase.GetIntance();
- var sIsMainCategory = "N";
+ CategoryMaintain_QryService cm_qry = new CategoryMaintain_QryService();
- try
- {
- do
- {
- var saCategory = db.Queryable()
- //搜尋條件
- .Where(x => x.OrgID == i_crm.ORIGID && x.Effective == "Y" && x.DelStatus == "N")
- .Where(x => x.IsMainCategory == sIsMainCategory)
- .ToList();
-
- rm = new SuccessResponseMessage(null, i_crm);
- rm.DATA.Add(BLWording.REL, saCategory);
- } while (false);
- }
- catch (Exception ex)
- {
- sMsg = Util.GetLastExceptionMsg(ex);
- LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(SurveyMaintain_QryService), "", "QueryCategoryList 問卷管理-類別查詢(List 查詢類別)", "", "", "");
- }
- finally
- {
- if (null != sMsg)
- {
- rm = new ErrorResponseMessage(sMsg, i_crm);
- }
- }
+ ResponseMessage rm = cm_qry.QueryAllSubCategoryList(i_crm);
+
return rm;
}
- #endregion 問卷管理-類別查詢(List 查詢類別)
+ #endregion 問卷管理(List 查詢所有子類別 Call CategoryMaintain_QryService QueryAllSubCategoryList)
#region 問卷管理-答案類別查詢(List 查詢類別)