private void SetControlVisibility(Enumerations.OperationType operationType)
        {
            switch (operationType)
            {
            case Enumerations.OperationType.Create:
                this.itemImage.IsVisible     = true;
                this.description.IsVisible   = true;
                this.purchasePrice.IsVisible = true;
                this.stockQty.IsVisible      = true;
                this.btnClear.IsVisible      = true;
                this.Title = "Create Item";
                break;

            case Enumerations.OperationType.Update:
                this.itemImage.IsVisible     = true;
                this.description.IsVisible   = true;
                this.purchasePrice.IsVisible = true;
                this.stockQty.IsVisible      = true;
                this.btnClear.IsVisible      = false;
                this.Title = "Update Item";
                break;

            case Enumerations.OperationType.ExpressCreate:
                this.itemImage.IsVisible     = false;
                this.description.IsVisible   = false;
                this.purchasePrice.IsVisible = false;
                this.stockQty.IsVisible      = false;
                this.btnClear.IsVisible      = true;
                this.Title = "Express Create Item";
                break;

            default:
                break;
            }
        }
Beispiel #2
0
        public OrderPage(Enumerations.OperationType operationType, OrderHeader header = null) : this()
        {
            if (header != null)
            {
                OrderHeader = header;
            }

            SetControlVisibility(operationType);
        }
 public ItemPage(Enumerations.OperationType operationType, Item item = null) : this()
 {
     _item = item;
     SetPageData(_item);
     SetControlVisibility(operationType);
 }