CyberStore Documentation
CustomerOrderStatus Class

Dovetail.Ecommerce.Controls Namespace : CustomerOrderStatus Class

A Customer order status control.


The CustomerOrderStatus control allows shoppers to search and view the status of an order, and provides links to complete order information. It is used in conjunction with the CustomerOrderDisplay control.

For this control to function, shoppers must be logged in. For B2B users, the OrderNumber provided must be linked to their Customer within Syspro. For B2C users, the OrderNumber provided must be linked to their Account in the Ecommerce Database.

An example of the CustomerOrderStatus control can be seen from within the CustomerOrderDisplay control as text which reads "Order Status: Open Order"

An example of the CustomerOrderStatus control and its corresponding pop-up can be seen below:



By clicking on the View Detail button a pop-up similar to the one below will appear in a new window.



CustomerOrderDisplayControl.ascx needs to be configured for display on customerorderdisplay.aspx, or the links to the complete order information cannot work properly.

Property Usage

By changing the values of the control's properties in the SitePages.config file for your Site, you can enable or disable certain behaviors, set certain defaults, alter aspects of the display or otherwise cusomtize your site's implementaion of the control.

The following describes properties pertaining to key functional areas of the control that can be configured to suit your needs.

General Properties

The DetailPage gets or set a value indicating the location path of the Detail Page.

The ConvertToOrderButtonText gets or sets the convert to order button text.

Quote Properties

The OrderRequestQuoteButtonDisplay gets or sets a value indicating whether the "Convert to Quote" button should be displayed to the user.

The OrderRequestQuoteButtonDisplayonStatus gets or sets a value indicating what Order Status should the "Convert to Quote" button display to the user.

The OrderRequestQuoteButtonResultText gets or sets a value indicating what result text should the "Order Request Quote" button display to the user.

Display Properties

The DisplayMode if in "Search" DisplayMode , the search is validated, and the criteria will be passed to the detail page specified by detailPage. for the display of the search results. If in "Detail" mode, the results will be displayed on the same page. If "Search" is Specified, then detailPage required. If detailPage is not specified in this case, a DisplayMode of is "Detail" is used.

The ShowCustomerPOSearch gets or sets a value indicating whether the Customer PO Search is shown.

The ShowDateRangeSearch gets or sets a value indicating whether Date Range Search is shown.

The ShowOrderNumberSearch gets or sets the value indicating whether the Order Number Search is displayed to the user.

The ShowOrderTypeColumn gets or sets a value indicating whether the order type column is shown.

Properties Inherited from the Base CyberStoreBaseControl

Properties specific to the CyberStoreBaseControl can be listed in the following categories:

Override Properties

When the IgnoreControl property is set to true, all processing of a control is skipped, and the control's Visible property is set to false ensuring that it is not rendered in the resulting CyberStore page.

Contextual Properties

Contextual properties define specific details about the current instance of the control based on context. Context can be set by any number of factors including the log in state of the Shopper, the Site being visited, or the properties that have been established for a control.

The AttributesBag property is used internal to control processing and is the collection of attributes, or properties, and their values based on how the control is configured. The attributes in this property are set by processing the SitePages.config file as well as any specific declared property values in any registered sub controls. It allows for the passing down of all properties to a control and any registered sub controls.

The ComConfigUserData and Site_ID properties are read-only values made available to all CyberStore controls to aid in processing and establishing context about the Site and Shopper.

Control Markup

The following is the markup for this control.

Developer's Note:

To create a custom version of the control, copy all of the code below into a file of the same name and place it into your Site's control folder (e.g., ../YourSiteFolder/Control). The CyberStore page engine will then override the default markup with your customized version.


<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CustomerOrderStatus.ascx.cs"
    Inherits="Dovetail.Ecommerce.Controls.CustomerOrderStatus" %>
<script type="text/javascript">
    var ChangeOrderStatusConfirmationMessage = '<%= ComConfig.ChangeOrderStatusConfirmationMessage %>';
<dx:ASPxPanel ID="Searchpnl" CssClass="OrderSearchPanel" runat="server">
            <p class="OrderSearchLabel" >Current Order Status</p>
            <p>Enter your Customer PO or Order Number below to see its current status in our warehouse.</p>
            <p class="OrderSearchLabel"> Customer PO:</p>
            <dx:ASPxTextBox ID="CustomerPOtxt" runat="server" CssClass="FormField" ClientIDMode="Static" />
            <dx:ASPxButton ID="CustomerPOgobtn" runat="server" CssClass="OrderSearchbutton" Text="" AutoPostBack="false" ClientSideEvents-Click="function(s,e){clbkResult.PerformCallback(CustomerPOtxt.GetText() + '|||');ResultPopup.Show();}"/>
            <p class="OrderSearchLabel">Order Number:</p>
            <dx:ASPxTextBox ID="OrderNumbertxt" runat="server" ClientIDMode="Static" CssClass="FormField" Width="10em" />
            <dx:ASPxButton ID="OrderNumbergobtn" runat="server" CssClass="OrderSearchbutton" Text="" AutoPostBack="false" ClientSideEvents-Click="function(s,e){clbkResult.PerformCallback('|' + OrderNumbertxt.GetText() + '||');ResultPopup.Show();}" />
            <p class="OrderSearchLabel">Order History Review</p>
           <p> Enter a date range below to display all orders placed during that period.</p>
           <p> <span class="OrderSearchLabel">From:</span>
            <dx:ASPxDateEdit ID="DateRangeFromtxt" EditFormat="Date" runat="server" ClientIDMode="Static" CssClass="FormField" Width="116px" MaxDate="<%# DateTime.Now %>" Date="<%# DateTime.Now.AddMonths(-1) %>" />
            <span class="OrderSearchLabel">To:</span>
            <dx:ASPxDateEdit  ID="DateRangeTotxt" runat="server" EditFormat="Date" ClientIDMode="Static" CssClass="FormField" Width="116px" MaxDate="<%# DateTime.Now %>" Date="<%# DateTime.Now %>" />
            <dx:ASPxButton ID="Gobtn" runat="server" CssClass="OrderSearchbutton" AutoPostBack="false" ClientSideEvents-Click="function(s,e){clbkResult.PerformCallback('||' + DateRangeFromtxt.GetText() + '|' + DateRangeTotxt.GetText());ResultPopup.Show();}" /></p>

