private void btnclick(object sender, EventArgs e) { Rc = new RegistrationClass(); Rc.CreateDatabaseBook(); String t = C_id.ToString(); List <CLocation> res = Rc.SelectBookedLocation(t); List <CLocation> k = Rc.SelectTableLocation(); int o = k.Count; if (res != null) { int i = res.Count; CLocation Loc = res.Last(); CLocation Loc1 = res[0]; Mssage = Loc.Message; Addrss = Loc.address; } RM = new Book(); RM.Message = Mssage; RM.C_id = C_id.Text; RM.D_id = D_id.Text; RM.Address = Addrss; bool r = Rc.InsertBook(RM); if (r) { FindViewById <TextView>(Resource.Id.textView1).Text = "Booked Successfully ! Enjoy Your Ride"; } }
private void B_simpan_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(C_id.Text)) { Interaction.MsgBox("Kolom ID Tamu Masih Kosong!", Constants.vbInformation, "Pemberitahuan"); C_id.Focus(); } else if (string.IsNullOrEmpty(L_id.Text)) { Interaction.MsgBox("Data Masih Kosong!", Constants.vbInformation, "Pemberitahuan"); C_id.Focus(); } else { simpan(); } }
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(); } }