<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Admin.Master" CodeBehind="ACProductList.aspx.vb" Inherits="Superbowl.ACProductList" 
    title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
<table width="100%" cellpadding="2">
    <tr>
        <td align="center" class="headings" colspan="4">ACProduct List</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td width="35%">&nbsp;</td>
    </tr>
    <tr>		 
        <td align="right">Rgbc Product :</td>
        <td  align="left"><asp:TextBox ID="txtRGBCProduct" runat="server"></asp:TextBox></td>        
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>		 
        <td align="right">AdCheck Product:</td>
        <td  align="left"><asp:TextBox ID="txtACProduct" runat="server"></asp:TextBox></td>        
        <td align="right"><asp:Button ID="btnSearch" runat="server" Text="Search" /></td>
        <td  align="left"><asp:Button ID="btnExport" runat="server" Text="Export" /></td>
    </tr>
    <tr>		 
        <td align="right">&nbsp;</td>
        <td  align="left">&nbsp;</td>
        <td align="right">&nbsp;</td>
        <td  align="left">&nbsp;</td>
    </tr>
    <tr>		 
        <td align="left" colspan="4" style="border: 1px solid maroon">
			  <asp:GridView ID="gvACProduct" runat="server" Width="100%" CellPadding="2" 
				  AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
				  DataSourceID="sdsACProduct" PageSize="25" HeaderStyle-CssClass="gvHeader">	  	
					<Columns>
						<asp:BoundField DataField="#" HeaderText="#" ReadOnly="True" 
              SortExpression="#" >
						</asp:BoundField>
            <asp:BoundField DataField="refProdCode" HeaderText="RGBC ProdCode" 
              SortExpression="refProdCode"/>
            <asp:BoundField DataField="strLongProdDesc" HeaderText="RGBC Description" 
              SortExpression="strLongProdDesc" 
              NullDisplayText="&lt;div align=center&gt;&lt;img src='redExclamation24.png'/&gt;&lt;/div&gt;"/>
						<asp:HyperLinkField DataNavigateUrlFields="refACProductID" 
              DataTextField="strProduct" 
              Text="AC Product" 
              DataNavigateUrlFormatString="ACProductDetails.aspx?ACPID={0}" />
						<asp:BoundField DataField="refACProductID" HeaderText="AC Product ID" 
							SortExpression="refACProductID" >
						</asp:BoundField>
						<asp:BoundField DataField="strSubCategory" HeaderText="Sub Category" 
							SortExpression="strSubCategory" />
					</Columns>
					<HeaderStyle CssClass="gvHeader" Wrap="False"/>				  
				  <AlternatingRowStyle CssClass="lightergrey" />
				   <PagerSettings PageButtonCount="20" Mode="NumericFirstLast" FirstPageText="<B>&lt;&lt;</B>" LastPageText="<B>&gt;&gt;</B>" />
				  <RowStyle CssClass="gvItem" />		
			  </asp:GridView>
			  <asp:Label ID="lblMessage" CssClass="redBold" runat="server" Text=""></asp:Label>
			  <asp:GridView ID="gvExport" runat="server" 
				  AlternatingRowStyle-CssClass="lightergrey"  HeaderStyle-CssClass="gvHeader" 
						SelectedRowStyle-CssClass="gvItem" CellPadding="0" visible="False" 
				  DataSourceID="sdsACProduct" AutoGenerateColumns="False">
				   <Columns>
            <asp:BoundField DataField="refProdCode" HeaderText="RGBC ProdCode" 
              SortExpression="refProdCode" />						
						<asp:BoundField DataField="refACProductID" HeaderText="AC Product ID" 
               SortExpression="refACProductID" />
						<asp:BoundField DataField="strLongProdDesc" HeaderText="RGBC ProdDesc" 
							SortExpression="strLongProdDesc" />
						<asp:BoundField DataField="strProduct" HeaderText="AC Product" 
							SortExpression="strProduct" >
						</asp:BoundField>
						<asp:BoundField DataField="strSubCategory" HeaderText="Sub Category" 
              SortExpression="strSubCategory" />
					</Columns>
				   <SelectedRowStyle CssClass="gvItem" />
					<HeaderStyle CssClass="gvHeader" />
					<AlternatingRowStyle CssClass="lightergrey" />	  						
			  </asp:GridView>	  		  
		  	
		  </td>
    </tr>
    <tr>		 
        <td align="left"><asp:CheckBox ID="chkResize" runat="server" AutoPostBack="True" CssClass="red" Text="Show 1000" /></td>
        <td  align="left">&nbsp;</td>
        <td align="right">&nbsp;</td>
        <td  align="left">&nbsp;</td>
    </tr>
    <tr>		 
        <td align="right">&nbsp;</td>
        <td  align="left">&nbsp;</td>
        <td align="right">&nbsp;</td>
        <td  align="left">&nbsp;</td>
    </tr>
</table>	  
<asp:SqlDataSource ID="sdsACProduct" runat="server" 
  ConnectionString="<%$ ConnectionStrings:csStockControl %>" 
		
    SelectCommand="SELECT '' AS '#', mapACProduct.refProdCode, CASE WHEN refProdCode = '0' THEN '- Non RGBC Product -' ELSE mstProduct.strLongProdDesc END AS strLongProdDesc, mapACProduct.refACProductID, dwfACLisp.strProduct, dwfACLisp.strSubCategory FROM mapACProduct LEFT OUTER JOIN mstProduct ON mapACProduct.refProdCode = mstProduct.strProdCode RIGHT OUTER JOIN dwfACLisp ON mapACProduct.refACProductID = dwfACLisp.ACProductID GROUP BY dwfACLisp.strProduct, mapACProduct.refACProductID, mapACProduct.refProdCode, mstProduct.strLongProdDesc, dwfACLisp.strSubCategory ORDER BY dwfACLisp.strProduct" 				  >
  <DeleteParameters>
	  <asp:Parameter Name="ACProductID" Type="Int32" />
  </DeleteParameters>		  				  
</asp:SqlDataSource>	
			  
			  <br />		  
			  
</asp:Content>



