質問編集履歴
2
追記でコードを記載します。
test
CHANGED
File without changes
|
test
CHANGED
@@ -39,3 +39,175 @@
|
|
39
39
|
visual studio 2017
|
40
40
|
|
41
41
|
PostgreSQL 12.2
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
### 追記(202009022027)
|
46
|
+
|
47
|
+
ご指摘ありがとうございます。再度コードを記載します。
|
48
|
+
|
49
|
+
```
|
50
|
+
|
51
|
+
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
|
52
|
+
|
53
|
+
ConnectionString="<%$ ConnectionStrings:sampleConnectionString %>"
|
54
|
+
|
55
|
+
DeleteCommand="DELETE FROM staffsample WHERE sscd = ?"
|
56
|
+
|
57
|
+
InsertCommand="INSERT INTO staffsample (stfnm, blood, sbt, knmnikin, knmyakin) VALUES (?, ?, ?, ?, ?)"
|
58
|
+
|
59
|
+
ProviderName="<%$ ConnectionStrings:sampleConnectionString.ProviderName %>"
|
60
|
+
|
61
|
+
SelectCommand="SELECT * FROM staffsample"
|
62
|
+
|
63
|
+
UpdateCommand="UPDATE staffsample SET stfnm = ?, blood = ?, sbt = ?, knmnikin = ?, knmyakin = ? WHERE sscd = ?">
|
64
|
+
|
65
|
+
<DeleteParameters>
|
66
|
+
|
67
|
+
<asp:Parameter Name="sscd" Type="Int32" />
|
68
|
+
|
69
|
+
</DeleteParameters>
|
70
|
+
|
71
|
+
<InsertParameters>
|
72
|
+
|
73
|
+
<asp:Parameter Name="stfnm" Type="String" />
|
74
|
+
|
75
|
+
<asp:Parameter Name="blood" Type="String" />
|
76
|
+
|
77
|
+
<asp:Parameter Name="sbt" Type="String" />
|
78
|
+
|
79
|
+
<asp:Parameter Name="knmnikin" Type="String" />
|
80
|
+
|
81
|
+
<asp:Parameter Name="knmyakin" Type="String" />
|
82
|
+
|
83
|
+
</InsertParameters>
|
84
|
+
|
85
|
+
<UpdateParameters>
|
86
|
+
|
87
|
+
<asp:Parameter Name="stfnm" Type="String" />
|
88
|
+
|
89
|
+
<asp:Parameter Name="blood" Type="String" />
|
90
|
+
|
91
|
+
<asp:Parameter Name="sbt" Type="String" />
|
92
|
+
|
93
|
+
<asp:Parameter Name="knmnikin" Type="String" />
|
94
|
+
|
95
|
+
<asp:Parameter Name="knmyakin" Type="String" />
|
96
|
+
|
97
|
+
<asp:Parameter Name="sscd" Type="Int32" />
|
98
|
+
|
99
|
+
</UpdateParameters>
|
100
|
+
|
101
|
+
</asp:SqlDataSource>
|
102
|
+
|
103
|
+
<br />
|
104
|
+
|
105
|
+
<asp:FormView ID="FormView1" runat="server" AllowPaging="True" DataSourceID="SqlDataSource1" DataKeyNames="sscd">
|
106
|
+
|
107
|
+
<EditItemTemplate>
|
108
|
+
|
109
|
+
<p>■基本情報</p>
|
110
|
+
|
111
|
+
<table>
|
112
|
+
|
113
|
+
<tr>
|
114
|
+
|
115
|
+
<td rowspan="3">氏名</td>
|
116
|
+
|
117
|
+
<td>氏名</td>
|
118
|
+
|
119
|
+
<td>
|
120
|
+
|
121
|
+
<asp:TextBox ID="stfnmTB" runat="server" Text='<%# Bind("stfnm") %>' />
|
122
|
+
|
123
|
+
</td>
|
124
|
+
|
125
|
+
</tr>
|
126
|
+
|
127
|
+
<tr>
|
128
|
+
|
129
|
+
<td>血液型</td>
|
130
|
+
|
131
|
+
<td>
|
132
|
+
|
133
|
+
<asp:DropDownList ID="bloodDDL" runat="server" SelectedValue='<%# Bind("blood") %>'>
|
134
|
+
|
135
|
+
<asp:ListItem></asp:ListItem>
|
136
|
+
|
137
|
+
<asp:ListItem>A型</asp:ListItem>
|
138
|
+
|
139
|
+
<asp:ListItem>B型</asp:ListItem>
|
140
|
+
|
141
|
+
<asp:ListItem>O型</asp:ListItem>
|
142
|
+
|
143
|
+
<asp:ListItem>AB型</asp:ListItem>
|
144
|
+
|
145
|
+
<asp:ListItem>不明</asp:ListItem>
|
146
|
+
|
147
|
+
</asp:DropDownList>
|
148
|
+
|
149
|
+
</td>
|
150
|
+
|
151
|
+
</tr>
|
152
|
+
|
153
|
+
<tr>
|
154
|
+
|
155
|
+
<td>性別</td>
|
156
|
+
|
157
|
+
<td>
|
158
|
+
|
159
|
+
<asp:DropDownList ID="sbtDDL" runat="server" SelectedValue='<%# Bind("sbt") %>'>
|
160
|
+
|
161
|
+
<asp:ListItem></asp:ListItem>
|
162
|
+
|
163
|
+
<asp:ListItem Value="男">男性</asp:ListItem>
|
164
|
+
|
165
|
+
<asp:ListItem Value="女">女性</asp:ListItem>
|
166
|
+
|
167
|
+
</asp:DropDownList>
|
168
|
+
|
169
|
+
</td>
|
170
|
+
|
171
|
+
</tr>
|
172
|
+
|
173
|
+
</table>
|
174
|
+
|
175
|
+
<p>■勤務条件</p>
|
176
|
+
|
177
|
+
<table>
|
178
|
+
|
179
|
+
<tr>
|
180
|
+
|
181
|
+
<td>希望時間</td>
|
182
|
+
|
183
|
+
<td>
|
184
|
+
|
185
|
+
<!--エラーが起きる箇所-->
|
186
|
+
|
187
|
+
<asp:CheckBox ID="knmnikinCB" runat="server" Checked='<%# Bind("knmnikin") %>' />
|
188
|
+
|
189
|
+
日勤
|
190
|
+
|
191
|
+
<br />
|
192
|
+
|
193
|
+
<asp:CheckBox ID="knmyakinCB" runat="server" Checked='<%# Bind("knmyakin") %>' />
|
194
|
+
|
195
|
+
夜勤
|
196
|
+
|
197
|
+
<br />
|
198
|
+
|
199
|
+
</td>
|
200
|
+
|
201
|
+
</tr>
|
202
|
+
|
203
|
+
</table>
|
204
|
+
|
205
|
+
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="更新" />
|
206
|
+
|
207
|
+
<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="キャンセル" />
|
208
|
+
|
209
|
+
</EditItemTemplate>
|
210
|
+
|
211
|
+
</asp:FormView>
|
212
|
+
|
213
|
+
```
|
1
タグとタイトルの修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
ASP.NETのチェックボックスの実装方法
|
test
CHANGED
File without changes
|