コード例 #1
0
ファイル: GetAll.cs プロジェクト: bulat047/BarberShop_777
        public GetAll()
        {
            InitializeComponent();

            IBarberShopLogic RequestLogic = DependencyResolver.RequestLogic;

            if (RequestLogic.getAll() != null)
            {
                foreach (var item in RequestLogic.getAll())
                {
                    richTextBox1.Text += item + '\n';
                }
            }
        }
コード例 #2
0
        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 = "Ошибка!!! Не верный формат даты";
            }
        }