0.1 #4

Open
minom wants to merge 9 commits from 0.1 into dapper
4 changed files with 50 additions and 9 deletions
Showing only changes of commit b866a3c454 - Show all commits
+1 -4
View File
@@ -604,10 +604,7 @@
</div> </div>
</div> </div>
<div class="row mb-1 label-sm-right"> <div class="row mb-1 label-sm-right">
<label class="col-sm-2 col-form-label">料號</label>
<div class="col-sm-4">
<asp:TextBox ID="PARTNO" MaxLength="100" runat="server" CssClass="form-control" placeholder="請輸入料號"></asp:TextBox>
</div>
<label class="col-sm-2 col-form-label">項目名稱 *</label> <label class="col-sm-2 col-form-label">項目名稱 *</label>
<div class="col-sm-4"> <div class="col-sm-4">
<asp:TextBox ID="subject" MaxLength="100" runat="server" CssClass="form-control" placeholder="請輸入品項名稱"></asp:TextBox> <asp:TextBox ID="subject" MaxLength="100" runat="server" CssClass="form-control" placeholder="請輸入品項名稱"></asp:TextBox>
+1 -4
View File
@@ -42,7 +42,6 @@ public partial class admin_activity_item_reg : MyWeb.config
BuildKind(); BuildKind();
subject.Text = prod.subject; subject.Text = prod.subject;
print_init.Text = prod.print_init; print_init.Text = prod.print_init;
PARTNO.Text = prod.partno;
//kind.SelectedValue = prod.kind.ToString(); //kind.SelectedValue = prod.kind.ToString();
if (prod.kind.HasValue) if (prod.kind.HasValue)
{ {
@@ -120,8 +119,7 @@ public partial class admin_activity_item_reg : MyWeb.config
Model.actItem actItem = new Model.actItem();//新增 Model.actItem actItem = new Model.actItem();//新增
int maxSort = _db.actItems.Max(x => (int?)x.sort_order) ?? 0; int maxSort = _db.actItems.Max(x => (int?)x.sort_order) ?? 0;
actItem.subject = subject.Text; actItem.subject = subject.Text;
actItem.print_init = print_init.Text; actItem.print_init = print_init.Text;
actItem.partno = PARTNO.Text;
//if (!isStrNull(kind.SelectedValue)) { actItem.kind = Val(kind.SelectedValue); } else { actItem.kind = null; } //if (!isStrNull(kind.SelectedValue)) { actItem.kind = Val(kind.SelectedValue); } else { actItem.kind = null; }
if (!isStrNull(category.SelectedValue)) { actItem.category = Val(category.SelectedValue); } else { actItem.category = null; } if (!isStrNull(category.SelectedValue)) { actItem.category = Val(category.SelectedValue); } else { actItem.category = null; }
if (!isStrNull(kind.Value)) { actItem.kind = Val(kind.Value); } else { actItem.kind = null; } if (!isStrNull(kind.Value)) { actItem.kind = Val(kind.Value); } else { actItem.kind = null; }
@@ -169,7 +167,6 @@ public partial class admin_activity_item_reg : MyWeb.config
{ {
actItem.subject = subject.Text; actItem.subject = subject.Text;
actItem.print_init = print_init.Text; actItem.print_init = print_init.Text;
actItem.partno = PARTNO.Text;
//if (!isStrNull(kind.SelectedValue)) { actItem.kind = Val(kind.SelectedValue); } else { actItem.kind = null; } //if (!isStrNull(kind.SelectedValue)) { actItem.kind = Val(kind.SelectedValue); } else { actItem.kind = null; }
if (!isStrNull(category.SelectedValue)) { actItem.category = Val(category.SelectedValue); } else { actItem.category = null; } if (!isStrNull(category.SelectedValue)) { actItem.category = Val(category.SelectedValue); } else { actItem.category = null; }
if (!isStrNull(kind.Value)) { actItem.kind = Val(kind.Value); } else { actItem.kind = null; } if (!isStrNull(kind.Value)) { actItem.kind = Val(kind.Value); } else { actItem.kind = null; }
+1 -1
View File
@@ -1761,7 +1761,7 @@
type="button" role="tab" aria-controls="profile" aria-selected="false" v-if="lists.length > 0"> type="button" role="tab" aria-controls="profile" aria-selected="false" v-if="lists.length > 0">
未付款紀錄 </button> 未付款紀錄 </button>
<button class="nav-link" id="sec2-tab4" data-bs-toggle="tab" data-bs-target="#sec2-page4" <button class="nav-link" id="sec2-tab4" data-bs-toggle="tab" data-bs-target="#sec2-page4"
type="button" role="tab" aria-controls="profile" aria-selected="false"> type="button" role="tab" aria-controls="profile" aria-selected="false" display="none">
牌位標題 </button> 牌位標題 </button>
<button class="nav-link" id="sec2-tab5" data-bs-toggle="tab" data-bs-target="#sec2-page5" <button class="nav-link" id="sec2-tab5" data-bs-toggle="tab" data-bs-target="#sec2-page5"
type="button" role="tab" aria-controls="profile" aria-selected="false"> type="button" role="tab" aria-controls="profile" aria-selected="false">
+47
View File
@@ -22,7 +22,34 @@
| company | 加上 last_auto_order_no (nvarchar(20)) 欄位 | | | company | 加上 last_auto_order_no (nvarchar(20)) 欄位 | |
| pro_order | 加上 au_num (int) 欄位 | 需建立 FK 限制 (見下方 SQL) | | pro_order | 加上 au_num (int) 欄位 | 需建立 FK 限制 (見下方 SQL) |
- 更新 actitem 資料表
```language ```language
ALTER TABLE actitem
ADD sort_order int NULL;
```
- 更新 activity_relating 資料表
```language
ALTER TABLE activity_relating
ADD has_yang_limit bit NULL,
has_chao_limit bit NULL,
yang_limit_count int NULL,
chao_limit_count int NULL;
```
- 更新 company 資料表
```language
ALTER TABLE company
ADD last_auto_order_no nvarchar(20) NULL;
```
- 更新 pro_order 資料表及外鍵限制
```language
-- 新增欄位
ALTER TABLE pro_order
ADD au_num int NULL;
-- 建立外鍵限制 (FK_pro_order_auto_enroll)
ALTER TABLE pro_order ALTER TABLE pro_order
ADD CONSTRAINT FK_pro_order_auto_enroll ADD CONSTRAINT FK_pro_order_auto_enroll
FOREIGN KEY (au_num) REFERENCES auto_enroll(num); FOREIGN KEY (au_num) REFERENCES auto_enroll(num);
@@ -38,6 +65,26 @@ FOREIGN KEY (au_num) REFERENCES auto_enroll(num);
| receipt_title | nvarchar(MAX) | 是 | | | receipt_title | nvarchar(MAX) | 是 | |
| receipt_address | nchar(200) | 否 | | | receipt_address | nchar(200) | 否 | |
- 建立資料表 auto_enroll
```language
CREATE TABLE [dbo].[auto_enroll] (
[num] int IDENTITY(1,1) NOT NULL,
[f_num] int NOT NULL,
[start_date] date NULL,
[end_date] date NULL,
[receipt_title] nvarchar(MAX) NULL,
[receipt_address] nchar(200) NOT NULL,
CONSTRAINT [PK_auto_enroll] PRIMARY KEY CLUSTERED ([num] ASC)
);
```
- 設定外鍵限制
```language
ALTER TABLE [dbo].[auto_enroll]
ADD CONSTRAINT FK_auto_enroll_followers
FOREIGN KEY (f_num) REFERENCES followers(num);
```
### 資料表相關設定 (SQL) ### 資料表相關設定 (SQL)
- 設定主鍵 - 設定主鍵
```language ```language