<%@ Page language="c#" Codebehind="StockMaster.aspx.cs" AutoEventWireup="false" Inherits="Chapter30.StockMaster" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript (ECMAScript)" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	</HEAD>
	<body bgColor="#99cc99" MS_POSITIONING="GridLayout">
		<form id="StockMaster" method="post" runat="server">
			<asp:datagrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 14px; POSITION: absolute; TOP: 73px" runat="server" DataSource="<%# dsStock1 %>" BorderStyle="None" GridLines="Vertical" BorderWidth="1px" BorderColor="#DEDFDE" BackColor="White" CellPadding="4" ForeColor="Black" DataKeyField="code_value" DataMember="stock_master" OnDeleteCommand="Grid1_Delete" OnUpdateCommand="Grid1_Update" OnCancelCommand="Grid1_Cancel" OnEditCommand="Grid1_Edit" AutoGenerateColumns="False" Width="522px" Height="164px">
<FooterStyle BackColor="#CCCC99"></FooterStyle>

<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#6B696B"></HeaderStyle>

<PagerStyle HorizontalAlign="Right" ForeColor="Black" BackColor="#F7F7DE" Mode="NumericPages"></PagerStyle>

<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#CE5D5A"></SelectedItemStyle>

<AlternatingItemStyle BackColor="White"></AlternatingItemStyle>

<ItemStyle BackColor="#F7F7DE"></ItemStyle>

<Columns>
					<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="更新" CancelText="取消" EditText="编辑"></asp:EditCommandColumn>
					<asp:ButtonColumn Text="Delete" CommandName="Delete"></asp:ButtonColumn>
					<asp:BoundColumn DataField="code_value" SortExpression="code_value" ReadOnly="True" HeaderText="code_value"></asp:BoundColumn>
					<asp:TemplateColumn HeaderText="code_display">
						<ItemTemplate>
							<asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.code_display") %>'></asp:Label>
						</ItemTemplate>
						<EditItemTemplate>
							<asp:TextBox ID="editCode_Display" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.code_display") %>'></asp:TextBox>
						</EditItemTemplate>
					</asp:TemplateColumn>
					<asp:TemplateColumn HeaderText="rate">
						<ItemTemplate>
							<asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.rate") %>'></asp:Label>
						</ItemTemplate>
						<EditItemTemplate>
							<asp:TextBox id="editRate" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.rate") %>'></asp:TextBox>
						</EditItemTemplate>
					</asp:TemplateColumn>
					<asp:TemplateColumn HeaderText="uom">
						<ItemTemplate>
							<asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.uom") %>'></asp:Label>
						</ItemTemplate>
						<EditItemTemplate>
							<asp:TextBox id="editUom" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.uom") %>'></asp:TextBox>
						</EditItemTemplate>
					</asp:TemplateColumn>
					<asp:BoundColumn DataField="closing" ReadOnly="True" HeaderText="closing"></asp:BoundColumn>
					<asp:TemplateColumn HeaderText="opening">
						<ItemTemplate>
							<asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.opening") %>'></asp:Label>
						</ItemTemplate>
						<EditItemTemplate>
							<asp:TextBox ID="editOpening" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.opening") %>'></asp:TextBox>
						</EditItemTemplate>
					</asp:TemplateColumn>
				</Columns>
</asp:datagrid>
			<asp:label id="Label1" style="Z-INDEX: 102; LEFT: 132px; POSITION: absolute; TOP: 13px" runat="server" Font-Bold="True" Width="233px" Height="26px" Font-Size="Large">Stock Master Records</asp:label>
			<asp:label id="messages" style="Z-INDEX: 103; LEFT: 19px; POSITION: absolute; TOP: 442px" runat="server" Width="447px" Height="50px"></asp:label>
			<asp:LinkButton id="Add" style="Z-INDEX: 104; LEFT: 37px; POSITION: absolute; TOP: 41px" runat="server" ToolTip="Adds a new inventory master">添加一个新记录</asp:LinkButton>
			<asp:Panel id="AddPanel" style="Z-INDEX: 105; LEFT: 567px; POSITION: absolute; TOP: 75px" runat="server" Width="289px" Height="143px" Visible="False" BorderStyle="Solid" BorderColor="Gainsboro" BackColor="Transparent" ForeColor="Transparent">
				<asp:Label id="label2" runat="server" Height="19px" Width="94px" BackColor="Transparent">Acct Name:</asp:Label>
				<asp:TextBox id="AddCode_Display" runat="server" Height="24px" Width="160px"></asp:TextBox>
				<asp:Label id="Label3" runat="server" Height="19px" Width="95px">Rate :   </asp:Label>
				<asp:TextBox id="AddRate" runat="server" Height="24px" Width="160px"></asp:TextBox>
				<asp:Label id="Label4" runat="server" Height="19px" Width="96px">UOM : </asp:Label>
				<asp:TextBox id="AddUom" runat="server" Height="24px" Width="160px"></asp:TextBox>
				<asp:Label id="Label5" runat="server" Height="19px" Width="96px">Opening : </asp:Label>
				<asp:TextBox id="AddClosing" runat="server" Height="26px" Width="160px"></asp:TextBox>
				<asp:Label id="Label6" runat="server" Height="19px" Width="131px"></asp:Label>
				<asp:Button id="SaveNew" runat="server" Height="24px" Width="79px" Text="Save"></asp:Button>
			</asp:Panel>
			<asp:TextBox id="TextBox1" style="Z-INDEX: 106; LEFT: -32000px; POSITION: absolute; TOP: -32000px" runat="server"></asp:TextBox>
		</form>
	</body>
</HTML>
