chore: 首次簽入 Thinkyu ASP.NET 專案
- 加入 Visual Studio / ASP.NET .gitignore - 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
This commit is contained in:
@@ -0,0 +1,298 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using 報到系統客戶端.Models;
|
||||
|
||||
namespace 報到系統客戶端.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// 報名服務客戶端
|
||||
/// 呼叫後端 Services/SignUpService.asmx
|
||||
/// </summary>
|
||||
public class SignUpService
|
||||
{
|
||||
private const string SERVICE_PATH = "/Services/SignUpService.asmx";
|
||||
|
||||
/// <summary>
|
||||
/// 搜尋活動參加人員清單
|
||||
/// </summary>
|
||||
/// <param name="pageIndex">頁碼(從 1 開始)</param>
|
||||
/// <param name="pageSize">每頁筆數</param>
|
||||
/// <param name="courseID">活動編號</param>
|
||||
/// <param name="name">學員姓名</param>
|
||||
/// <param name="mobile">手機號</param>
|
||||
/// <returns>搜尋結果</returns>
|
||||
public static BaseResponse SearchSignUps(
|
||||
int pageIndex,
|
||||
int pageSize,
|
||||
int courseID,
|
||||
string name = "",
|
||||
string mobile = "")
|
||||
{
|
||||
var parameters = new
|
||||
{
|
||||
pageIndex = pageIndex,
|
||||
pageSize = pageSize,
|
||||
courseID = courseID,
|
||||
name = name,
|
||||
mobile = mobile
|
||||
};
|
||||
|
||||
return ApiService.Instance.Post(SERVICE_PATH, "SearchSignUps", parameters);
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 搜尋活動參加人員清單(非同步版本)
|
||||
///// </summary>
|
||||
//public static async Task<BaseResponse> SearchSignUpsAsync(
|
||||
// int pageIndex,
|
||||
// int pageSize,
|
||||
// int courseID,
|
||||
// string name = "",
|
||||
// string mobile = "")
|
||||
//{
|
||||
// var parameters = new
|
||||
// {
|
||||
// pageIndex = pageIndex,
|
||||
// pageSize = pageSize,
|
||||
// courseID = courseID,
|
||||
// name = name,
|
||||
// mobile = mobile
|
||||
// };
|
||||
|
||||
// return await ApiService.Instance.PostAsync(SERVICE_PATH, "SearchSignUps", parameters);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 上傳活動參加人員簽到簽退資料
|
||||
/// 由 WinForm 客戶端上傳簽到簽退資料
|
||||
/// </summary>
|
||||
/// <param name="courseID">活動編號</param>
|
||||
/// <param name="items">報名人員列表</param>
|
||||
/// <returns>上傳結果</returns>
|
||||
//public static BaseResponse UploadSignUps(int courseID, List<SignUpItem> items)
|
||||
//{
|
||||
// var parameters = new
|
||||
// {
|
||||
// courseID = courseID,
|
||||
// items = items
|
||||
// };
|
||||
|
||||
// return ApiService.Instance.Post(SERVICE_PATH, "UploadSignUps", parameters);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 上傳活動參加人員簽到簽退資料(非同步版本)
|
||||
/// </summary>
|
||||
//public static async Task<BaseResponse> UploadSignUpsAsync(int courseID, List<SignUpItem> items)
|
||||
//{
|
||||
// var parameters = new
|
||||
// {
|
||||
// courseID = courseID,
|
||||
// items = items
|
||||
// };
|
||||
|
||||
// return await ApiService.Instance.PostAsync(SERVICE_PATH, "UploadSignUps", parameters);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 掃碼簽到
|
||||
/// </summary>
|
||||
/// <param name="checkType">簽到類型</param>
|
||||
/// <param name="qrCode">QR Code</param>
|
||||
/// <param name="checkInTime">簽到時間</param>
|
||||
/// <returns>簽到結果</returns>
|
||||
//public static BaseResponse CheckIn(string checkType, string qrCode, DateTime checkInTime)
|
||||
//{
|
||||
// var parameters = new
|
||||
// {
|
||||
// checkType = checkType,
|
||||
// qrCode = qrCode,
|
||||
// checkInTime = checkInTime
|
||||
// };
|
||||
|
||||
// return ApiService.Instance.Post(SERVICE_PATH, "CheckIn", parameters);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 掃碼簽到(非同步版本)
|
||||
/// </summary>
|
||||
//public static async Task<BaseResponse> CheckInAsync(string checkType, string qrCode, DateTime checkInTime)
|
||||
//{
|
||||
// var parameters = new
|
||||
// {
|
||||
// checkType = checkType,
|
||||
// qrCode = qrCode,
|
||||
// checkInTime = checkInTime
|
||||
// };
|
||||
|
||||
// return await ApiService.Instance.PostAsync(SERVICE_PATH, "CheckIn", parameters);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 掃碼簽退
|
||||
/// </summary>
|
||||
/// <param name="checkType">簽退類型</param>
|
||||
/// <param name="qrCode">QR Code</param>
|
||||
/// <param name="checkOutTime">簽退時間</param>
|
||||
/// <returns>簽退結果</returns>
|
||||
//public static BaseResponse CheckOut(string checkType, string qrCode, DateTime checkOutTime)
|
||||
//{
|
||||
// var parameters = new
|
||||
// {
|
||||
// checkType = checkType,
|
||||
// qrCode = qrCode,
|
||||
// checkOutTime = checkOutTime
|
||||
// };
|
||||
|
||||
// return ApiService.Instance.Post(SERVICE_PATH, "CheckOut", parameters);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 掃碼簽退(非同步版本)
|
||||
/// </summary>
|
||||
//public static async Task<BaseResponse> CheckOutAsync(string checkType, string qrCode, DateTime checkOutTime)
|
||||
//{
|
||||
// var parameters = new
|
||||
// {
|
||||
// checkType = checkType,
|
||||
// qrCode = qrCode,
|
||||
// checkOutTime = checkOutTime
|
||||
// };
|
||||
|
||||
// return await ApiService.Instance.PostAsync(SERVICE_PATH, "CheckOut", parameters);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 現場簽到(未預先登記的參加人員)
|
||||
/// </summary>
|
||||
/// <param name="checkType">簽到類型</param>
|
||||
/// <param name="courseID">活動編號</param>
|
||||
/// <param name="name">姓名</param>
|
||||
/// <param name="mobile">手機號</param>
|
||||
/// <param name="checkInTime">簽到時間</param>
|
||||
/// <returns>簽到結果</returns>
|
||||
//public static BaseResponse OnSiteCheckIn(
|
||||
// string checkType,
|
||||
// int courseID,
|
||||
// string name,
|
||||
// string mobile,
|
||||
// DateTime checkInTime)
|
||||
//{
|
||||
// var parameters = new
|
||||
// {
|
||||
// checkType = checkType,
|
||||
// courseID = courseID,
|
||||
// name = name,
|
||||
// mobile = mobile,
|
||||
// checkInTime = checkInTime
|
||||
// };
|
||||
|
||||
// return ApiService.Instance.Post(SERVICE_PATH, "OnSiteCheckIn", parameters);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 現場簽到(非同步版本)
|
||||
/// </summary>
|
||||
//public static async Task<BaseResponse> OnSiteCheckInAsync(
|
||||
// string checkType,
|
||||
// int courseID,
|
||||
// string name,
|
||||
// string mobile,
|
||||
// DateTime checkInTime)
|
||||
//{
|
||||
// var parameters = new
|
||||
// {
|
||||
// checkType = checkType,
|
||||
// courseID = courseID,
|
||||
// name = name,
|
||||
// mobile = mobile,
|
||||
// checkInTime = checkInTime
|
||||
// };
|
||||
|
||||
// return await ApiService.Instance.PostAsync(SERVICE_PATH, "OnSiteCheckIn", parameters);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 現場簽退(未預先登記的參加人員)
|
||||
/// </summary>
|
||||
/// <param name="checkType">簽退類型</param>
|
||||
/// <param name="courseID">活動編號</param>
|
||||
/// <param name="name">姓名</param>
|
||||
/// <param name="mobile">手機號</param>
|
||||
/// <param name="checkOutTime">簽退時間</param>
|
||||
/// <returns>簽退結果</returns>
|
||||
//public static BaseResponse OnSiteCheckOut(
|
||||
// string checkType,
|
||||
// int courseID,
|
||||
// string name,
|
||||
// string mobile,
|
||||
// DateTime checkOutTime)
|
||||
//{
|
||||
// var parameters = new
|
||||
// {
|
||||
// checkType = checkType,
|
||||
// courseID = courseID,
|
||||
// name = name,
|
||||
// mobile = mobile,
|
||||
// checkOutTime = checkOutTime
|
||||
// };
|
||||
|
||||
// return ApiService.Instance.Post(SERVICE_PATH, "OnSiteCheckOut", parameters);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 現場簽退(非同步版本)
|
||||
/// </summary>
|
||||
//public static async Task<BaseResponse> OnSiteCheckOutAsync(
|
||||
// string checkType,
|
||||
// int courseID,
|
||||
// string name,
|
||||
// string mobile,
|
||||
// DateTime checkOutTime)
|
||||
//{
|
||||
// var parameters = new
|
||||
// {
|
||||
// checkType = checkType,
|
||||
// courseID = courseID,
|
||||
// name = name,
|
||||
// mobile = mobile,
|
||||
// checkOutTime = checkOutTime
|
||||
// };
|
||||
|
||||
// return await ApiService.Instance.PostAsync(SERVICE_PATH, "OnSiteCheckOut", parameters);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 批量上傳簽到簽退資料
|
||||
/// 由 WinForm 客戶端上傳簽到簽退資料
|
||||
/// </summary>
|
||||
/// <param name="courseID">活動編號</param>
|
||||
/// <param name="items">簽到簽退資料列表</param>
|
||||
/// <returns>上傳結果</returns>
|
||||
public static BaseResponse UploadCheckIns(int courseID, List<CheckInItem> items)
|
||||
{
|
||||
var parameters = new
|
||||
{
|
||||
courseID = courseID,
|
||||
items = items
|
||||
};
|
||||
|
||||
return ApiService.Instance.Post(SERVICE_PATH, "UploadCheckIns", parameters);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量上傳簽到簽退資料(非同步版本)
|
||||
/// </summary>
|
||||
//public static async Task<BaseResponse> UploadCheckInsAsync(int courseID, List<CheckInItem> items)
|
||||
//{
|
||||
// var parameters = new
|
||||
// {
|
||||
// courseID = courseID,
|
||||
// items = items
|
||||
// };
|
||||
|
||||
// return await ApiService.Instance.PostAsync(SERVICE_PATH, "UploadCheckIns", parameters);
|
||||
//}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user