public GetAll() { InitializeComponent(); IBarberShopLogic RequestLogic = DependencyResolver.RequestLogic; if (RequestLogic.getAll() != null) { foreach (var item in RequestLogic.getAll()) { richTextBox1.Text += item + '\n'; } } }
public Result_AddRequest(string[] arrStr) { InitializeComponent(); IBarberShopLogic RequestLogic = DependencyResolver.RequestLogic; try { RequestLogic.addRequest(arrStr[0], DateTime.Parse(arrStr[1])); label_resultAdding.Text = "Запись добавлена!"; } catch (Exception) { this.Text = "ERROR"; Color redColor = Color.FromArgb(255, 0, 0); label_resultAdding.ForeColor = redColor; label_resultAdding.Text = "Ошибка!!! Не верный формат даты"; } }