<%@ Register TagPrefix="ibn" TagName="BlockHeader" src="..\Modules\BlockHeader.ascx" %>
<%@ Page language="c#" Codebehind="AddCategory.aspx.cs" AutoEventWireup="false" Inherits="Mediachase.UI.Web.Common.AddCategory" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD id="pT_headTag">
		<title id="pageTitle" runat="server"></title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<script src="../Scripts/browser.js"></script>
		<script src="../Scripts/buttons.js"></script>
		<LINK href="../layouts/styles/windows.css" type="text/css" rel="stylesheet">
		<link href="../Themes/<%=Mediachase.UI.Web.Util.CommonHelper.GetTheme()%>/theme.css" rel="stylesheet">
		<link href="../Themes/<%=Mediachase.UI.Web.Util.CommonHelper.GetTheme()%>/color1.css" rel="stylesheet">
		<script><!--
		if ((browseris.mac) && !browseris.ie5up)
		{
			var macstyle = "../layouts/styles/mac.css";
			document.write("<link rel='stylesheet' Type='text/css' href='" + macstyle + "'>");
		}
	
		//--></script>
		<script language="JavaScript"> 
			function disableEnterKey() 
			{ 
				try {
					if (window.event.keyCode == 13 && window.event.srcElement.type != "textarea")
						window.event.keyCode = 0;
				}
				catch (e) {}
			} 
		</script>
	</HEAD>
	<body class="UserBackground" id="pT_body" leftMargin="0" topMargin="0" marginwidth="0" marginheight="0">
		<form id="frmMain" runat="server">
			<ibn:blockheader id="secHeader" title="" runat="server"></ibn:blockheader>
			<table class="text" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<tr>
					<td><asp:Button CssClass="text" ID="btnAddNewItem" Runat="server" CausesValidation="False" style="DISPLAY:none"></asp:Button>
					<asp:Label Runat="server" ID="lblError" CssClass="ibn-error"></asp:Label>
					<div style="height:320px;overflow:-moz-scrollbars-vertical;overflow-y:auto">
						<asp:DataGrid id="dgDic" runat="server" cellpadding="1" gridlines="Horizontal" borderwidth="0" autogeneratecolumns="False" width="100%" allowsorting="False">
							<ItemStyle Height="21px"></ItemStyle>
							<Columns>
								<asp:BoundColumn Visible="False" DataField="ItemId" ReadOnly="True"></asp:BoundColumn>
								<asp:TemplateColumn>
									<HeaderStyle CssClass="ibn-vh2"></HeaderStyle>
									<ItemStyle CssClass="ibn-vb2"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem,"ItemName") %>
									</ItemTemplate>
									<EditItemTemplate>
										<asp:TextBox ID="tbName" Text='<%# DataBinder.Eval(Container.DataItem,"ItemName") %>' CssClass="text" Width="100%" Runat="server">
										</asp:TextBox>
										<asp:RequiredFieldValidator ID="rfName" ControlToValidate="tbName" ErrorMessage='<%#LocRM.GetString("Required") %>' Display="Dynamic" Runat="server"/>
									</EditItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn>
									<headerstyle cssclass="ibn-vh2" Width="80"></headerstyle>
									<itemstyle cssclass="ibn-vb2" Width="80"></itemstyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem,"Weight") %>
									</ItemTemplate>
									<EditItemTemplate>
										<asp:TextBox ID="tbWeight" Text='<%# DataBinder.Eval(Container.DataItem,"Weight") %>' CssClass="text" Width="60px" Runat="server"></asp:TextBox>
										<asp:RangeValidator ID="rvWeight" ErrorMessage="*" CssClass="text" Runat=server ControlToValidate="tbWeight" Display=Dynamic MinimumValue="0" MaximumValue="1000" Type=Integer></asp:RangeValidator>
									</EditItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn>
									<headerstyle cssclass="ibn-vh2" Width="50"></headerstyle>
									<itemstyle cssclass="ibn-vb2" Width="50"></itemstyle>
									<itemtemplate>
										<asp:imagebutton id="ibMove" runat="server" borderwidth="0" title='<%# LocRM.GetString("Edit")%>' imageurl="../layouts/images/Edit.gif" commandname="Edit" causesvalidation="False">
										</asp:imagebutton>
										&nbsp;&nbsp;
										<asp:imagebutton id="ibDelete" runat="server" borderwidth="0" title='<%# LocRM.GetString("Delete")%>' imageurl="../layouts/images/Delete.gif" commandname="Delete" causesvalidation="False" Visible='<%# GetVisibleStatus(DataBinder.Eval(Container.DataItem,"CanDelete")) %>' >
										</asp:imagebutton>
									</itemtemplate>
									<EditItemTemplate>
										<asp:imagebutton id="Imagebutton1" runat="server" borderwidth="0" title='<%# LocRM.GetString("Save")%>' imageurl="../layouts/images/Saveitem.gif" commandname="Update" causesvalidation="True">
										</asp:imagebutton>
										&nbsp;&nbsp;
										<asp:imagebutton id="Imagebutton2" runat="server" borderwidth="0" imageurl="../layouts/images/cancel.gif" title='<%# LocRM.GetString("Cancel")%>' commandname="Cancel" causesvalidation="False">
										</asp:imagebutton>
									</EditItemTemplate>
								</asp:TemplateColumn>
							</Columns>
						</asp:DataGrid></div>
						<button id="btnSave" runat="server" type="button" style="visibility:hidden"></button>
					</td>
				</tr>
			</table>
			<script language=javascript>
				function FuncSave()
				{
					DisableButtons(document.forms[0].<%=btnSave.ClientID%>);
					<%=Page.GetPostBackClientEvent(btnSave,"") %>;
				}
			</script>
		</form>
	</body>
</HTML>
