public int inputcheckout()
        {
            bool     stat    = false;
            int      v       = 0;
            DateTime checkin = DateTime.Now;

            checkin = dtcheckoutcheckout.Value;
            koneksi kon = new koneksi();

            Data.Reservation dre = new Data.Reservation();
            dre.Check_out    = dtcheckoutcheckout.Value.ToString("yyyy-MM-dd hh:mm:ss");
            dre.Check_in     = tbxcheckincheckout.Text;
            dre.No_reservasi = tbxreservationidcheckout.Text;
            try
            {
                //MySqlCommand cmd = new MySqlCommand("update tb_reservation set check_in='" + dre.Check_in + "' where no_reservation='" + dre.No_reservasi + "'", conn);
                //checkin = Convert.ToDateTime(tbxcheckinadmin.Text);
                kon.openConnection();
                string query = "update tb_reservation set checkout='" + dre.Check_out + "' where no_reservation='" + dre.No_reservasi + "'";
                kon.ExecuteQueries(query);
                v = 1;
                kon.closeConnection();
            }
            catch (Exception ex)
            {
            }
            return(v);
        }
        private void Btnbsysrreserv_Click(object sender, EventArgs e)
        {
            bool stat = false;

            Data.Reservation dr = new Data.Reservation();
            try
            {
                if (Convert.ToInt32(tbxpembayaranbilpay.Text) > Convert.ToInt32(tbxbilling.Text))
                {
                    dr.No_reservasi = tbxreservationidbilpay.Text;
                    dr.Pembayaran   = Convert.ToInt32(tbxpembayaranbilpay.Text);
                    dr.Kembali      = Convert.ToInt32(tbxkembalianbilpay.Text);
                    dr.Keterangan   = tbxketeranganbilpay.Text;
                    koneksi kon = new koneksi();
                    kon.openConnection();
                    string query = "update tb_reservation set pembayaran='" + dr.Pembayaran + "', kembalian='" + dr.Kembali + "', keterangan='" + dr.Keterangan + "' where no_reservation='" + dr.No_reservasi + "'";
                    kon.ExecuteQueries(query);
                    stat = true;
                    kon.closeConnection();
                    MessageBox.Show("Pembayaran berhasil!");
                    binding();
                }
                else
                {
                    MessageBox.Show("Uang anda tidak mencukupi!");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Anda belum memasukan nominal pembayaran");
            }
        }
        public bool readbilpay()
        {
            bool    stat = false;
            koneksi kon  = new koneksi();

            try
            {
                kon.openConnection();
                string query = "select * from tb_reservation where client_id='" + label6 + "' and keterangan=Belum Lunas";
                kon.ExecuteQueries(query);
                stat = true;
                kon.closeConnection();
            }
            catch (Exception ex)
            {
            }
            return(stat);
        }