chore: 首次簽入 Thinkyu ASP.NET 專案
- 加入 Visual Studio / ASP.NET .gitignore - 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
This commit is contained in:
@@ -0,0 +1,176 @@
|
||||
//
|
||||
// 這個檔案是 MessageQueue 資料表的資料存取類別 檔案二
|
||||
// 您可以修改這個檔案,加入您自訂的屬性與方法
|
||||
//
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
using WebLib;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace 報到系統
|
||||
{
|
||||
///<summary>
|
||||
/// MessageQueue 資料存取類別
|
||||
///</summary>
|
||||
public partial class DAC_MessageQueue : WebLib.DAC
|
||||
{
|
||||
#region 自動產生的資料存取方法
|
||||
///<summary>
|
||||
/// InsertOne 之前會執行此方法
|
||||
/// 在這裡可以做一些檢查或是自動編號等動作
|
||||
/// 回傳 false 會打斷 InsertOne 的執行
|
||||
///</summary>
|
||||
protected virtual bool BeforeInsertOne(MessageQueueItem value)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// InsertOne 之後會執行此方法
|
||||
///</summary>
|
||||
protected virtual void AfterInsertOne(MessageQueueItem value)
|
||||
{
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// InsertOne 發生錯誤時會執行此方法
|
||||
///</summary>
|
||||
///<param name="handled">錯誤是否已經處理妥當</param>
|
||||
protected virtual void OnInsertOneError(Exception error, out bool handled)
|
||||
{
|
||||
handled = false;
|
||||
}
|
||||
///<summary>
|
||||
/// UpdateOne 之前會執行此方法
|
||||
/// 在這裡可以做一些檢查
|
||||
/// 回傳 false 會打斷 UpdateOne 的執行
|
||||
///</summary>
|
||||
protected virtual bool BeforeUpdateOne(MessageQueueItem value)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// UpdateOne 之前會執行此方法
|
||||
/// 在這裡可以做一些檢查
|
||||
/// 回傳 false 會打斷 UpdateOne 的執行
|
||||
///</summary>
|
||||
protected virtual bool BeforeUpdateOne(MessageQueueItem value, MessageQueueItem original_value)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// UpdateOne 之後會執行此方法
|
||||
///</summary>
|
||||
protected virtual void AfterUpdateOne(MessageQueueItem value)
|
||||
{
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// UpdateOne 之後會執行此方法
|
||||
///</summary>
|
||||
protected virtual void AfterUpdateOne(MessageQueueItem value, MessageQueueItem original_value)
|
||||
{
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// UpdateOne 發生錯誤時會執行此方法
|
||||
///</summary>
|
||||
///<param name="handled">錯誤是否已經處理妥當</param>
|
||||
protected virtual void OnUpdateOneError(Exception error, out bool handled)
|
||||
{
|
||||
handled = false;
|
||||
}
|
||||
///<summary>
|
||||
/// DeleteOne 之前會執行此方法
|
||||
/// 在這裡可以做一些檢查
|
||||
/// 回傳 false 會打斷 DeleteOne 的執行
|
||||
///</summary>
|
||||
protected virtual bool BeforeDeleteOne(MessageQueueItem value)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// DeleteOne 之後會執行此方法
|
||||
///</summary>
|
||||
protected virtual void AfterDeleteOne(MessageQueueItem value)
|
||||
{
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// DeleteOne 之前會執行此方法
|
||||
/// 在這裡可以做一些檢查
|
||||
/// 回傳 false 會打斷 DeleteOne 的執行
|
||||
///</summary>
|
||||
protected virtual bool BeforeDeleteOne(int ID, int DB_APPNO)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// DeleteOne 之後會執行此方法
|
||||
///</summary>
|
||||
protected virtual void AfterDeleteOne(int ID, int DB_APPNO)
|
||||
{
|
||||
}
|
||||
|
||||
///<summary>
|
||||
/// DeleteOne 發生錯誤時會執行此方法
|
||||
///</summary>
|
||||
///<param name="handled">錯誤是否已經處理妥當</param>
|
||||
protected virtual void OnDeleteOneError(Exception error, out bool handled)
|
||||
{
|
||||
handled = false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
// 有另外加上去的屬性及方法,請加在這裡
|
||||
public MessageQueueList SelectAllPendingOrSending(string orderBy = "")
|
||||
{
|
||||
MessageQueueList result = new MessageQueueList();
|
||||
IDataList list = result as IDataList;
|
||||
DbCommand cmdSelect = NewCommand();
|
||||
cmdSelect.CommandText = _select + _from + _where + " and (Status='PENDING' or Status='SENDING') " + (orderBy == null || orderBy.Length == 0 ? _order : " order by " + orderBy);
|
||||
Select(cmdSelect, ref list);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
///<summary>
|
||||
///MessageQueue 資料集合類別
|
||||
///</summary>
|
||||
public partial class MessageQueueList : List<MessageQueueItem>
|
||||
{
|
||||
// 有另外加上去的屬性及方法,請加在這裡
|
||||
}
|
||||
|
||||
///<summary>
|
||||
///MessageQueue 資料紀錄類別
|
||||
///</summary>
|
||||
public partial class MessageQueueItem
|
||||
{
|
||||
// 有另外加上去的屬性及方法,請加在這裡
|
||||
|
||||
/// <summary>
|
||||
/// 簡訊帳號(由 SMSSendingService 填入,不對應 DB 欄位)
|
||||
/// </summary>
|
||||
public string MMSAccount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 簡訊密碼(由 SMSSendingService 填入,不對應 DB 欄位)
|
||||
/// </summary>
|
||||
public string MMSPassword { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 平台代碼(由 SMSSendingService 依計畫設定或系統預設填入,不對應 DB 欄位)
|
||||
/// </summary>
|
||||
public string PlatformCode { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user