Exemple #1
0
        public void CheckIn()
        {
            if (lstCheckInCheckOut.SelectedItems != null)
            {
                ListViewItem item = lstCheckInCheckOut.SelectedItems[0];

                CheckInCheckOut info = new CheckInCheckOut();
                info.floor      = item.SubItems[0].Text;
                info.roomnumber = item.SubItems[1].Text;
                room_number     = item.SubItems[1].Text;
                addCheckDate();
                info.type      = item.SubItems[2].Text;
                info.price     = item.SubItems[3].Text;
                info.checkin   = checkin;
                info.checkout  = checkout;
                info.available = "NO";
                double Uprice = double.Parse(item.SubItems[3].Text);
                info.total = Uprice * diff + "$";
                info.connect();
                info.update();
                info.connect();
                info.addToCustomer();
            }
            ReadAllData();
            //MessageBox.Show("Done");
        }
Exemple #2
0
 public void CheckOut()
 {
     try
     {
         if (lstCheckInCheckOut.SelectedItems != null)
         {
             ListViewItem    item = lstCheckInCheckOut.SelectedItems[0];
             CheckInCheckOut info = new CheckInCheckOut();
             info.roomnumber = item.SubItems[1].Text;
             info.available  = "YES";
             info.connect();
             info.update();
         }
     }
     catch (Exception) { }
     ReadAllData();
 }