123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using Servise.Classes;
- using Servise.Forms;
- using System;
- using System.Windows.Forms;
- namespace Servise
- {
- public partial class Form1 : Form
- {
- DataBase conect = new DataBase();
- public Form1()
- {
- InitializeComponent();
- }
- /// <summary>
- /// проверка для перехода к формам осуществляется в зависимости от роли
- /// </summary>
-
- private void Avtorization_Click(object sender, EventArgs e)
- {
- UserInform userInform = new UserInform();
- DateTime today = DateTime.Now;
- if ((userInform.Avtoriz(Login.Text.Trim(), Password.Text.Trim())))
- {
- if (UserInform.AdminLi == true)
- {
- this.Hide();
- Main goMain = new Main();
- goMain.Show();
- }
- else if (UserInform.AdminLi == false)
- {
- this.Hide();
- Users goUser = new Users();
- goUser.Show();
- }
-
- MessageBox.Show("Вход выполнен");
- Other.diagWrite("Успешная авторизация " + today);
- }
-
- }
- private void FomClose(object sender, FormClosedEventArgs e)
- {
- Application.Exit();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- private void Login_TextChanged(object sender, EventArgs e)
- {
- }
- }
- }
|