1. 新增法會活動品項:牌位陽上與超度人數限制功能
2. 信眾資料新增全年性選項以及開始參加活動日期,自動報名並代入前一次的報名資料(品項)
This commit is contained in:
@@ -7,6 +7,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
@@ -958,6 +959,10 @@ public class activityController : ApiController
|
||||
},
|
||||
price = x.price ?? 0,
|
||||
qty = x.qty ?? 0,
|
||||
has_yang_limit = x.has_yang_limit?? false,
|
||||
has_chao_limit = x.has_yang_limit?? false,
|
||||
yang_limit_count = x.yang_limit_count?? 0,
|
||||
chao_limit_count = x.chao_limit_count?? 0,
|
||||
files = x.actItem?.actItem_files.Select(f => new
|
||||
{
|
||||
num = f.file.num,
|
||||
@@ -1175,6 +1180,10 @@ public class activityController : ApiController
|
||||
if (item.qty.HasValue) { _data.qty = item.qty.Value; }
|
||||
else { _data.qty = null; }
|
||||
_data.reg_time = DateTime.Now;
|
||||
if (item.has_yang_limit.HasValue) { _data.has_yang_limit = item.has_yang_limit; }
|
||||
if (item.yang_limit_count >= 0) { _data.yang_limit_count = item.yang_limit_count.Value; }
|
||||
if (item.has_chao_limit.HasValue) { _data.has_chao_limit = item.has_chao_limit; }
|
||||
if (item.chao_limit_count >= 0) { _data.chao_limit_count = item.chao_limit_count.Value; }
|
||||
|
||||
_db.SaveChanges();
|
||||
var ret = _data.num;
|
||||
@@ -1195,6 +1204,10 @@ public class activityController : ApiController
|
||||
if (item.qty.HasValue) { _data.qty = item.qty.Value; }
|
||||
else { _data.qty = null; }
|
||||
_data.reg_time = DateTime.Now;
|
||||
if (item.has_yang_limit.HasValue) { _data.has_yang_limit = item.has_yang_limit; }
|
||||
if (item.yang_limit_count >= 0) { _data.yang_limit_count = item.yang_limit_count.Value; }
|
||||
if (item.has_chao_limit.HasValue) { _data.has_chao_limit = item.has_chao_limit; }
|
||||
if (item.chao_limit_count >= 0) { _data.chao_limit_count = item.chao_limit_count.Value; }
|
||||
|
||||
_db.activity_relating.Add(_data);
|
||||
_db.SaveChanges();
|
||||
|
||||
Reference in New Issue
Block a user