Пример #1
0
        private void btnEntering_Click(object sender, EventArgs e)
        {
            string Name = txtUserName.Text, Pass = txtUserPass.Text;
            bool   Result    = true;
            bool   Aut_Level = true;

            foreach (Users u in User)
            {
                if (u.UserName == Name)
                {
                    if (u.UserPass == Pass)
                    {
                        Result      = true;
                        Aut_Level   = u.Aut_Level;
                        EnteredUser = u;
                        break;
                    }
                    else
                    {
                        Result = false;
                    }
                }
                else
                {
                    Result = false;
                }
            }

            if (Result)
            {
                if (Aut_Level)
                {
                    UsersScreen UserEntering = new UsersScreen(this);
                    Hide();
                    UserEntering.Show();
                }
                else
                {
                    AdminScreen AdminEntering = new AdminScreen(this);
                    Hide();
                    AdminEntering.Show();
                    //MessageBox.Show("admin giris");
                }
            }
            else
            {
                MessageBox.Show("yanlış");
            }
        }
Пример #2
0
 public AdminRandevu(AdminScreen Ascreen)
 {
     adminScreen = Ascreen;
     user        = Ascreen.user;
     InitializeComponent();
 }
Пример #3
0
 public AddDoctor(AdminScreen aScreen)
 {
     adminScreen = aScreen;
     InitializeComponent();
 }