public ShowCustomer()
 {
     InitializeComponent();
     Db = new Database();
     CustomerList = new List<Customer>();
     b_acc.Visible = false;
 }
 public accomodationInfo(Facility f)
 {
     CurrentAccomondation = null;
     InitializeComponent();
     db = new Database();
     CurrentFacility = f;
     showFacilityData();
 }
 public AddCustomer()
 {
     InitializeComponent();
     Db = new Database();
     //overwrites the db
     //dberstellen();
     b_closeAccount.Hide();
     Cust_id = -1;
 }
 public addFeedback(Accomodation currentAccomondation, Customer currentCust)
 {
     // TODO: Complete member initialization
     InitializeComponent();
     CurrentFacility = null;
     CurrentAccomondation = currentAccomondation;
     rtb_feedback.Text = CurrentAccomondation.Feedback;
     CurrentCustomer = currentCust;
     Db = new Database();
 }
 public Details(Customer c, Accomodation a, DateTime start, DateTime end, string roomID)
 {
     InitializeComponent();
     CurrentCustomer = c;
     CurrentAccomodation = a;
     StartD = start;
     EndD = end;
     RoomID = roomID;
     Database = new Database();
     populateDetails();
 }
 public Bookings(Customer c, string name, int book_id, int acc_id, int room_id, int room_number, string start_date, string end_date)
 {
     Db = new Database();
     C = c;
     A = Db.searchAccomodation(""+acc_id);
     Name = name;
     Book_id = book_id;
     Acc_id = acc_id;
     Room_id = room_id;
     Room_number = room_number;
     Start_date = start_date;
     End_date = end_date;
 }
        public accomodationInfo(Customer c, Accomodation a)
        {
            InitializeComponent();
            CurrentCustomer = c;
            CurrentAccomondation = a;
            CurrentFacility = null;
            db = new Database();
            try
            {
                CurrentAccomondation = db.searchAccomodation(CurrentAccomondation.ID);

            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
            showAccommodationData();
        }
        public bookingDetails(Accomodation a, Customer c)
        {
            InitializeComponent();
            startDateRoom = new List<DateTime>();
            endDateRoom = new List<DateTime>();
            roomId = new List<int>();
            rooms = new Dictionary<int, int>();
            CurrentCustomer = c;
            CurrentAccomodation = a;

            accommodation_id = a.ID;
            user_id = c.Custi_id;
            Database = new Database();
            dgv_bookings.ColumnCount = 2;
            dgv_bookings.Columns[0].Name = "Room ID";
            dgv_bookings.Columns[1].Name = "Room Number";
            dgv_bookings.Columns[0].Width = dgv_bookings.Width / 2 - 22;
            dgv_bookings.Columns[1].Width = dgv_bookings.Width / 2 - 21;
            l_hotelName_bd.Text = Database.getHotelNameDb(accommodation_id);
            dbDateCheck();
        }
 public AddCustomer(Customer c)
 {
     Customer = c;
     Cust_id = c.Custi_id;
     InitializeComponent();
     Db = new Database();
     l_formtitle.Text = "Edit customer";
     b_closeAccount.Show();
     cb_title.Text = c.Title;
     tb_firstname.Text = c.Firstname;
     tb_surname.Text = c.Surname;
     cb_byear.Text = c.Birthday.Split('-')[0];
     cb_bmonth.Text = c.Birthday.Split('-')[1];
     cb_bday.Text = c.Birthday.Split('-')[2];
     switch (c.Birthday.Split('-')[1])
     {
         case "01":
             cb_bmonth.Text = "Janurary";
             break;
         case "02":
             cb_bmonth.Text = "Februray";
             break;
         case "03":
             cb_bmonth.Text = "March";
             break;
         case "04":
             cb_bmonth.Text = "April";
             break;
         case "05":
             cb_bmonth.Text = "May";
             break;
         case "06":
             cb_bmonth.Text = "June";
             break;
         case "07":
             cb_bmonth.Text = "July";
             break;
         case "08":
             cb_bmonth.Text = "August";
             break;
         case "09":
             cb_bmonth.Text = "September";
             break;
         case "10":
             cb_bmonth.Text = "October";
             break;
         case "11":
             cb_bmonth.Text = "November";
             break;
         case "12":
             cb_bmonth.Text = "December";
             break;
         default:
             cb_bmonth.Text = "0";
             break;
     }
     tb_street.Text = c.Street;
     tb_postcode.Text = c.Postcode;
     tb_city.Text = c.City;
     cb_country.Text = c.Country;
     tb_cardholder.Text = c.CardholderName;
     tb_creditnum.Text = c.Cardnumber;
     cb_expiremonth.Text = c.Expiremonth;
     cb_expireyear.Text = c.Expireyear;
 }