<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Administration.Modules.OrderDetailsControl"
    CodeBehind="OrderDetails.ascx.cs" %>
<%@ Register TagPrefix="nopCommerce" TagName="ToolTipLabel" Src="ToolTipLabelControl.ascx" %>
<div class="section-header">
    <div class="title">
        <img src="Common/ico-sales.png" alt="" />
        Order Details <a href="Orders.aspx" title="Back to orders list">(back to orders list)</a>
    </div>
    <div class="options">
        <asp:Button ID="DeleteButton" runat="server" CssClass="adminButtonBlue" Text="Delete"
            OnClick="DeleteButton_Click" CausesValidation="false" ToolTip="Delete order" />
    </div>
</div>
<ajaxToolkit:TabContainer runat="server" ID="OrderTabs" ActiveTabIndex="0">
    <ajaxToolkit:TabPanel runat="server" ID="pnlOrderInfo" HeaderText="Order Info">
        <ContentTemplate>
            <table class="adminContent">
                <tr>
                    <td class="adminTitle">
                        <strong>
                            <nopCommerce:ToolTipLabel runat="server" ID="lblOrderStatusTitle" Text="Order Status:"
                                ToolTip="The status of this order." ToolTipImage="~/Administration/Common/ico-help.gif" />
                        </strong>
                    </td>
                    <td class="adminData">
                        <b>
                            <asp:Label ID="lblOrderStatus" runat="server"></asp:Label></b>&nbsp;
                        <asp:Button ID="CancelOrderButton" runat="server" CssClass="adminButton" Text="Cancel order"
                            OnClick="CancelOrderButton_Click" CausesValidation="false"></asp:Button>
                        <ajaxToolkit:ConfirmButtonExtender ID="ConfirmCancelOrderButtonExtender" runat="server"
                            TargetControlID="CancelOrderButton" DisplayModalPopupID="ModalPopupExtenderCancelOrder" />
                        <br />
                        <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtenderCancelOrder" runat="server"
                            TargetControlID="CancelOrderButton" PopupControlID="pnlCancelOrderPopup" OkControlID="cancelOrderButtonOk"
                            CancelControlID="cancelOrderButtonCancel" BackgroundCssClass="modalBackground" />
                        <asp:Panel ID="pnlCancelOrderPopup" runat="server" Style="display: none; width: 250px;
                            background-color: White; border-width: 2px; border-color: Black; border-style: solid;
                            padding: 20px;">
                            <div style="text-align: center;">
                                Are you sure?
                                <br />
                                <br />
                                <asp:Button ID="cancelOrderButtonOk" runat="server" Text="OK" CssClass="adminButton"
                                    CausesValidation="false" />
                                <asp:Button ID="cancelOrderButtonCancel" runat="server" Text="Cancel" CssClass="adminButton"
                                    CausesValidation="false" />
                            </div>
                        </asp:Panel>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblOrderIDTitle" Text="Order ID:" ToolTip="The unique ID of this order."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblOrderID" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblOrderGUIDTitle" Text="Order GUID:"
                            ToolTip="Internal reference for order." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblOrderGUID" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr class="adminGroup">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblCustomerTitle" Text="Customer:" ToolTip="The name of the customer who placed this order."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblCustomer" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr runat="server" id="divAffiliate">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblAffiliateTitle" Text="Affiliate:"
                            ToolTip="The name of the affiliate who reffered the customer." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblAffiliate" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblOrderDiscountTitle" Text="Order discount:"
                            ToolTip="The total discount applied to this order. Manage your discounts from Promotions : Discounts"
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblOrderDiscount" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr runat="server" id="pnlOrderSubtotalInclTax">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblOrderSubtotalInclTaxTitle" Text="Order subtotal (incl tax):"
                            ToolTip="The subtotal of this order (including tax)." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblOrderSubtotalInclTax" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr runat="server" id="pnlOrderSubtotalExclTax">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblOrderSubtotalExclTaxTitle" Text="Order subtotal (excl tax):"
                            ToolTip="The subtotal of this order (excluding tax)." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblOrderSubtotalExclTax" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr runat="server" id="pnlOrderShippingInclTax">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblOrderShippingInclTaxTitle" Text="Order shipping (incl tax):"
                            ToolTip="The total shipping cost for this order (including tax)." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblOrderShippingInclTax" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr runat="server" id="pnlOrderShippingExclTax">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblOrderShippingExclTaxTitle" Text="Order shipping (excl tax):"
                            ToolTip="The total shipping cost for this order (excluding tax)." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblOrderShippingExclTax" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr runat="server" id="pnlPaymentMethodAdditionalFeeInclTax">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblPaymentMethodAdditionalFeeInclTaxTitle"
                            Text="Payment method additional fee (incl tax):" ToolTip="The payment method additional fee for this order (including tax)."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblPaymentMethodAdditionalFeeInclTax" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr runat="server" id="pnlPaymentMethodAdditionalFeeExclTax">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblPaymentMethodAdditionalFeeExclTaxTitle"
                            Text="Payment method additional fee (excl tax):" ToolTip="The payment method additional fee for this order (excluding tax)."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblPaymentMethodAdditionalFeeExclTax" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblOrderTaxTitle" Text="Order tax:"
                            ToolTip="Total tax applied to this order. Manage your tax settings from Configuration : Tax"
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblOrderTax" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblOrderTotalTitle" Text="Order total:"
                            ToolTip="The total cost of this order (includes discounts, shipping and tax)."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblOrderTotal" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblOrderWeightTitle" Text="Order weight:"
                            ToolTip="The total weight of this order. You can set the weights for individual product variants in Catalog : Products : Manage Products. To manage weight units go to Configuration : Global Settings"
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblOrderWeight" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr class="adminGroup">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblCartTypeTitle" Text="Card type:"
                            ToolTip="The type of card used in the transaction. You can manage credit card details from Configuration : Payment : Credit Cards"
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblCardType" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblCardNameTitle" Text="Card name:"
                            ToolTip="The name on the card used in the transaction." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblCardName" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblCardNumberTitle" Text="Card number:"
                            ToolTip="The number of the card used in the transaction." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblCardNumber" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblCardCVV2Title" Text="Card CVV2:"
                            ToolTip="The card security code of the card used in the transaction." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblCardCVV2" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblCardExpiryTItle" Text="Card expiry month:"
                            ToolTip="The expiry month of the card used in the transaction." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblCardExpirationMonth" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblCardExpiryYear" Text="Card expiry year:"
                            ToolTip="The expiry year of the card used in the transaction." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblCardExpirationYear" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblPONumberTitle" Text="Purchase order number:"
                            ToolTip="The customer's purchase order number when using the Purchase Order payment method. You can manage payment methods from Configuration : Payment : Payment Methods"
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblPONumber" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblPaymentMethodTitle" Text="Payment method:"
                            ToolTip="The payment method used for this transaction. You can manage Payment Methods from Configuration : Payment : Payment Methods"
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblPaymentMethodName" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblPaymentStatusTitle" Text="Payment status:"
                            ToolTip="The status of the payment." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label runat="server" ID="lblPaymentStatus"></asp:Label>&nbsp;
                        <asp:Button ID="btnCapture" CssClass="adminButton" runat="server" Text="Capture"
                            OnClick="btnCapture_Click" ToolTip="Capture this payment" />&nbsp;
                        <asp:Button ID="btnMarkAsPaid" CssClass="adminButton" runat="server" Text="Mark as paid"
                            OnClick="btnMarkAsPaid_Click" ToolTip="Mark the payment status of this order as 'Paid'" />
                        <div style="color: red">
                            <b>
                                <asp:Label runat="server" ID="lblCaptureError" EnableViewState="false"></asp:Label>
                            </b>
                        </div>
                    </td>
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblOrderCreatedOnTitle" Text="Created on:"
                            ToolTip="The date/time the order was placed/created." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblCreatedOn" runat="server"></asp:Label>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </ajaxToolkit:TabPanel>
    <ajaxToolkit:TabPanel runat="server" ID="pnlOrderBillingInfo" HeaderText="Billing Info">
        <ContentTemplate>
            <table class="adminContent">
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblBillingAddress" Text="Billing address:"
                            ToolTip="The customer's billing address." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <div>
                            <div style="font-weight: bold">
                                <asp:Literal ID="lBillingFirstName" runat="server"></asp:Literal>
                                <asp:Literal ID="lBillingLastName" runat="server"></asp:Literal>
                            </div>
                            <div>
                                Email:
                                <asp:Literal ID="lBillingEmail" runat="server"></asp:Literal></div>
                            <div>
                                Phone:
                                <asp:Literal ID="lBillingPhoneNumber" runat="server"></asp:Literal></div>
                            <div>
                                Fax:
                                <asp:Literal ID="lBillingFaxNumber" runat="server"></asp:Literal></div>
                            <asp:Panel ID="pnlBillingCompany" runat="server">
                                <asp:Literal ID="lBillingCompany" runat="server"></asp:Literal></asp:Panel>
                            <div>
                                <asp:Literal ID="lBillingAddress1" runat="server"></asp:Literal></div>
                            <asp:Panel ID="pnlBillingAddress2" runat="server">
                                <asp:Literal ID="lBillingAddress2" runat="server"></asp:Literal></asp:Panel>
                            <div>
                                <asp:Literal ID="lBillingCity" runat="server"></asp:Literal>,
                                <asp:Literal ID="lBillingStateProvince" runat="server"></asp:Literal>
                                <asp:Literal ID="lBillingZipPostalCode" runat="server"></asp:Literal></div>
                            <asp:Panel ID="pnlBillingCountry" runat="server">
                                <asp:Literal ID="lBillingCountry" runat="server"></asp:Literal></asp:Panel>
                        </div>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </ajaxToolkit:TabPanel>
    <ajaxToolkit:TabPanel runat="server" ID="pnlOrderShippingInfo" HeaderText="Shipping Info">
        <ContentTemplate>
            <table class="adminContent">
                <tr runat="server" id="divShippingNotRequired" visible="false">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblShippingInfo" Text="Shipping info:"
                            ToolTip="Information relating to shipping." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        Shipping not required
                    </td>
                </tr>
                <tr runat="server" id="divShippingAddress">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblShippingAddress" Text="Shipping address:"
                            ToolTip="The customer's shipping address." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <div>
                            <div style="font-weight: bold">
                                <asp:Literal ID="lShippingFirstName" runat="server"></asp:Literal>
                                <asp:Literal ID="lShippingLastName" runat="server"></asp:Literal>
                            </div>
                            <div>
                                Email:
                                <asp:Literal ID="lShippingEmail" runat="server"></asp:Literal></div>
                            <div>
                                Phone:
                                <asp:Literal ID="lShippingPhoneNumber" runat="server"></asp:Literal></div>
                            <div>
                                Fax:
                                <asp:Literal ID="lShippingFaxNumber" runat="server"></asp:Literal></div>
                            <asp:Panel ID="pnlShippingCompany" runat="server">
                                <asp:Literal ID="lShippingCompany" runat="server"></asp:Literal></asp:Panel>
                            <div>
                                <asp:Literal ID="lShippingAddress1" runat="server"></asp:Literal></div>
                            <asp:Panel ID="pnlShippingAddress2" runat="server">
                                <asp:Literal ID="lShippingAddress2" runat="server"></asp:Literal></asp:Panel>
                            <div>
                                <asp:Literal ID="lShippingCity" runat="server"></asp:Literal>,
                                <asp:Literal ID="lShippingStateProvince" runat="server"></asp:Literal>
                                <asp:Literal ID="lShippingZipPostalCode" runat="server"></asp:Literal></div>
                            <asp:Panel ID="pnlShippingCountry" runat="server">
                                <asp:Literal ID="lShippingCountry" runat="server"></asp:Literal></asp:Panel>
                        </div>
                    </td>
                </tr>
                <tr runat="server" id="divShippingMethod">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblShippingMethodTitle" Text="Shipping method:"
                            ToolTip="The customers chosen shipping method for this order. You can manage shipping methods from Configuration : Shipping : Shipping Methods."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblShippingMethod" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr runat="server" id="divShippedDate">
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblShippedDateTitle" Text="Shipped date:"
                            ToolTip="The date this order was shipped." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:Label ID="lblShippedDate" runat="server"></asp:Label>
                        <asp:Button ID="btnSetAsShipped" CssClass="adminButton" runat="server" Text="Set as shipped"
                            OnClick="btnSetAsShipped_Click"></asp:Button>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </ajaxToolkit:TabPanel>
    <ajaxToolkit:TabPanel runat="server" ID="pnlOrderProducts" HeaderText="Products">
        <ContentTemplate>
            <table class="adminContent">
                <tr>
                    <td class="adminData">
                        <asp:GridView ID="gvOrderProductVariants" runat="server" AutoGenerateColumns="False"
                            Width="100%">
                            <Columns>
                                <asp:BoundField DataField="OrderProductVariantID" HeaderText="OrderProductVariantID"
                                    Visible="False"></asp:BoundField>
                                <asp:TemplateField HeaderText="Name" ItemStyle-Width="30%">
                                    <ItemTemplate>
                                        <div style="padding-left: 10px; padding-right: 10px; text-align: left;">
                                            <em><a href='<%#GetProductURL(Convert.ToInt32(Eval("ProductVariantID")))%>' title="View product details">
                                                <%#Server.HtmlEncode(GetProductVariantName(Convert.ToInt32(Eval("ProductVariantID"))))%></a></em>
                                            <%#Eval("AttributeDescription")%>
                                            <div id="Div1" runat="server" visible='<%# !String.IsNullOrEmpty(Eval("TextOption").ToString()) %>'>
                                                <%#Server.HtmlEncode(Eval("TextOption").ToString())%>
                                            </div>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Download" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="10%"
                                    ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <%#GetDownloadURL(Container.DataItem as OrderProductVariant)%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Price" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="15%"
                                    ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <%#GetProductVariantUnitPrice(Container.DataItem as OrderProductVariant)%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="Quantity" HeaderText="Quantity" HeaderStyle-HorizontalAlign="Center"
                                    ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
                                <asp:TemplateField HeaderText="Discount" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="15%"
                                    ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <%#GetOrderProductVariantDiscountAmount(Container.DataItem as OrderProductVariant)%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Price" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="20%"
                                    ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <%#GetOrderProductVariantSubTotal(Container.DataItem as OrderProductVariant)%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </ajaxToolkit:TabPanel>
    <ajaxToolkit:TabPanel runat="server" ID="pnlOrderNotes" HeaderText="Order notes">
        <ContentTemplate>
            <table class="adminContent">
                <tr>
                    <td class="adminData" colspan="2">
                        <asp:GridView ID="gvOrderNotes" runat="server" AutoGenerateColumns="False" Width="100%">
                            <Columns>
                                <asp:BoundField DataField="OrderNoteID" HeaderText="OrderNoteID" Visible="False">
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Created on" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="20%"
                                    ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <%#DateTimeHelper.ConvertToUserTime((DateTime)Eval("CreatedOn")).ToString()%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Note" ItemStyle-Width="90%">
                                    <ItemTemplate>
                                        <div style="padding-left: 10px; padding-right: 10px; text-align: left;">
                                            <%#OrderManager.FormatOrderNoteText((string)Eval("Note"))%>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td class="adminData" colspan="2">
                        <hr />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblNewOrderNote" Text="New order note:"
                            ToolTip="The new order note." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:TextBox runat="server" ID="txtNewOrderNote" TextMode="MultiLine" Height="150px"
                            Width="500px"></asp:TextBox>
                        <br />
                        <asp:Button ID="btnAddNewOrderNote" CssClass="adminButton" runat="server" Text="Add order note"
                            OnClick="btnAddNewOrderNote_Click" ToolTip="Add new order note" />&nbsp;
                    </td>
                </tr>
            </table>
            <table class="adminContent">
            </table>
        </ContentTemplate>
    </ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer>
<ajaxToolkit:ConfirmButtonExtender ID="ConfirmDeleteButtonExtender" runat="server"
    TargetControlID="DeleteButton" DisplayModalPopupID="ModalPopupExtenderDelete" />
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtenderDelete" runat="server" TargetControlID="DeleteButton"
    PopupControlID="pnlDeletePopup" OkControlID="deleteButtonOk" CancelControlID="deleteButtonCancel"
    BackgroundCssClass="modalBackground" />
<asp:Panel ID="pnlDeletePopup" runat="server" Style="display: none; width: 250px;
    background-color: White; border-width: 2px; border-color: Black; border-style: solid;
    padding: 20px;">
    <div style="text-align: center;">
        Are you sure?
        <br />
        <br />
        <asp:Button ID="deleteButtonOk" runat="server" Text="OK" CssClass="adminButton" CausesValidation="false" />
        <asp:Button ID="deleteButtonCancel" runat="server" Text="Cancel" CssClass="adminButton"
            CausesValidation="false" />
    </div>
</asp:Panel>
