1. 優化報名頁面:彈出查詢頁面、顯示剛新增資料
2. 新增報名頁面加上取消鍵 3. 優化登入頁面:按下 enter 自動換格/送出 4. 修復新增報名頁面中,不同 search_dialog 中的 page 參數相互連動之異常 5. 修改報名頁面列印格式 6. 修復報名頁面匯出功能 7. 優化報到功能 8. 報名頁面中,無查詢資料時不可點選匯出/列印按鈕 9. 匯出/列印報名管理報表時,若無資料則顯示提示 10. 修復列印管理報表後父視窗 UI 不能點擊的問題 11. 新增報名管理表單匯出 excel 功能 12. 於新增信眾、新增活動頁面加上取消鍵 13. 優化報名管理匯出功能:若篩選條件包含特定活動,自動於「匯出條件」欄位標註活動名稱 14. 優化報名查詢匯出功能:匯出之文件中加上「匯出條件」欄位 15. 修復信眾資料頁面中,使用「生日」作為篩選基準時,後續執行「列印查詢資料」與「匯出查詢資料」會報錯 16. 修復「列印信眾查詢」功能中,電話搜尋欄位未正確帶入查詢條件之異常 17. 解決中文輸入法輸入電話號碼的跳字問題 18. 新增品項管理介面排序功能
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using DocumentFormat.OpenXml.Drawing.Spreadsheet;
|
||||
using Model;
|
||||
using Newtonsoft.Json;
|
||||
using Org.BouncyCastle.Crypto;
|
||||
using PagedList;
|
||||
@@ -10,6 +11,7 @@ using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using System.Web.Services;
|
||||
using static TreeView;
|
||||
|
||||
// api/activity
|
||||
@@ -326,6 +328,36 @@ public class activityController : ApiController
|
||||
return Ok(ret);
|
||||
}
|
||||
|
||||
public class SortOrderRequest
|
||||
{
|
||||
public List<int> ids { get; set; }
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/activity/SaveItemList")]
|
||||
public IHttpActionResult UpdateSortOrder([FromBody] SortOrderRequest request)
|
||||
{
|
||||
if (request == null || request.ids == null) return BadRequest();
|
||||
|
||||
using (Model.ezEntities _db = new Model.ezEntities())
|
||||
{
|
||||
int totalCount = request.ids.Count;
|
||||
|
||||
for (int i = 0; i < totalCount; i++)
|
||||
{
|
||||
int id = request.ids[i];
|
||||
var item = _db.actItems.FirstOrDefault(x => x.num == id);
|
||||
if (item != null)
|
||||
{
|
||||
// 改成總數減去索引,這樣第一筆 (i=0) 會拿到最大的數字
|
||||
item.sort_order = totalCount - i;
|
||||
}
|
||||
}
|
||||
_db.SaveChanges();
|
||||
}
|
||||
return Ok();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("api/activity/GetItemList")]
|
||||
public IHttpActionResult GetItemList([FromBody] Model.ViewModel.actItem q, int page, int pageSize = 10,
|
||||
@@ -430,8 +462,14 @@ public class activityController : ApiController
|
||||
else
|
||||
qry = qry.OrderBy(o => o.status);
|
||||
}
|
||||
else
|
||||
else if (sortBy.Equals("num"))
|
||||
{
|
||||
qry = qry.OrderByDescending(o => o.num);
|
||||
}
|
||||
else
|
||||
{
|
||||
qry = qry.OrderByDescending(o => o.sort_order);
|
||||
}
|
||||
|
||||
var tdesc = publicFun.enum_desc<Model.activity.category>();
|
||||
var count = qry.Count(); //pageSize = count;//一次取回??
|
||||
@@ -1315,7 +1353,7 @@ public class activityController : ApiController
|
||||
[Route("api/activity/OrderCheckIn")]
|
||||
public IHttpActionResult OrderCheckIn([FromBody] Model.activity_check item)
|
||||
{
|
||||
if (item.f_num.HasValue && item.activity_num.HasValue && item.qty.HasValue && item.status.HasValue)
|
||||
if (item.f_num.HasValue && item.activity_num.HasValue && item.status.HasValue)
|
||||
{
|
||||
//同一天不能簽到兩次以上
|
||||
Model.activity_check check = _db.activity_check
|
||||
|
||||
Reference in New Issue
Block a user