Exemple #1
0
        private void login()
        {
            User user = ctx.Users.FirstOrDefault(u => u.Username == textusername.Text && u.Password == textpassword.Text);

            if (user != null)
            {
                UserManagement.user = user;
                bool     type   = user.StatusType;
                bool     seller = (Boolean)user.Seller;
                Anasayfa ana    = new Anasayfa();
                ana.yonetici = type;
                ana.seller   = seller;
                this.Hide();
                ana.Show();
            }
            else
            {
                label5.Text       = "Bilgiler Yanlış !";
                textpassword.Text = "";
            }
        }