Exemplo n.º 1
0
        private void SetMultipleDataWhenClienIsSelected(string checkBoxName)
        {
            switch (checkBoxName)
            {
            case "ListOfAllOrdersCB":
                SetSortedLisOfAllOrdersWHenClientIdIsSelected();
                break;

            case "OrdersInPriceRangeCB":
                double From = 0.00;
                double To   = 0.00;
                if (OrderValidator.TrySetPrice(FromTXT.Text, out From) && (OrderValidator.TrySetPrice(ToTXT.Text, out To)))
                {
                    SetSortedListOfOrdersInPriceRangeWHenClientIdIsSelected(From, To);
                }
                else
                {
                    MessageBox.Show("Set correct price range", "Invalid price range",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                break;
            }
        }
Exemplo n.º 2
0
 private bool CheckPriceFields(double From, double To)
 {
     return(OrderValidator.TrySetPrice(FromTXT.Text, out From) && (OrderValidator.TrySetPrice(ToTXT.Text, out To)));
 }