Ejemplo n.º 1
0
        private void ChangeUser_B_Click(object sender, EventArgs e)
        {
            SystemArgs.PrintLog($"Инциализация процедуры смены пользователя");

            MessegeTwoButtons Dialog = new MessegeTwoButtons();

            Dialog.Message_L.Text = "Вы действиельно хотеите сменить пользователя?";

            if (Dialog.ShowDialog() == DialogResult.OK)
            {
                Confirm = true;

                SystemArgs.MainForm.Login_TB.Text = "";
                SystemArgs.MainForm.Pass_TB.Text  = "";

                this.Close();

                SystemArgs.MainForm.Show();

                SystemArgs.PrintLog($"Процедура смены пользователя успешно завершена");
            }
            else
            {
                SystemArgs.PrintLog($"Процедура смены пользователя отменена");
            }
        }
Ejemplo n.º 2
0
        private void Delete_B_Click(object sender, EventArgs e)
        {
            SystemArgs.PrintLog($"Инициализация процедуры удаления позиции");

            MessegeTwoButtons Dialog = new MessegeTwoButtons();

            Dialog.Message_L.Text = "Вы действиельно хотите удалить эту позицию?";

            if (Dialog.ShowDialog() == DialogResult.OK)
            {
                DataFile.RemovePosition(SystemArgs.Positions[Positions_DGV.CurrentCell.RowIndex]);

                SystemArgs.Positions.RemoveAt(Positions_DGV.CurrentCell.RowIndex);

                ShowCurrentPositions(SystemArgs.Positions);

                if (SystemArgs.Positions.Count <= 0)
                {
                    Change_B.Enabled = false;
                    Delete_B.Enabled = false;
                }

                SystemArgs.PrintLog($"Удаление позициии успешно завершено");
            }
            else
            {
                SystemArgs.PrintLog($"Процедура удаления позиции отменена");
            }
        }
Ejemplo n.º 3
0
        private void Exit_B_Click(object sender, EventArgs e)
        {
            SystemArgs.PrintLog($"Инциализация процедуры выхода из программы");

            MessegeTwoButtons Dialog = new MessegeTwoButtons();

            Dialog.Message_L.Text = "Вы действителньо хотите выйти?";

            if (Dialog.ShowDialog() == DialogResult.OK)
            {
                SystemArgs.PrintLog($"Процедура выхода из программы успешно завершена");

                Application.Exit();
            }
            else
            {
                SystemArgs.PrintLog($"Процедура выхода из программы отменена");
            }
        }