Пример #1
0
        /// <summary>
        /// Przepisanie danych wybranego zleceniodawcy do textBox'ów
        /// </summary>
        private void SetToTextbox()
        {
            CustomerStorage _customerStorage = new CustomerStorage();

            foreach (var i in _customerStorage.Read())
            {
                if (i.Name == _editOrder.Customer.Name)
                {
                    comboBoxSelectCustomer.Items.Insert(0, i);
                    comboBoxSelectCustomer.Text = i.Name;
                }
                else
                {
                    comboBoxSelectCustomer.Items.Add(i);
                }
            }

            textBoxEditOrdername.Text        = _editOrder.Name;
            textBoxEditComments.Text         = _editOrder.Comments;
            textBoxEditOrderPrice.Text       = string.Format("{0:0.00}", _editOrder.Price);
            dateEditOrderPicker.SelectedDate = _editOrder.Date;
            checkBoxIsPaid.IsChecked         = _editOrder.IsPaid;
        }