public AddNewContributionForm(OperatorForm of, int ID)
 {
     InitializeComponent();
     this.of   = of;
     this.cfif = null;
     this.id   = ID;
 }
 public AddNewContributionForm(OperatorForm of, ClientFullInfoForm cfif, int ID)
 {
     InitializeComponent();
     this.of   = of;
     this.cfif = cfif;
     this.id   = ID;
 }
 public AddNewCreditRequestForm(OperatorForm of, ClientFullInfoForm cfif, int ID)
 {
     InitializeComponent();
     this.of   = of;
     this.cfif = cfif;
     this.id   = ID;
 }
 public AddNewCreditRequestForm(OperatorForm of, int ID)
 {
     InitializeComponent();
     this.of   = of;
     this.cfif = null;
     this.id   = ID;
 }
示例#5
0
        public ClientFullInfoForm(OperatorForm of, int clientID)
        {
            InitializeComponent();
            this.clientID = clientID;
            this.of       = of;
            BankDataSet.ПолучитьИнформациюКлиентаDataTable dt = new BankDataSet.ПолучитьИнформациюКлиентаDataTable();
            ПолучитьИнформациюКлиентаTableAdapter          ta = new ПолучитьИнформациюКлиентаTableAdapter();

            ta.Fill(dt, clientID);
            clientIDTextBox.Text     = dt.Rows[0].Field <int>("IDКлиента").ToString();
            clientNameTextBox.Text   = dt.Rows[0].Field <string>("ФИО").ToString();
            clientTownTextBox.Text   = dt.Rows[0].Field <string>("Город");
            clientIncomeTextBox.Text = dt.Rows[0].Field <decimal>("Доход").ToString();
            updateClientStatus();
        }
示例#6
0
 public AddNewClientFrom(OperatorForm of)
 {
     InitializeComponent();
     this.of = of;
 }
示例#7
0
        private void loginButton_Click(object sender, EventArgs e)
        {
            if (loginUserTypeComboBox.SelectedItem == null)
            {
                MessageBox.Show("Не выбран аккаунт, повторите попытку", "Ошибка входа", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else if (loginUserTypeComboBox.SelectedIndex == 0)
            {
                if (loginPasswordTextBox.Text == "root")
                {
                    MessageBox.Show("Добро пожаловать, г-н/г-жа Директор!", "Вход выполнен");
                    DirectorForm dF = new DirectorForm();
                    dF.Show();
                    loginPasswordTextBox.Text = "";
                }
                else
                {
                    MessageBox.Show("Пароль неверный, повторите попытку", "Ошибка входа", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            else
            {
                QueriesTableAdapter ta = new QueriesTableAdapter();
                int  workerID;
                bool isNum = int.TryParse(loginWorkerIDTextBox.Text, out workerID);
                if (!isNum)
                {
                    MessageBox.Show("ID сотрудника должно быть числом",
                                    "Ошибка входа", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    loginWorkerIDTextBox.Clear();
                    return;
                }
                int?checkWorkerExistence = 0;
                if (loginUserTypeComboBox.SelectedIndex == 1)
                {
                    ta.ПроверитьНаличиеОператора(int.Parse(loginWorkerIDTextBox.Text), ref checkWorkerExistence);
                }
                else
                {
                    ta.ПроверитьНаличиеКредитора(int.Parse(loginWorkerIDTextBox.Text), ref checkWorkerExistence);
                }
                string nameResult = "";
                switch (checkWorkerExistence)
                {
                case -1:
                {
                    MessageBox.Show("Такого банкира-оператора не существует, повторите попытку",
                                    "Ошибка входа", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    loginWorkerIDTextBox.Clear();
                    break;
                }

                case -2:
                {
                    MessageBox.Show("Такого банкира-кредитора не существует, повторите попытку",
                                    "Ошибка входа", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    loginWorkerIDTextBox.Clear();
                    break;
                }

                case 1:
                {
                    ta.ПолучитьФИОСотрудника(int.Parse(loginWorkerIDTextBox.Text), ref nameResult);
                    MessageBox.Show("Добро пожаловать, " + nameResult + "!", "Вход выполнен");
                    OperatorForm oF = new OperatorForm(int.Parse(loginWorkerIDTextBox.Text));
                    oF.Show();
                    loginWorkerIDTextBox.Clear();
                    break;
                }

                case 2:
                {
                    ta.ПолучитьФИОСотрудника(int.Parse(loginWorkerIDTextBox.Text), ref nameResult);
                    MessageBox.Show("Добро пожаловать, " + nameResult + "!", "Вход выполнен");
                    CreditorForm cF = new CreditorForm(int.Parse(loginWorkerIDTextBox.Text));
                    cF.Show();
                    loginWorkerIDTextBox.Clear();
                    break;
                }

                default:
                {
                    break;
                }
                }
            }
        }