<%@ Page Language="C#" MasterPageFile="~/masterpage/MasterPage.master" AutoEventWireup="true"
    CodeFile="MyReports.aspx.cs" Inherits="MyReports" Title="Venus Utility Services"
    EnableEventValidation="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="../css/airwebcss.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style7
        {
            width: 22%;
        }
        .style8
        {
            width: 6%;
        }
    </style>
    <style type="text/css">
        #myaccount td
        {
            background: #ffffff;
            border-bottom: 0px solid #e3e3e3;
            height: 20px;
            line-height: 20px;
            vertical-align: top;
            color: #20201f;
            font-size: 11px;
            padding-left: 0px;
        }
        #myaccount th
        {
            background: #c3d9ff;
            border-bottom: 2px solid #e3e3e3;
            height: 20px;
            line-height: 20px;
            padding-left: 0px;
            text-align: center;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="request">
        <div id="trips">
            <div style="overflow: hidden; width: 900px; height: auto; background: #deefff">
                <div style="float: left; width: 360px !important; overflow: hidden;">
                    <h3>
                        Your Transaction Reports</h3>
                </div>
            </div>
            <div id="clear2">
            </div>
            <div>
                <table>
                    <tr>
                        <td valign="middle" align="left" height="30" class="style6" width="10%" style="border-bottom-width: 0px;
                            padding-left: 15px;">
                            <strong><span>From Date</span></strong>
                        </td>
                        <td valign="middle" align="left" style="border-bottom-width: 0px" width="15%">
                            <asp:TextBox runat="server" ID="txt_from" class="small" Style="width: 160px" />
                            <cc1:CalendarExtender ID="txt_from_CalendarExtender" runat="server" Format="dd/MM/yyyy"
                                TargetControlID="txt_from" PopupButtonID="calnder1">
                            </cc1:CalendarExtender>
                        </td>
                        <td valign="middle" align="left" class="style8" style="border-bottom-width: 0px"
                            width="10%">
                            <img src="../images/cal.gif" width="22" height="24" runat="server" id="calnder1" />
                        </td>
                        <td valign="middle" align="left" style="border-bottom-width: 0px; padding-left: 15px;"
                            width="10%">
                            <strong><span>To Date</span></strong>
                        </td>
                        <td valign="middle" align="left" style="border-bottom-width: 0px" width="15%">
                            <asp:TextBox runat="server" ID="txt_to" class="small" Style="width: 160px" />
                        </td>
                        <td valign="middle" align="left" style="border-bottom-width: 0px" width="10%">
                            <cc1:CalendarExtender ID="CalendarExtenderto" runat="server" Format="dd/MM/yyyy"
                                TargetControlID="txt_to" PopupButtonID="calnder2">
                            </cc1:CalendarExtender>
                            <img src="../images/cal.gif" width="22" height="24" runat="server" id="calnder2" />
                        </td>
                        <td style="border-bottom-width: 0px" width="10%" align="left">
                            <asp:Button runat="server" ID="btn_submit" Text="Submit" class="button active" Style="width: 85px;
                                cursor: pointer" ValidationGroup="lavi" OnClick="btn_submit_Click" />
                        </td>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <td align="center" width="10%">
                            <asp:Button runat="server" ID="btn_dwnlod" Text="Download" class="button active"
                                Style="width: 90px; cursor: pointer" OnClick="btn_dwnlod_Click" />
                        </td>
                    </tr>
                </table>
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txt_to" ID="RequiredFieldValidator2"
                    Display="None" ValidationGroup="lavi" ErrorMessage="Please enter last date of report"
                    InitialValue="dd/MM/yyyy"></asp:RequiredFieldValidator>
                <asp:ScriptManager runat="server" ID="Script1">
                </asp:ScriptManager>
                <asp:GridView runat="server" ID="gridview_userreport" AllowPaging="true" AutoGenerateColumns="false"
                    OnRowCommand="grdview_service_RowCommand" OnPageIndexChanging="gridview_userreport_PageIndexChanging"
                    OnRowCreated="gridview_userreport_RowCreated" EmptyDataText="No Record Found">
                    <RowStyle HorizontalAlign="Center" />
                    <Columns>
                        <asp:TemplateField HeaderText="SL">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblsl" Text=' <%# ((GridViewRow)Container).DataItemIndex+1%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Date">
                            <ItemStyle />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblbookingdate" Text='<%# Eval("Date_of_Transaction","{0:dd-MM-yyyy}") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Time">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblbookingtime" Text='<%# Eval("Date_of_Transaction","{0:hh:mm:ss tt}") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Partner ID">
                            <ItemTemplate>
                                <asp:LinkButton runat="server" ID="lblpartnerRefId" CommandName="details" CommandArgument='<%# Eval("PartnerRef_ID")+","+Eval("LaviType") %>'
                                    Text='<%# Eval("PartnerRef_ID") %>'></asp:LinkButton>
                                <asp:Label runat="server" ID="lbl_partnr" Text='<%# Eval("PartnerRef_ID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Service">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblservice"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Operator">
                            <ItemStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lbloperator"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Passengers">
                            <ItemStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lbl_passenger"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Amount">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblTicket_Price" Text='<%# Eval("Ticket_Price","{0:F2}") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Txn Status">
                            <ItemTemplate>
                                <asp:Label ID="lbltxnstatus" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Action on E-Wallets" Visible="false">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lbl_Action" Text='<%# Eval("Credit_Debit") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="E-Wallet Balance" Visible="false">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lbl_balance" Text='<%# Eval("Wallet_Rest_Amt") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txt_from" ID="RequiredFieldValidator1"
                    Display="None" ValidationGroup="lavi" ErrorMessage="Please enter Start date of report"
                    InitialValue="dd/MM/yyyy"></asp:RequiredFieldValidator>
            </div>
            <div class="cleaner">
            </div>
        </div>
    </div>
</asp:Content>
