//MySqlConnection connection = new MySqlConnection("datasource=localhost;Initial Catalog='db_parkir';port=3306;username=root;password=;Convert Zero Datetime=True;Allow Zero Datetime=True;"); //MySqlCommand command; //MySqlDataAdapter adapter; //DataTable table; private void DataKeluar_Load(object sender, EventArgs e) { DataGridView1.DataSource = DataKeluarM.GetListData(); Timer1.Start(); LblDate.Text = DateTime.Now.ToString("dd-MM-yyyy").ToString(); LblTime.Text = DateTime.Now.ToString("H:mm tt").ToString(); }
private void BtnCari_Click(object sender, EventArgs e) { //string valueToSearch = TextboxNoKendaraan.Text.ToString(); //SearchData(valueToSearch); //DataKeluarM.SearchData(valueToSearch); //string updateQuery = "UPDATE db_parkir.parkir_masuk a join biaya_parkir b SET a.tanggal_keluar = CURDATE(), a.jam_keluar = curtime(),a.Tarif = b.Tarif WHERE a.no_masuk =" + int.Parse(TextboxNoMasuk.Text); DataKeluarM.UpdateData4(TextboxNoMasuk.Text, TextboxNoKendaraan.Text); DataGridView1.DataSource = DataKeluarM.GetListData(); }
private void button1_Click(object sender, EventArgs e) { DataGridView1.DataSource = DataKeluarM.GetListData(); }