public void reset()
 {
     T_nama.Clear();
     C_jk.SelectedIndex = 0;
     T_alamat.Clear();
     T_telp.Clear();
 }
 public void reset()
 {
     C_id.SelectedIndex = 0;
     L_kamar.Text       = "-";
     L_tipe.Text        = "-";
     L_lantai.Text      = "-";
     L_harga.Text       = "0";
     T_nama.Clear();
     C_jk.SelectedIndex = 0;
     T_alamat.Clear();
     T_telp.Clear();
     T_durasi.Clear();
 }
 private void B_simpan_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(T_nama.Text))
     {
         Interaction.MsgBox("Kolom Nama Masih Kosong!", Constants.vbInformation, "Pemberitahuan");
         T_nama.Focus();
     }
     else if (!(C_jk.SelectedIndex == 1 | C_jk.SelectedIndex == 2))
     {
         Interaction.MsgBox("Kolom Jenis Kelamin Masih Kosong!", Constants.vbInformation, "Pemberitahuan");
         C_jk.Focus();
     }
     else if (string.IsNullOrEmpty(T_alamat.Text))
     {
         Interaction.MsgBox("Kolom Alamat Masih Kosong!", Constants.vbInformation, "Pemberitahuan");
         T_alamat.Focus();
     }
     else if (string.IsNullOrEmpty(T_telp.Text))
     {
         Interaction.MsgBox("Kolom No. Telp Masih Kosong!", Constants.vbInformation, "Pemberitahuan");
         T_telp.Focus();
     }
     else
     {
         koneksi();
         try
         {
             cmd = new OdbcCommand("select * from tb_tamu where id='" + L_id.Text + "'", conn);
             dr  = cmd.ExecuteReader();
             dr.Read();
             if (dr.HasRows)
             {
                 simpanUpdate();
             }
             else
             {
                 Interaction.MsgBox("Data Tidak Ditemukan", Constants.vbInformation, "Pemberitahuan");
                 Close();
             }
         }
         catch (Exception ex)
         {
         }
     }
 }
 private void B_simpan_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(C_id.Text))
     {
         Interaction.MsgBox("Kolom ID Kamar Masih Kosong!", Constants.vbInformation, "Pemberitahuan");
         C_id.Focus();
     }
     else if (string.IsNullOrEmpty(T_nama.Text))
     {
         Interaction.MsgBox("Kolom Nama Tamu Masih Kosong!", Constants.vbInformation, "Pemberitahuan");
         T_nama.Focus();
     }
     else if (C_jk.SelectedIndex == 0)
     {
         Interaction.MsgBox("Kolom Jenis Kelamin Tamu Masih Kosong!", Constants.vbInformation, "Pemberitahuan");
         C_jk.Focus();
     }
     else if (string.IsNullOrEmpty(T_alamat.Text))
     {
         Interaction.MsgBox("Kolom Alamat Tamu Masih Kosong!", Constants.vbInformation, "Pemberitahuan");
         T_alamat.Focus();
     }
     else if (string.IsNullOrEmpty(T_telp.Text))
     {
         Interaction.MsgBox("Kolom No. Telp Tamu Masih Kosong!", Constants.vbInformation, "Pemberitahuan");
         T_telp.Focus();
     }
     else if (string.IsNullOrEmpty(T_durasi.Text))
     {
         Interaction.MsgBox("Kolom Durasi Inap Masih Kosong!", Constants.vbInformation, "Pemberitahuan");
         T_durasi.Focus();
     }
     else
     {
         simpan();
     }
 }