0.1 #4

Open
minom wants to merge 9 commits from 0.1 into dapper
3 changed files with 10 additions and 9 deletions
Showing only changes of commit 29f2902119 - Show all commits
+8
View File
@@ -522,6 +522,10 @@ public class orderController : ApiController
text = ar.actItem.subject, text = ar.actItem.subject,
val = ar.actItem_num, val = ar.actItem_num,
}, },
has_yang_limit = ar.has_yang_limit ?? false,
has_chao_limit = ar.has_chao_limit ?? false,
yang_limit_count = ar.yang_limit_count ?? 0,
chao_limit_count = ar.chao_limit_count ?? 0,
parent_num = q.num, parent_num = q.num,
f_num_selected = new f_num_selected = new
{ {
@@ -602,6 +606,10 @@ public class orderController : ApiController
text = x.actItem.subject, text = x.actItem.subject,
val = x.actItem.num, val = x.actItem.num,
}, },
has_yang_limit = x.has_yang_limit,
has_chao_limit = x.has_chao_limit,
yang_limit_count = x.yang_limit_count,
chao_limit_count = x.chao_limit_count,
f_num_selected = new f_num_selected = new
{ {
text = "", text = "",
-8
View File
@@ -502,15 +502,12 @@ public partial class admin_follower_reg : MyWeb.config
{ {
if (!isStrNull(pro_order.order_no)) if (!isStrNull(pro_order.order_no))
{ {
Debug.WriteLine(pro_order.order_no);
_db.pro_order.Add(pro_order); _db.pro_order.Add(pro_order);
_db.SaveChanges(); _db.SaveChanges();
// 報名品項(最近一次訂單內容) // 報名品項(最近一次訂單內容)
if (latestOrder != null) if (latestOrder != null)
{ {
Debug.WriteLine("上次的單號 ", latestOrder.order_no);
var last_order_details = _db.pro_order_detail.Where(o => o.order_no == latestOrder.order_no).ToList(); var last_order_details = _db.pro_order_detail.Where(o => o.order_no == latestOrder.order_no).ToList();
foreach (var last_order_detail in last_order_details) foreach (var last_order_detail in last_order_details)
{ {
@@ -564,7 +561,6 @@ public partial class admin_follower_reg : MyWeb.config
if (!string.IsNullOrEmpty(hid_delete_order_list.Value)) if (!string.IsNullOrEmpty(hid_delete_order_list.Value))
{ {
var ids = hid_delete_order_list.Value.TrimEnd(',').Split(','); var ids = hid_delete_order_list.Value.TrimEnd(',').Split(',');
Debug.WriteLine(ids);
var prod = _db.pro_order.Where(q => ids.Contains(q.order_no)).ToList(); var prod = _db.pro_order.Where(q => ids.Contains(q.order_no)).ToList();
if (prod.Count() > 0) if (prod.Count() > 0)
{ {
@@ -616,7 +612,6 @@ public partial class admin_follower_reg : MyWeb.config
if (!string.IsNullOrEmpty(hid_delete_order_list.Value)) if (!string.IsNullOrEmpty(hid_delete_order_list.Value))
{ {
var ids = hid_delete_order_list.Value.TrimEnd(',').Split(','); var ids = hid_delete_order_list.Value.TrimEnd(',').Split(',');
Debug.WriteLine(ids);
var prod = _db.pro_order.Where(q => ids.Contains(q.order_no)).ToList(); var prod = _db.pro_order.Where(q => ids.Contains(q.order_no)).ToList();
if (prod.Count() > 0) if (prod.Count() > 0)
{ {
@@ -693,15 +688,12 @@ public partial class admin_follower_reg : MyWeb.config
{ {
if (!isStrNull(pro_order.order_no)) if (!isStrNull(pro_order.order_no))
{ {
Debug.WriteLine(pro_order.order_no);
_db.pro_order.Add(pro_order); _db.pro_order.Add(pro_order);
_db.SaveChanges(); _db.SaveChanges();
// 報名品項(最近一次訂單內容) // 報名品項(最近一次訂單內容)
if (latestOrder != null) if (latestOrder != null)
{ {
Debug.WriteLine("上次的單號 ", latestOrder.order_no);
var last_order_details = _db.pro_order_detail.Where(o => o.order_no == latestOrder.order_no).ToList(); var last_order_details = _db.pro_order_detail.Where(o => o.order_no == latestOrder.order_no).ToList();
foreach (var last_order_detail in last_order_details) foreach (var last_order_detail in last_order_details)
{ {
+2 -1
View File
@@ -841,7 +841,8 @@
// 顯示對話框 // 顯示對話框
this.tablet_edit.show = true; this.tablet_edit.show = true;
// 立即恢復數據 // 立即恢復數據
this.editedItem = $.extend(true, {}, currentData); this.editedItem = $.extend(true, {}, currentData);
console.log(this.editItem);
} catch (error) { } catch (error) {
console.error('Error in editTablet:', error); console.error('Error in editTablet:', error);
} }