01.
<asp:FileUpload ID =
"Picture"
runat=
"server"
Width=
"230px"
/></td>
02.
03.
04.
page EmpFormFoods1.aspx.cs
05.
06.
protected
void
btSAVE_Click(
object
sender, EventArgs e)
07.
{
08.
ClassEmployee cm =
new
ClassEmployee();
09.
10.
if
(cm.insertFood(Name.Text, type.Text, Price_per_table.Text, Total.Text, Deteal.Text, unit.Text,Picture.text, Status.Value.ToString()))
11.
{
12.
13.
Response.Write(
"<script>alert('บันทึกข้อมูลเรียบร้อย') </script>"
);
14.
Name.Text =
string
.Empty;
15.
type.Text =
string
.Empty;
16.
Price_per_table.Text =
string
.Empty;
17.
Total.Text =
string
.Empty;
18.
Deteal.Text =
string
.Empty;
19.
unit.Text =
string
.Empty;
20.
Picture.Text =
string
.Empty;
21.
Status.Text =
string
.Empty;
22.
}
23.
else
24.
{
25.
Response.Write(
"<script>alert ไม่สามารถบันทึกข้อมูลได้ </script>"
);
26.
}