コード例 #1
0
        /// <summary>
        /// 메모 저장 쿼리 가져오기
        /// </summary>
        /// <param name="Param"></param>
        /// <returns></returns>
        public string MemoSaveSqlData(T_MEMO Param)
        {
            string sql = string.Empty;

            if (Param.SAVE_TYPE == "D")
            {
                sql = Global.DBAgent.LoadSQL(sqlBasePath + "BizService\\Common\\T_MEMO.xml", "MemoDelete"
                                             , Param.IDX.ToString("-1")
                                             );
            }
            else
            {
                sql = Global.DBAgent.LoadSQL(sqlBasePath + "BizService\\Common\\T_MEMO.xml", "MemoSave"
                                             , Param.IDX.ToString("-1")
                                             , Param.TABLE_NAME.ToString("")
                                             , Param.TABLE_KEY.ToString("")
                                             , Param.MEMO.ToString("")
                                             , Param.MEMO1.ToString("")
                                             , Param.MEMO2.ToString("")
                                             , Param.INSERT_CODE.ToString("")

                                             );
            }
            return(sql);
        }
コード例 #2
0
        /// <summary>
        /// T_MEMO 저장하기
        /// </summary>
        /// <param name="Param"></param>
        /// <returns></returns>
        public RTN_SAVE_DATA MemoSave(T_MEMO Param)
        {
            RTN_SAVE_DATA rtn = new RTN_SAVE_DATA();

            try
            {
                using (TransactionScope tran = new TransactionScope())
                {
                    string sql = MemoSaveSqlData(Param);
                    rtn.DATA = db.ExecuteQuery <string>(sql).First();
                    tran.Complete();
                }
            }
            catch (Exception ex)
            {
                rtn.ERROR_MESSAGE = ex.Message;
            }
            return(rtn);
        }