<dx:ASPxPopupControl ID="ResultPopup" runat="server" Modal="true" HeaderText="" AutoUpdatePosition="true" AllowDragging="true" PopupHorizontalAlign="WindowCenter" ClientIDMode="Static" PopupAlignCorrection="Auto" PopupVerticalAlign="WindowCenter" CloseAction="OuterMouseClick">
            <dx:ASPxCallbackPanel ID="clbkResult" runat="server" ClientIDMode="Static" OnCallback="clbkResult_Callback">
                        <dx:ASPxGridView ID="OrderStatusResultGrid" runat="server" ClientIDMode="Static" Styles-AlternatingRow-CssClass="OrderStatusHighlightTableRow" Styles-Header-CssClass="ColumnLabel" 
                            Settings-GridLines="None" AutoGenerateColumns="false" KeyFieldName="SalesOrder" OnCustomColumnDisplayText="OrderStatusResultGrid_CustomColumnDisplayText" 
                            SettingsBehavior-EnableRowHotTrack="true" OnInit="OrderStatusResultGrid_Init" Settings-ShowFilterRow="true" SettingsEditing-Mode="EditForm"
                            SettingsText-EmptyDataRow="No orders to display" SettingsDataSecurity-AllowEdit="true" OnRowUpdating="OrderStatusResultGrid_RowUpdating" 
                                <dx:GridViewDataColumn FieldName="DocumentType" Caption="Order Type" Settings-FilterMode="DisplayText" ReadOnly="true" EditFormSettings-Visible="False" />
                                <dx:GridViewDataColumn UnboundType="Object" Caption=" " FieldName="ConvertButton" EditFormSettings-Visible="False" Settings-AllowHeaderFilter="False" Settings-AllowAutoFilter="False" Settings-AllowFilterBySearchPanel="False"> 
                                        <dx:ASPxButton ID="btnView" runat="server" Text='View Detail'
                                             ClientSideEvents-Click='<%# GetClientViewClick(Container) %>' 
                                             AutoPostBack="false" />
                                <dx:GridViewDataColumn FieldName="SalesOrder" EditCellStyle-CssClass="Invisible" Caption="Order Number" ReadOnly="true" />
                                <dx:GridViewDataColumn FieldName="OrderDate" Caption="Order Date" ReadOnly="true" EditFormSettings-Visible="False" Settings-AllowHeaderFilter="False" Settings-AllowAutoFilter="False" Settings-AllowFilterBySearchPanel="False" />
                                <dx:GridViewCommandColumn ButtonType="Button" Width="60" Caption=" " ShowEditButton="true" ShowUpdateButton="true" ShowCancelButton="true"/>
                                <dx:GridViewDataTextColumn FieldName="CustomerPoNumber" Caption="PO Number" />
                                <dx:GridViewDataColumn FieldName="OrderStatus" Caption="Status" Settings-FilterMode="DisplayText" ReadOnly="true" EditFormSettings-Visible="False" />
                                <dx:GridViewDataColumn UnboundType="Object" Caption=" " FieldName="ReprintButton" EditFormSettings-Visible="False" Settings-AllowHeaderFilter="False" Settings-AllowAutoFilter="False" Settings-AllowFilterBySearchPanel="False"> 
                                        <dx:ASPxButton ID="btnReprint" runat="server" Text='Reprint Confirmation'
                                             ClientSideEvents-Click='<%# GetClientReprintClick(Container) %>' 
                                             AutoPostBack="false" />
                                    <dx:ASPxGridViewTemplateReplacement runat="server" ID="CustomerPoNumberReplacement" ColumnID="CustomerPoNumber" ReplacementType="EditFormEditors" ClientIDMode="AutoID" />
                                    <dx:ASPxButton ID="lnkUpdate" ClientIDMode="AutoID" runat="server" Text='<%# ConvertToOrderButtonText %>' AutoPostback="false">
                                        <ClientSideEvents Click="function (s, e) { if(confirm(ChangeOrderStatusConfirmationMessage)){OrderStatusResultGrid.UpdateEdit();} }" />
                                    <dx:ASPxButton ID="ASPxHyperLink1" ClientIDMode="AutoID" runat="server" Text='Cancel' AutoPostback="false">
                                        <ClientSideEvents Click="function (s, e) { if(confirm('Are you sure you want to cancel?')){OrderStatusResultGrid.CancelEdit();} }" />
                                EndCallback="function(s,e){if (s.cpAlertMessage != null) {
                                                s.cpAlertMessage = null;
                                <UpdateButton Text="Submit Order"/>
                                <CancelButton Text="Cancel"/>

Inheritance Hierarchy


See Also


CustomerOrderStatus Members
Dovetail.Ecommerce.Controls Namespace