private void BtnGiris_Click(object sender, EventArgs e)
        {
            if (db.AppUsers.FirstOrDefault(x => x.UserName == txtUserName.Text && x.Password == txtPassword.Text) != null)
            {
                foreach (AppUser item in db.AppUsers.ToList())
                {
                    if (item.UserName == txtUserName.Text)
                    {
                        reservationCustomerID = item.CustomerID;
                    }
                }
                txtPassword.Text = txtUserName.Text = "";
                UsersReservations usersReservations = new UsersReservations(this, db, reservationCustomerID);
                usersReservations.Show();
                Hide();
                //ReservationInterface reservation = new ReservationInterface(this, db, reservationCustomerID);


                //reservation.Show();
                //Hide();
            }
            else
            {
                MessageBox.Show("Kullanıcı adı veya şifre hatalı, lütfen tekrar deneyiniz!");
            }
        }
Пример #2
0
 public ReservationInterface(UsersReservations users, Context context, int resCus)
 {
     reservationCustomerID = resCus;
     db = context;
     usersReservations = users;
     InitializeComponent();
 }