<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Admin.Master" CodeBehind="ProductDetails.aspx.vb" Inherits="Superbowl.ProductDetails" 
    title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"><script language="javascript" type="text/javascript">
<!--
	function FormValidate()
	{
		msg = ""
		f = document.aspnetForm;
		
		if(f.ctl00$body$txtProdCode.value == "")
			msg += "- Product Code\n";							
		if(f.ctl00$body$strType.value == "")
			msg += "- Product Type\n";
		if(f.ctl00$body$strLongProdDesc.value == "")
			msg += "- Long Product Description\n";
		if(f.ctl00$body$strProductDesc.value == "")
			msg += "- Product Description\n"; 
		if(f.ctl00$body$ddlBrand.value == 0)
			msg += "- Brand\n"; 
		if(isNaN(f.ctl00$body$intPack.value) || f.ctl00$body$intPack.value == "0")
			msg += "- Pack Size\n";				
		if(isNaN(f.ctl00$body$intSize.value) || f.ctl00$body$intSize.value == "0")
			msg += "- Size\n";		
		if(isNaN(f.ctl00$body$dblFlat.value) || f.ctl00$body$dblFlat.value == "0")
			msg += "- Conversion to Flat Cases\n";
		if(f.ctl00$body$ddlDisplayOrder.value == 0)
			msg += "- Display Order\n";
		if(msg.length > 0){
			alert("Please enter the following values:\n" + msg);
			return false;
		}
		else
		{
			return true;
		}
	}
-->
</script>
	<style type="text/css">
		.cssTxt1
		{
			width: 60px;
			text-align:right;
		}
		.cssDDL1
		{
			width: 160px;
		}
		.cssDDL2
		{
			width: 240px;
		}
      .auto-style1 {
         height: 28px;
      }
      .auto-style2 {
         height: 18px;
      }
        .auto-style3 {
            height: 26px;
        }
   </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
    <table width="100%" border="0" >
 <tr>
     <td align="center" class="headings" colspan="3">Product Details</td>
 </tr>
 <tr valign="top" >         
   <td align="left" nowrap valign="top">
        <table  cellpadding="2" width="100%" border="0">
				<tr 'null tr, controls the width'><td width="40%"></td><td></td></tr> 
				<tr >
					<td align="right">Product Code:</td>
					<td align="left" nowrap ><asp:TextBox ID="txtProdCode" runat="server" MaxLength="6" 
							AutoPostBack="True"></asp:TextBox><X>*</X></td></tr>
				<tr>
				  <td align="right" >Long Product Description [SOULD BE THE SAME FOR THE S AND F 
            TYPES]:</td>
				  <td align="left" nowrap ><asp:TextBox ID="strLongProdDesc" runat="server" 
						  CssClass="cssDDL2" MaxLength="80"></asp:TextBox><X>*</X></td></tr>
				<tr>
				  <td align="right" >Product Description:</td>
				  <td align="left" nowrap >
					  <asp:TextBox ID="strProductDesc" runat="server" 
						  CssClass="cssDDL2" MaxLength="80"></asp:TextBox><X>*</X></td></tr>
				<tr>		 	
					<td align="right" >Brand:</td>
					<td align="left" nowrap ><asp:DropDownList ID="ddlBrand" runat="server" 
							DataSourceID="sdsBrand" CssClass="cssDDL2" DataTextField="strBrand" 
							DataValueField="BrandID"></asp:DropDownList><X>*</X></td></tr>	
				<tr>
					<td align="right">Package:</td>
					<td align="left" nowrap ><asp:TextBox ID="intPack" runat="server" MaxLength="4" 
							CssClass="cssTxt1">1</asp:TextBox><X>*</X></td></tr>		
				<tr>
					<td align="right">Size (<font class="red" size="1">ml</font>):</td>
					<td align="left" nowrap ><asp:TextBox ID="intSize" runat="server" CssClass="cssTxt1" 
						  MaxLength="5" Text="0"></asp:TextBox><X>*</X></td></tr>																					
				<tr>
					<td align="right">Flat Case Conversion:</td>
					<td align="left" nowrap >
						<asp:TextBox ID="dblFlat" runat="server" CssClass="cssTxt1" 
						MaxLength="8" AutoPostBack="True">0</asp:TextBox><X>*</X></td></tr>
				<tr>
					<td align="right">Price:</td>
					<td align="left" nowrap ><asp:TextBox ID="dblPrice" runat="server" MaxLength="7" CssClass="cssTxt1" Text="0">0</asp:TextBox></td></tr>			   
				<tr>
				  <td align="right" class="auto-style3" >Category: </td>
				  <td valign="top" class="auto-style3"><asp:TextBox ID="strCategory" runat="server" MaxLength="50" CssClass="cssDDL2"></asp:TextBox></td></tr>	
				<tr>
				  <td align="right" class="auto-style3" >Category 2:</td>
				  <td valign="top" class="auto-style3"><asp:TextBox ID="strCategory2" runat="server" MaxLength="50" CssClass="cssDDL2"></asp:TextBox></td></tr>	
				<tr>
				  <td align="right" >Brand Varietal:</td>
				  <td valign="top"><asp:TextBox ID="strBrandVarietal" runat="server" MaxLength="50" CssClass="cssDDL2"></asp:TextBox></td></tr>	
				<tr>
				  <td align="right" >Display Order:</td>
				  <td valign="top"><asp:DropDownList ID="ddlDisplayOrder" runat="server"></asp:DropDownList></td></tr>  									  	
				<tr>
				  <td align="right" >&nbsp;</td>
				  <td valign="top">&nbsp;</td></tr>
        </table></td>																		   
    <td align="left" nowrap valign="top" width="45%">
        <table cellpadding="2" width="100%" border="0">
				<tr 'null tr, controls the width'><td width="40%"></td><td></td></tr>
				<tr>
				  <td align="right">Type:</td>
				  <td align="left" nowrap >
					  <asp:TextBox ID="strType" runat="server" MaxLength="1" CssClass="cssTxt1"></asp:TextBox><X>*</X></td></tr>
				<tr>
				  <td align="right">Type 2:</td>
				  <td align="left" nowrap ><asp:TextBox ID="strType2" runat="server" MaxLength="12"></asp:TextBox></td></tr>
				<tr>
					<td align="right">Short Code:</td>
					<td align="left" nowrap ><asp:TextBox ID="intShortCode" runat="server" MaxLength="5" 
							CssClass="cssTxt1"></asp:TextBox></td></tr>
				<tr>
				  <td align="right">Price Segment:</td>
				  <td align="left" nowrap ><asp:TextBox ID="strPriceSeg" runat="server" MaxLength="50" CssClass="cssDDL2"></asp:TextBox></td></tr>
				<tr>
				  <td align="right">cwsicat:</td>
				  <td align="left" nowrap ><asp:TextBox ID="cwsicat" runat="server" MaxLength="20"></asp:TextBox></td></tr>	
				<tr>
				  <td align="right">Pricipal Material Ref Number:</td>
				  <td align="left" nowrap > <asp:TextBox ID="strPrincipalMaterialRefNum" runat="server" MaxLength="10"></asp:TextBox></td></tr>	
				<tr>
				  <td align="right" >Principal Product Description:</td>
				  <td align="left" nowrap ><asp:TextBox ID="strPrincipalProdDesc" runat="server" MaxLength="80" CssClass="cssDDL2"
						  TextMode="MultiLine" Rows="3" ></asp:TextBox></td></tr>		
				<tr>
				  <td align="right">Bottle Barcode:</td>
				  <td align="left" nowrap ><asp:TextBox ID="strBottleBarcode" runat="server" MaxLength="15"></asp:TextBox></td></tr>
				<tr>
				  <td align="right">Case Barcode:</td>
				  <td align="left" nowrap ><asp:TextBox ID="strCaseBarcode" runat="server" MaxLength="15"></asp:TextBox></td></tr>
				<tr>
				  <td align="right">Giftbox Barcode:</td>
				  <td align="left" nowrap ><asp:TextBox ID="strGiftboxBarcode" runat="server" 
						  MaxLength="15"></asp:TextBox></td></tr> 
				<tr>
				  <td align="right" >Active:</td>
				  <td valign="top"><asp:CheckBox ID="chkActive" runat="server" Checked="True" /></td></tr>
				<tr>
				  <td align="right" >QF:</td>
				  <td valign="top">
                 <asp:CheckBox ID="chkQF" runat="server" />
