<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BunkDetail.aspx.cs" Inherits="NKC_WF.BunkDetail" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title></title>
</head>
<body>
  <form id="form1" runat="server">
    <div>
      <asp:HiddenField ID="hfStackID" runat="server" />
      <asp:GridView runat="server" ID="grView" AutoGenerateColumns="False" DataKeyNames="SheetID" DataSourceID="ods" AllowSorting="false">
        <EmptyDataTemplate>
          No Record
        </EmptyDataTemplate>
        <Columns>
          <asp:BoundField DataField="StackId" HeaderText="Bunk" ReadOnly="True" />
          <asp:BoundField DataField="SheetIndex" HeaderText="Num" ReadOnly="True" />
          <asp:BoundField DataField="SheetId" HeaderText="Id" ReadOnly="True" />
          <asp:BoundField DataField="MatExtCode" HeaderText="MatExtCode" ReadOnly="True" />
          <asp:BoundField DataField="MatDesc" HeaderText="MatDesc" ReadOnly="True" />
          <asp:TemplateField HeaderText="Estim (min:sec)" SortExpression="WrkTimeEst">
            <ItemTemplate>
              <asp:Label ID="lblWrkTimeEst" runat="server" Text='<%# formatMinSec(Eval("WrkTimeEst", "{0:N0}")) %>'></asp:Label>
            </ItemTemplate>
          </asp:TemplateField>
          <asp:TemplateField HeaderText="CNC File" SortExpression="WrkTimeEst">
            <ItemTemplate>
              <asp:Label ID="lblCncFilePath" runat="server" Text='<%# fixFilePath(Eval("CncFilePath")) %>'></asp:Label>
            </ItemTemplate>
          </asp:TemplateField>
          <asp:TemplateField HeaderText="Draw File" SortExpression="WrkTimeEst">
            <ItemTemplate>
              <asp:Label ID="lblDrawFilePath" runat="server" Text='<%# fixFilePath(Eval("DrawFilePath")) %>'></asp:Label>
            </ItemTemplate>
          </asp:TemplateField>
        </Columns>
      </asp:GridView>
      <asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByStack" TypeName="AppData.DS_AppTableAdapters.SheetListTableAdapter">
        <SelectParameters>
          <asp:ControlParameter ControlID="hfStackID" DefaultValue="0" Name="StackID" PropertyName="Value" Type="Int32" />
        </SelectParameters>
      </asp:ObjectDataSource>
    </div>
  </form>
</body>
</html>
