<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" DataKeyNames="branch_id" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" style="z-index: 100; left: 271px; position: absolute; top: 367px" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Horizontal">
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="branch_id" HeaderText="Branch Id" SortExpression="branch_id" />
<asp:BoundField DataField="branchAddress" HeaderText="Branch Address" SortExpression="branchAddress" />
<asp:BoundField DataField="Branch_head" HeaderText="Branch Head" SortExpression="Branch_head" />
<asp:BoundField DataField="branch_manpower" HeaderText="Branch Manpower" SortExpression="branch_manpower" />
</Columns>
<FooterStyle BackColor="#CCCC99" ForeColor="Black" />
<SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
<HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:web_trackersConnectionString %>"
SelectCommand="SELECT * FROM [branches]" UpdateCommand="update branches set branch_id=@branch_id, branchAddress=@branchAddress, Branch_head=@Branch_head, Branch_manpower=@Branch_manpower where(branch_id=@branch_id)" DeleteCommand ="delete from branches where branch_id=@branch_id"></asp:SqlDataSource>
</div>
</form>
</body>
</html>
No comments:
Post a Comment