コード例 #1
0
        public RadForm1()
        {
            hotelEntities = new HotelEntities();
            reservation   = new Reservation();
            getGanttData();

            InitializeComponent();
        }
コード例 #2
0
 private void Frm_Bill_Load(object sender, EventArgs e)
 {
     T_Num.Focus();
     hotelEntities = new HotelEntities();
     bill          = new Bill();
     billRow       = new BillRow();
     T_Date.Text   = DateTime.Now.ToString();
     T_An.Text     = DateTime.Now.Year.ToString();;
 }
コード例 #3
0
 private void Frm_Guest_Load(object sender, EventArgs e)
 {
     hotelEntities   = new HotelEntities();
     guest           = new Guest();
     T_DateNais.Text = DateTime.Now.Year.ToString();;
     data            = new BindingList <string>();
     this.data.Add("M.");
     this.data.Add("Mme");
     this.data.Add("Mlle");
     T_State.DataSource = this.data;
     T_State.Text       = "M.";
     T_Num.Focus();
 }
コード例 #4
0
 private void Frm_Reservation_Load(object sender, EventArgs e)
 {
     T_Num.Focus();
     hotelEntities   = new HotelEntities();
     reservation     = new Reservation();
     reservationRow  = new ReservationRow();
     T_Checkin.Text  = DateTime.Now.ToString();
     T_Checkout.Text = DateTime.Now.ToString();
     T_An.Text       = DateTime.Now.Year.ToString();;
     //verifRoomChechIn();
     //switchRoomCheckout();
     //switchRoomAvailable();
 }
コード例 #5
0
 private void Frm_Payement_Load(object sender, EventArgs e)
 {
     hotelEntities = new HotelEntities();
     payement      = new Payement();
     T_Num.Focus();
     T_An.Text = DateTime.Now.Year.ToString();;
     this.data = new BindingList <string>();
     this.data.Add("Espece");
     this.data.Add("Cheque");
     this.data.Add("Credit Cart");
     T_PatType.DataSource = this.data;
     T_PatType.Text       = "Espece";
 }
コード例 #6
0
 private void Frm_Room_Load(object sender, EventArgs e)
 {
     T_Num.Focus();
     hotelEntities = new HotelEntities();
     room          = new Room();
     data          = new BindingList <string>();
     this.data.Add("Reserved");
     this.data.Add("Occupied");
     this.data.Add("Available");
     this.data.Add("CheckOut");
     T_Dispo.DataSource = this.data;
     T_Dispo.Text       = "Available";
     T_Num.Focus();
 }
コード例 #7
0
 private void getServiceList()
 {
     using (HotelEntities hotelEntities = new HotelEntities())
     {
         var query = from service in hotelEntities.Service
                     select new
         {
             Code = service.Service_id,
             Nom  = service.ServiceName,
             Cost = service.ServiceCost
         };
         Service_Help_Grid.DataSource = query.ToList();
     }
 }
コード例 #8
0
 private void getRoomList()
 {
     using (HotelEntities hotelEntities = new HotelEntities())
     {
         var query = from room in hotelEntities.Room
                     select new
         {
             Numero        = room.RoomNum,
             Description   = room.Description,
             NbreLit       = room.QteBeds,
             NbreMax       = room.MaxOccupancy,
             Disponibilite = room.Availability
         };
         Room_Help_Grid.DataSource = query.ToList();
     }
 }
コード例 #9
0
 private void getEmployeeList()
 {
     using (HotelEntities hotelEntities = new HotelEntities())
     {
         var query = from employee in hotelEntities.Employee
                     select new
         {
             Code           = employee.Employee_id,
             Nom            = employee.FirstName,
             Prenom         = employee.LastName,
             Date_Naissance = employee.DOB,
             Ville          = employee.City,
             NumTelephone   = employee.PhoneNumber
         };
         this.Guest_Help_Grid.DataSource = query.ToList();
     }
 }
コード例 #10
0
 private void getGuestList()
 {
     using (HotelEntities hotelEntities = new HotelEntities())
     {
         var query = from guest in hotelEntities.Guest
                     select new
         {
             Code           = guest.Guest_id,
             Nom            = guest.FirstName,
             Prenom         = guest.LastName,
             Date_Naissance = guest.GuestDOB,
             Ville          = guest.City,
             NumTelephone   = guest.PhoneNumber
         };
         Guest_Help_Grid.DataSource = query.ToList();
     }
 }
コード例 #11
0
 private void getBillList()
 {
     using (HotelEntities hotelEntities = new HotelEntities())
     {
         var query = from bill in hotelEntities.Bill
                     join guest in hotelEntities.Guest on bill.Guest_id equals guest.Guest_id
                     select new
         {
             Numero = bill.Bill_id,
             An     = bill.An,
             Nom    = guest.FirstName,
             Prenom = guest.LastName,
             Date   = bill.DateBill,
             Cout   = bill.TotalCost
         };
         Bill_Help_Grid.DataSource = query.ToList();
     }
 }
コード例 #12
0
        private void Btn_Login_Click(object sender, EventArgs e)
        {
            using (HotelEntities hotelEntities = new HotelEntities())
            {
                var query = from login in hotelEntities.Login
                            where login.Username.Equals(T_Username.Text.Trim()) && login.Password.Equals(T_Password.Text.Trim())
                            select login;

                if (query.ToList().Count > 0)
                {
                    this.Hide();
                    ShapedForm1 frm = new ShapedForm1();
                    frm.Show();
                }
                else
                {
                    htmlToolTip1.Show("Verifier le nom d'utilisateur !", T_Username, 2500);
                    htmlToolTip2.Show("Verifier le Password !", T_Password, 2500);
                    MessageBox.Show("Verifier le nom d'utilisateur et/ou le mot de passe !");
                }
            }
        }
コード例 #13
0
 private void getReservationList()
 {
     using (HotelEntities hotelEntities = new HotelEntities())
     {
         var query = from reservation in hotelEntities.Reservation
                     join guest in hotelEntities.Guest on reservation.Guest_id equals guest.Guest_id
                     join employee in hotelEntities.Employee on reservation.Emplyee_id equals employee.Employee_id
                     select new
         {
             Code           = reservation.Reservation_id,
             An             = reservation.An,
             NomGuest       = guest.FirstName,
             PrenomGuest    = guest.LastName,
             NomEmployee    = employee.FirstName,
             PrenomEmployee = employee.LastName,
             RoomId         = reservation.RoomNum,
             Checkin        = reservation.Checkin,
             Checkout       = reservation.Checkout,
             TotDays        = reservation.Totaldays,
             TotCost        = reservation.Reservationcost
         };
         Reservation_Help_Grid.DataSource = query.ToList();
     }
 }
コード例 #14
0
        private void T_Password_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == 13)
            {
                using (HotelEntities hotelEntities = new HotelEntities())
                {
                    var query = from login in hotelEntities.Login
                                where login.Username.Equals(T_Username.Text.Trim()) && login.Password.Equals(T_Password.Text.Trim())
                                select login;

                    if (query.ToList().Count > 0)
                    {
                        this.Hide();
                        ShapedForm1 frm = new ShapedForm1();
                        frm.Show();
                    }
                    else
                    {
                        htmlToolTip1.Show("Verifier le nom d'utilisateur !", T_Username, 2500);
                        htmlToolTip2.Show("Verifier le Password !", T_Password, 2500);
                    }
                }
            }
        }
コード例 #15
0
 private void Frm_Service_Load(object sender, EventArgs e)
 {
     hotelEntities = new HotelEntities();
     service       = new Service();
     T_Num.Focus();
 }