Пример #1
0
        private void buttonAddBox_Click(object sender, EventArgs e)
        {
            var box = new Box();

            box.Number = Int32.Parse(textBoxNumber.Text);
            Enum.TryParse(comboBoxStatus.Text, out StatusEnum status);
            box.Status = status;
            box.UserId = Int32.Parse(textBoxUserId.Text);

            _boxService.Add(box);
            RefreshDataGridView();
        }