/
ivan
/
ModMas
Обзор
Документация
Войти
/
ivan
/
ModMas
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ModuleMaster/oh/prodloss.aspx
95 строк
6 KB
i.krivokon
Initial commit
13 мар 2026, 13:49
13 мар 2026, 13:49
00d9fb6
Код
Авторство
О чём код?
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="prodloss.aspx.vb" Inherits="oh_prodloss" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>OT Report</title> <link href="../Styles/page.css" rel="stylesheet" /> <link href="../Styles/editableGrid1.css" rel="stylesheet" /> </head> <body> <form id="form1" runat="server"> <div class="center"> Date from : <asp:TextBox runat ="server" ID="datefrom" TextMode="Date" ></asp:TextBox> Date to : <asp:TextBox runat ="server" ID="dateto" TextMode ="Date"></asp:TextBox> <br /> Line: <asp:DropDownList ID="ddlline" runat="server" AppendDataBoundItems="True" AutoPostBack="True" DataSourceID="sdsline" DataTextField="line" DataValueField="line"> <asp:ListItem Value="%">ALL</asp:ListItem> </asp:DropDownList> Model: <asp:TextBox runat="server" ID="model"> </asp:TextBox> Group: <asp:DropDownList ID="ddlGroup" runat ="server" AppendDataBoundItems="True" AutoPostBack="True" DataSourceID="sdsgroup" DataTextField="LOSS_GROUP_REMARK" DataValueField="LOSS_GROUP_REMARK" > <asp:ListItem Value="%">ALL</asp:ListItem> </asp:DropDownList> Dept: <asp:DropDownList ID="ddlDepartment" runat ="server" AppendDataBoundItems="True" AutoPostBack="True" DataSourceID="sdsdepartment" DataTextField="DEPT_TYPE_REMARK" DataValueField="DEPT_TYPE_REMARK" > <asp:ListItem Value="%">ALL</asp:ListItem> </asp:DropDownList> <asp:ImageButton ID="Button1" runat="server" Text="Refresh" ImageUrl="~/Images/Refresh.png" /> </div> <div> <asp:GridView ID="gvReport" runat="server" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" style="margin: auto auto;" AutoGenerateColumns="False" DataSourceID="sdsData" AllowSorting="True" AllowPaging="True" PageSize="100"> <AlternatingRowStyle BackColor="White" /> <Columns> <asp:BoundField DataField="line_nm" HeaderText="Line" SortExpression="line_nm" /> <asp:BoundField DataField="LOSS_DATE" HeaderText="Date" SortExpression="LOSS_DATE" > </asp:BoundField> <asp:BoundField DataField="PLANT_CODE" HeaderText="Pant" SortExpression="PLANT_CODE" /> <asp:BoundField DataField="LOSS_MODEL" HeaderText="Model" SortExpression="LOSS_MODEL" /> <asp:BoundField DataField="LOSS_GROUP_REMARK" HeaderText="Loss group" SortExpression="LOSS_GROUP_REMARK" /> <asp:BoundField DataField="DEPT_TYPE_REMARK" HeaderText="Department" SortExpression="DEPT_TYPE_REMARK" > </asp:BoundField> <asp:BoundField DataField="LOSS_TIME" HeaderText="Loss time" SortExpression="LOSS_TIME" /> <asp:BoundField DataField="LOSS_WK_HR" HeaderText="Loss WH" SortExpression="LOSS_WK_HR" /> <asp:BoundField DataField="LOSS_AMNT" HeaderText="Loss amount" SortExpression="LOSS_AMNT" /> </Columns> <FooterStyle BackColor="#CCCC99" /> <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" /> <RowStyle BackColor="#F7F7DE" /> <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" /> <SortedAscendingCellStyle BackColor="#FBFBF2" /> <SortedAscendingHeaderStyle BackColor="#848384" /> <SortedDescendingCellStyle BackColor="#EAEAD3" /> <SortedDescendingHeaderStyle BackColor="#575357" /> </asp:GridView> <asp:SqlDataSource ID="sdsData" runat="server" ConnectionString="<%$ ConnectionStrings:ModMas %>" SelectCommand="SELECT LINE.line_nm, loss.* FROM GMESData.[dbo].[TB_VW_BI_LOSS_H] loss left join GMESData.dbo.TB_TBM_MD_LINE line on loss.SHOP_CODE = line.LINE_CODE WHERE loss.loss_date between @datefrom and @dateto and line.line_nm like '%' + @line + '%' and loss.LOSS_MODEL like '%' + @model + '%' and loss.LOSS_GROUP_REMARK like '%' + @material + '%' and loss.DEPT_TYPE_REMARK like '%' + @department + '%' "> <SelectParameters> <asp:ControlParameter ControlID="datefrom" Name="datefrom" PropertyName="Text" /> <asp:ControlParameter ControlID="dateto" Name="dateto" PropertyName="Text" /> <asp:ControlParameter ControlID="ddlline" DefaultValue="%" Name="line" PropertyName="SelectedValue" /> <asp:ControlParameter ControlID="model" DefaultValue="%" Name="model" PropertyName="Text" /> <asp:ControlParameter ControlID="model" DefaultValue="%" Name="material" PropertyName="Text" /> <asp:ControlParameter ControlID="ddlDepartment" DefaultValue="%" Name="department" PropertyName="SelectedValue" /> </SelectParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="sdsline" runat="server" ConnectionString="<%$ ConnectionStrings:ModMas %>" SelectCommand=" select line from UserModules.[user].CATV_LINE_LIST where active = 'Y'"></asp:SqlDataSource> <asp:SqlDataSource ID="sdsgroup" runat="server" ConnectionString="<%$ ConnectionStrings:ModMas %>" SelectCommand=" select distinct LOSS_GROUP_REMARK from GMESData.[dbo].[TB_VW_BI_LOSS_H] where LOSS_GROUP_REMARK is not NULL"></asp:SqlDataSource> <asp:SqlDataSource ID="sdsdepartment" runat="server" ConnectionString="<%$ ConnectionStrings:ModMas %>" SelectCommand=" select distinct DEPT_TYPE_REMARK from GMESData.[dbo].[TB_VW_BI_LOSS_H] where DEPT_TYPE_REMARK is not NULL"></asp:SqlDataSource> </div> </form> </body> </html>