HTML
<div class="modal fade" id="myModal1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Desktop PC</h4>
</div>
<div class="modal-body">
<b>
<p>Available Stocks</p>
</b>
Total :
<asp:Label ID="Label3" runat="server" Text=""></asp:Label>
Issued :
<asp:Label ID="Label4" runat="server" Text=""></asp:Label>
<br />
<br />
<table border="0" width="700">
<tr>
<asp:Label ID="Label2" runat="server" Text="USER-1"></asp:Label>
<td>Asset No:<br />
<asp:TextBox ID="TextBox1" runat="server" BackColor="WhiteSmoke"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="TextBox1"></asp:RequiredFieldValidator>
</td>
<td>Asset Name:<br />
<asp:TextBox ID="TextBox2" Text="Desktop_PC" runat="server" BackColor="Wheat"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="TextBox2"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>Serial Number:<br />
<asp:TextBox ID="TextBox3" runat="server" BackColor="WhiteSmoke"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="TextBox3"></asp:RequiredFieldValidator>
</td>
<td>Date:<br />
<asp:TextBox ID="TextBox28" runat="server" BackColor="Wheat"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="TextBox28"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>Make Model:<br />
<asp:TextBox ID="TextBox4" runat="server" BackColor="WhiteSmoke"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="TextBox4"></asp:RequiredFieldValidator>
</td>
<td>PO. Number:<br />
<asp:TextBox ID="TextBox29" runat="server" BackColor="WhiteSmoke"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="TextBox29"></asp:RequiredFieldValidator>
</td>
</tr>
</table>
</div>
<div class="modal-footer">
<asp:Button ID="Button_pc" class="btn btn-default" runat="server" OnClick="Button_pc_Click" Text="Save" />
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="myModal2" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">All in One PC</h4>
</div>
<div class="modal-body">
<b>
<p>Available Stocks</p>
</b>
Total : Issued :
<br />
<asp:Label ID="Label5" runat="server" Text="USER-1"></asp:Label><br />
<br />
<table border="0" width="570">
<tr>
<td>Asset No:<br />
<asp:TextBox ID="TextBox1_aio" runat="server" BackColor="WhiteSmoke"></asp:TextBox>
</td>
<td>Asset Name:<br />
<asp:TextBox ID="TextBox2_aio" Text="All_in_One_PC" runat="server" BackColor="Wheat"></asp:TextBox>
</td>
</tr>
<tr>
<td>Serial Number:<br />
<asp:TextBox ID="TextBox3_aio" runat="server" BackColor="WhiteSmoke"></asp:TextBox>
</td>
<td>Date:<br />
<asp:TextBox ID="TextBox4_aio" runat="server" BackColor="Wheat"></asp:TextBox>
</td>
</tr>
<tr>
<td>Make Model:<br />
<asp:TextBox ID="TextBox5_aio" runat="server" BackColor="WhiteSmoke"></asp:TextBox>
</td>
<td>PO. Number:<br />
<asp:TextBox ID="TextBox6_aio" runat="server" BackColor="WhiteSmoke"></asp:TextBox>
</td>
</tr>
</table>
</div>
<div class="modal-footer">
<asp:Button ID="Button_aio" class="btn btn-default" runat="server" OnClick="Button_aio_Click" Text="Save" />
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="myModal3" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Keyboard</h4>
</div>
<div class="modal-body">
<b>
<p>Available Stocks</p>
</b>
Total : Issued :
<br />
<asp:Label ID="Label6" runat="server" Text="USER-1"></asp:Label><br />
<br />
<table border="0" width="570">
<tr>
<td>Asset No:<br />
<asp:TextBox ID="TextBox9" runat="server" BackColor="WhiteSmoke"></asp:TextBox>
</td>
<td>Asset Name:<br />
<asp:TextBox ID="TextBox10" Text="Keyboard" runat="server" BackColor="Wheat"></asp:TextBox>
</td>
</tr>
<tr>
<td>Serial Number:<br />
<asp:TextBox ID="TextBox12" runat="server" BackColor="WhiteSmoke"></asp:TextBox>
</td>
<td>Date:<br />
<asp:TextBox ID="TextBox34" runat="server" BackColor="Wheat"></asp:TextBox>
</td>
</tr>
<tr>
<td>Make Model:<br />
<asp:TextBox ID="TextBox35" runat="server" BackColor="WhiteSmoke"></asp:TextBox>
</td>
<td>PO. Number:<br />
<asp:TextBox ID="TextBox36" runat="server" BackColor="WhiteSmoke"></asp:TextBox>
</td>
</tr>
</table>
</div>
<div class="modal-footer">
<asp:Button ID="Button_kybrd" class="btn btn-default" runat="server" OnClick="Button_kybrd_Click" Text="Save" />
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
C#
protected void Button_pc_Click(object sender, EventArgs e)
{
string cs = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
SqlConnection con = new SqlConnection(cs);
SqlCommand cmd = new SqlCommand("INSERT INTO dsktp_pc (empid,asset_no,asset_nm,srl_num,dt,mk_mdl,po_nm) VALUES('" + Label2.Text + "','" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox28.Text + "','" + TextBox4.Text + "','" + TextBox29.Text + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox29.Text = "";
}
protected void Button_aio_Click(object sender, EventArgs e)
{
string cs = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
SqlConnection con = new SqlConnection(cs);
SqlCommand cmd = new SqlCommand("INSERT INTO aio (empid,asset_no,asset_nm,srl_num,dt,mk_mdl,po_nm) VALUES('" + Label5.Text + "','" + TextBox1_aio.Text + "','" + TextBox2_aio.Text + "','" + TextBox3_aio.Text + "','" + TextBox4_aio.Text + "','" + TextBox5_aio.Text + "','" + TextBox6_aio.Text + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
// TextBox5.Text = "";
//TextBox6.Text = "";
//TextBox7.Text = "";
//TextBox8.Text = "";
//TextBox31.Text = "";
//TextBox32.Text = "";
}
protected void Button_kybrd_Click(object sender, EventArgs e)
{
string cs = System.Configuration.ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
SqlConnection con = new SqlConnection(cs);
SqlCommand cmd = new SqlCommand("INSERT INTO kybrd (empid,asset_no,asset_nm,srl_num,dt,mk_mdl,po_nm) VALUES('" + Label6.Text + "','" + TextBox9.Text + "','" + TextBox10.Text + "','" + TextBox12.Text + "','" + TextBox34.Text + "','" + TextBox35.Text + "','" + TextBox36.Text + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
TextBox9.Text = "";
TextBox10.Text = "";
TextBox12.Text = "";
TextBox34.Text = "";
TextBox35.Text = "";
TextBox36.Text = "";
}