Beispiel #1
0
    public void BindData()
    {
        ZNode.Libraries.Admin.OrderAdmin OrderAdmin = new ZNode.Libraries.Admin.OrderAdmin();

        //Add New Item
        ListItem Li = new ListItem();
        Li.Text = "All";
        Li.Value = "-1";

        //Load Order State Item
        ListOrderStatus.DataSource = OrderAdmin.GetAllOrderStates();
        ListOrderStatus.DataTextField = "orderstatename";
        ListOrderStatus.DataValueField = "Orderstateid";
        ListOrderStatus.DataBind();
        ListOrderStatus.Items.Insert(0, Li);
        ListOrderStatus.Items[0].Selected = true;
    }
Beispiel #2
0
 /// <summary>
 /// Display the Order State name for a Order state
 /// </summary>
 /// <param name="FieldValue"></param>
 /// <returns></returns>
 public string DisplayOrderStatus(object FieldValue)
 {
     ZNode.Libraries.Admin.OrderAdmin _OrderAdmin = new ZNode.Libraries.Admin.OrderAdmin();
     OrderState _OrderState = _OrderAdmin.GetByOrderStateID(int.Parse(FieldValue.ToString()));
     return _OrderState.OrderStateName.ToString();
 }
Beispiel #3
0
    /// <summary>
    /// Display the Payment type for the Order
    /// </summary>
    /// <param name="Value"></param>
    /// <returns></returns>
    public string DisplayPaymentType(object Value)
    {
        if (Value != null)
        {
            if (Value.ToString().Length > 0)
            {
                ZNode.Libraries.Admin.OrderAdmin _OrderAdmin = new ZNode.Libraries.Admin.OrderAdmin();
                PaymentType _type = _OrderAdmin.GetByPaymentTypeId(int.Parse(Value.ToString()));
                return _type.Name.ToString();
            }
        }

        return "";
    }
Beispiel #4
0
    /// <summary>
    /// Bind Datas
    /// </summary>
    public void BindGrid()
    {
        ZNode.Libraries.Admin.OrderAdmin OrderAdmin = new ZNode.Libraries.Admin.OrderAdmin();

        //Bind Grid
        TList<Order> orderList = OrderAdmin.GetAllOrders(ZNodeConfigManager.SiteConfig.PortalID);

        if (orderList != null)
        {
            orderList.Sort("OrderID Desc");
        }

        uxGrid.DataSource = orderList;
        uxGrid.DataBind();
    }