&nbsp;(Should this product be part of the Brand-QF?)</td></tr>
			</table>
	</td>
    <td align="left" nowrap width="5%">&nbsp;</td>
 </tr>
 <tr>
     <td align="center" colspan="3" class="auto-style2">
		  <asp:Label ID="lblMessage" runat="server" Font-Italic="True" Font-Bold="True" 
			  CssClass="red" Width="60%"></asp:Label>&nbsp;</td>
 </tr>
 <tr>
   <td align="center" colspan="3" class="auto-style1"><asp:Button ID="btnSave" runat="server" Text="Save" OnClientClick="return FormValidate()" />&nbsp;<asp:Button ID="btnClose" runat="server" Text="Cancel" /></td>
 </tr>
 <tr>
   <td align="center" colspan="3">&nbsp;</td>
 </tr>
 <tr>
   <td align="center" colspan="3">Last Edit: <asp:Label ID="lblLastEdit" runat="server" Text="New" Font-Italic="True"></asp:Label></td>
 </tr>
</table>

<asp:SqlDataSource ID="sdsBrand" runat="server" 
		ConnectionString="<%$ ConnectionStrings:csStockControl %>" 		
		
		SelectCommand="SELECT 0 AS BrandID, '- Select -' AS strBrand, 1 AS blnActive 
													UNION SELECT [BrandID], [strBrand], [blnActive] FROM [mstBrand] WHERE (([blnActive] = @blnActive) OR ([BrandID] = @BrandID)) ORDER BY [strBrand]">
	<SelectParameters>
		<asp:Parameter DefaultValue="True" Name="blnActive" Type="Boolean" />
		<asp:Parameter DefaultValue="0" Name="BrandID" 	Type="Int32" />
	</SelectParameters>
	</asp:SqlDataSource>
</asp:Content>
