sexta-feira, 29 de novembro de 2013

Aplicação Web Mobile Visualização de Moagem Tempo Real



Para visualizar um exemplo de como funciona a aplicação acessem o link


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            font-family: Arial, Helvetica, sans-serif;
            font-size: x-small;
        }
        .style2
        {
            font-family: Arial, Helvetica, sans-serif;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div style="font-size: xx-small">
    
        <span class="style1">Empresa 1 - Nome da Empresa S/A</span><br />
    
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1" 
            style="font-family: Arial, Helvetica, sans-serif; font-size: x-small" 
            AllowSorting="True">
            <Columns>
                <asp:BoundField DataField="CARGAS" HeaderText="Cargas" 
                    SortExpression="CARGAS" />
                <asp:BoundField DataField="TC_ENTREGUE" HeaderText="Total Cana" 
                    SortExpression="TC_ENTREGUE" 
                    DataFormatString="{0:#,##0.00;(#,##0.00);0}" />
                <asp:BoundField DataField="EMPRESA" HeaderText="Emp" 
                    SortExpression="EMPRESA" />
                <asp:BoundField DataField="DT_MOVIMENTO" HeaderText="DT Mov" 
                    SortExpression="DT_MOVIMENTO" DataFormatString="{0:dd/MM/yyyy}" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="select Count(*) as CARGAS, 
       Sum(APT.QT_LIQUIDO) as TC_ENTREGUE,
       APT.CD_UNID_IND as EMPRESA,
       APT.DT_MOVIMENTO       
       from PIMSPRD.APT_CARGAS APT, 
            PIMSPRD.UPNIVEL3 UP3          
            where 0=0
            and  APT.DT_MOVIMENTO BETWEEN TO_DATE(SYSDATE-2,'DD/MM/YYYY')
                                      AND TO_DATE(SYSDATE,'DD/MM/YYYY')
            and UP3.CD_SAFRA = APT.CD_SAFRA 
            and UP3.CD_UPNIVEL1 = APT.CD_UPNIVEL1 
            and UP3.CD_UPNIVEL2 = APT.CD_UPNIVEL2 
            and UP3.CD_UPNIVEL3 = APT.CD_UPNIVEL3  
            and APT.CD_UNID_IND = 1
       group by APT.CD_UNID_IND, APT.DT_MOVIMENTO
       order by 4"></asp:SqlDataSource>
    
        <br class="style2" />
        <span class="style2">Empresa 2 - Nome da Filial S/A<br />
        </span>
        <asp:GridView ID="GridView2" runat="server" AllowSorting="True" 
            AutoGenerateColumns="False" DataSourceID="SqlDataSource2" 
            style="font-family: Arial, Helvetica, sans-serif; font-size: x-small">
            <Columns>
                <asp:BoundField DataField="CARGAS" HeaderText="Cargas" 
                    SortExpression="CARGAS" />
                <asp:BoundField DataField="TC_ENTREGUE" 
                    DataFormatString="{0:#,##0.00;(#,##0.00);0}" HeaderText="Total Cana" 
                    SortExpression="TC_ENTREGUE" />
                <asp:BoundField DataField="EMPRESA" HeaderText="Emp" SortExpression="EMPRESA" />
                <asp:BoundField DataField="DT_MOVIMENTO" DataFormatString="{0:dd/MM/yyyy}" 
                    HeaderText="DT Mov" SortExpression="DT_MOVIMENTO" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="select Count(*) as CARGAS, 
       Sum(APT.QT_LIQUIDO) as TC_ENTREGUE,
       APT.CD_UNID_IND as EMPRESA,
       APT.DT_MOVIMENTO       
       from PIMSPRD.APT_CARGAS APT, 
            PIMSPRD.UPNIVEL3 UP3          
            where 0=0
            and  APT.DT_MOVIMENTO BETWEEN TO_DATE(SYSDATE-2,'DD/MM/YYYY')
                                      AND TO_DATE(SYSDATE,'DD/MM/YYYY')
            and UP3.CD_SAFRA = APT.CD_SAFRA 
            and UP3.CD_UPNIVEL1 = APT.CD_UPNIVEL1 
            and UP3.CD_UPNIVEL2 = APT.CD_UPNIVEL2 
            and UP3.CD_UPNIVEL3 = APT.CD_UPNIVEL3  
            and APT.CD_UNID_IND = 2
       group by APT.CD_UNID_IND, APT.DT_MOVIMENTO
       order by 4"></asp:SqlDataSource>
        <br />
    
    </div>
    </form>
</body>
</html>

Nenhum comentário:

Postar um comentário