|
|
@ -46,8 +46,12 @@ namespace EasyBL.WEBAPP.WSM |
|
|
|
{ |
|
|
|
do |
|
|
|
{ |
|
|
|
|
|
|
|
//var sSurveyID = Guid.NewGuid().ToString();
|
|
|
|
|
|
|
|
var oEntity = _fetchEntity<SETB_SAL_Survey>(i_crm); |
|
|
|
_setEntityBase(oEntity, i_crm); |
|
|
|
//oEntity.SurveyID = sSurveyID;
|
|
|
|
oEntity.DelStatus = "N"; |
|
|
|
|
|
|
|
SurveyMaintain_QryService sm_qry = new SurveyMaintain_QryService(); |
|
|
@ -87,6 +91,71 @@ namespace EasyBL.WEBAPP.WSM |
|
|
|
|
|
|
|
#endregion 問卷維護(新增)
|
|
|
|
|
|
|
|
//#region 問題維護(以語言新增)
|
|
|
|
|
|
|
|
///// <summary>
|
|
|
|
///// 問題維護(以語言新增)
|
|
|
|
///// </summary>
|
|
|
|
///// <param name="i_crm"></param>
|
|
|
|
///// <returns></returns>
|
|
|
|
/////
|
|
|
|
//public int InsertByLanguage(RequestMessage i_crm, string sSurveyID, string sLanguage)
|
|
|
|
//{
|
|
|
|
|
|
|
|
// ResponseMessage rm = null;
|
|
|
|
// string sMsg = null;
|
|
|
|
// var db = SugarBase.GetIntance();
|
|
|
|
|
|
|
|
// var iRel = 0;
|
|
|
|
|
|
|
|
// try
|
|
|
|
// {
|
|
|
|
// do
|
|
|
|
// {
|
|
|
|
|
|
|
|
// if (string.IsNullOrEmpty(sSurveyID))
|
|
|
|
// {
|
|
|
|
// sSurveyID = Guid.NewGuid().ToString();
|
|
|
|
// }
|
|
|
|
|
|
|
|
// var oEntity = _fetchEntity<SETB_SAL_Survey>(i_crm);
|
|
|
|
// _setEntityBase(oEntity, i_crm);
|
|
|
|
|
|
|
|
// oEntity.SurveyID = sSurveyID;
|
|
|
|
// oEntity.LanguageID = sLanguage;
|
|
|
|
// oEntity.DelStatus = "N";
|
|
|
|
|
|
|
|
// if (sLanguage == WebAppGlobalConstWord.EN_US)
|
|
|
|
// {
|
|
|
|
|
|
|
|
// oEntity.CategoryName = _fetchString(i_crm, @"CategoryENName");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// iRel = db.Insertable(oEntity).ExecuteCommand();
|
|
|
|
// rm = new SuccessResponseMessage(null, i_crm);
|
|
|
|
// rm.DATA.Add(BLWording.REL, iRel);
|
|
|
|
// } while (false);
|
|
|
|
|
|
|
|
// }
|
|
|
|
// catch (Exception ex)
|
|
|
|
// {
|
|
|
|
// sMsg = Util.GetLastExceptionMsg(ex);
|
|
|
|
// LogAndSendEmail(sMsg + "Params:" + JsonToString(i_crm), ex, i_crm.ORIGID, i_crm.USERID, nameof(CategoryMaintain_UpdService), "", "InsertByLanguage 類別維護(以語言新增)", "", "", "");
|
|
|
|
// }
|
|
|
|
// finally
|
|
|
|
// {
|
|
|
|
// if (null != sMsg)
|
|
|
|
// {
|
|
|
|
// rm = new ErrorResponseMessage(sMsg, i_crm);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// return iRel;
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
//#endregion 問題維護(以語言新增)
|
|
|
|
|
|
|
|
#region 問卷維護(修改)
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
@ -172,13 +241,9 @@ namespace EasyBL.WEBAPP.WSM |
|
|
|
do |
|
|
|
{ |
|
|
|
|
|
|
|
int iSurveyID = 0; |
|
|
|
|
|
|
|
if (!String.IsNullOrEmpty(_fetchString(i_crm, @"SurveyID"))) { |
|
|
|
var sSurveyID = _fetchString(i_crm, @"SurveyID"); |
|
|
|
|
|
|
|
iSurveyID = int.Parse(_fetchString(i_crm, @"SurveyID")); |
|
|
|
|
|
|
|
} |
|
|
|
var iSurveyID = _fetchInt(i_crm, @"SurveyID"); |
|
|
|
|
|
|
|
var oEntity = db.Queryable<SETB_SAL_Survey>().Single(x => x.OrgID == i_crm.ORIGID && x.SurveyID == iSurveyID); |
|
|
|
var iRel = db.Updateable<SETB_SAL_Survey>().UpdateColumns(x => new SETB_SAL_Survey { DelStatus = "Y" }).Where(x => x.OrgID == i_crm.ORIGID && x.SurveyID == iSurveyID).ExecuteCommand(); |
|
|
@ -228,16 +293,9 @@ namespace EasyBL.WEBAPP.WSM |
|
|
|
{ |
|
|
|
do |
|
|
|
{ |
|
|
|
int iSurveyID = 0; |
|
|
|
|
|
|
|
iSurveyID = _fetchInt(i_crm, @"Id"); |
|
|
|
|
|
|
|
if (!String.IsNullOrEmpty(_fetchString(i_crm, @"SurveyID"))) { |
|
|
|
|
|
|
|
iSurveyID = int.Parse(_fetchString(i_crm, @"SurveyID")); |
|
|
|
|
|
|
|
} |
|
|
|
var sSurveyID = _fetchString(i_crm, @"SurveyID"); |
|
|
|
|
|
|
|
var iSurveyID = _fetchInt(i_crm, @"SurveyID"); |
|
|
|
|
|
|
|
var iOldOrderByValue = _fetchInt(i_crm, @"OldOrderByValue"); |
|
|
|
var iNewOrderByValue = _fetchInt(i_crm, @"NewOrderByValue"); |
|
|
|