コード例 #1
0
 /// <summary>
 /// CRM141_取得 按下"列印",表單類別"彙總表"
 /// </summary>
 /// <param name="ParameterList"></param>
 /// <returns>回傳查詢結果</returns>
 public DataTable PrintSum(ArrayList ParameterList)
 {
     try
     {
         DBO.VDS_CRM_TICKETDBO VCT = new VDS_CRM_TICKETDBO(ref USEDB);
         return VCT.QUERY_CRM141_PRINTSUM(ParameterList);
     }
     catch (Exception ex)
     { throw GetNewException(ex); }
 }
コード例 #2
0
 /// <summary>
 /// CRM141_取得 按下"匯出",表單類別"明細表"
 /// </summary>
 /// <param name="ParameterList"></param>
 /// <returns>回傳查詢結果</returns>
 public DataTable Export(ArrayList ParameterList)
 {
     try
     {
         DBO.VDS_CRM_TICKETDBO VCT = new VDS_CRM_TICKETDBO(ref USEDB);
         return VCT.QUERY_CRM141_EXPORT(ParameterList);
     }
     catch (Exception ex)
     { throw GetNewException(ex); }
 }
コード例 #3
0
 /// <summary>
 /// 取得 VDS_CRM_TICKET 的 SCHEMA
 /// </summary>
 /// <param name="ParameterList"></param>
 /// <returns>回傳查詢結果</returns>
 public DataTable GET_VDS_CRM_TICKET_SCHEMA(ArrayList ParameterList)
 {
     try
     {
         DBO.VDS_CRM_TICKETDBO VCT = new VDS_CRM_TICKETDBO(ref USEDB);
         return VCT.GET_VDS_CRM_TICKET_SCHEMA(ParameterList);
     }
     catch (Exception ex)
     {
         throw GetNewException(ex);
     }
 }
コード例 #4
0
        /// <summary>
        /// 新增 VDS_CRM_TICKET 的資料
        /// </summary>
        /// <param name="ParameterList"></param>
        /// <param name="RootDBT"></param>
        /// <param name="dt_Main"></param>
        /// <returns>VDS_CRM_TICKET.ID</returns>
        public int CreateCRMRecord(ArrayList ParameterList, DbTransaction RootDBT, DataTable dt_Main)
        {
            int i_ID = 0;
            bool IsRootTranscation = false;

            try
            {
                DBO.VDS_CRM_TICKETDBO VCT = new VDS_CRM_TICKETDBO(ref USEDB);

                //判斷是否有傳入Root Transcation 
                IsRootTranscation = (RootDBT == null) ? true : false;

                #region 啟動交易或指定RootTranscation

                if (IsRootTranscation)
                {
                    //獨立呼叫啟動Transcation
                    Conn = USEDB.CreateConnection();
                    Conn.Open();
                    DBT = Conn.BeginTransaction();
                }
                else
                {
                    DBT = RootDBT;
                }

                #endregion

                i_ID = VCT.ADD_CRM032_MAIN(ParameterList, DBT, dt_Main.Rows[0]);

                #region 交易成功

                if (IsRootTranscation)
                {
                    //獨立呼叫Transcation成立
                    DBT.Commit();
                }

                #endregion

                return i_ID;
            }
            catch (Exception ex)
            {
                #region 交易失敗

                if (IsRootTranscation)
                {
                    //獨立呼叫Transcation失敗
                    DBT.Rollback();
                }

                #endregion

                throw GetNewException(ex);
            }
            finally
            {
                #region 判斷是否關閉交易連線

                if (IsRootTranscation)
                {
                    //獨立呼叫Transcation,關閉連線
                    if (Conn.State == ConnectionState.Connecting)
                    {
                        Conn.Close();
                    }
                }

                #endregion

            }
        }
コード例 #5
0
        /// <summary>
        /// 查詢 VDS_CRM_TICKET 的資料
        /// </summary>
        /// <param name="ParameterList">MASTER TABLE 的變數</param>
        /// <returns>VDS_CRM_TICKET 的資料</returns>
        public DataTable QueryByFind(ArrayList ParameterList)
        {
            try
            {
                DataTable dt_Return = new DataTable();

                DBO.VDS_CRM_TICKETDBO VCT = new VDS_CRM_TICKETDBO(ref USEDB);
                dt_Return = VCT.QUERY_CRM031_MAIN_BY_CONDITONS(ParameterList);
                dt_Return.TableName = "VDS_CRM_TICKET";

                return dt_Return;
            }
            catch (Exception ex)
            {
                throw GetNewException(ex);
            }
        }