private void laporanPembelianToolStripMenuItem_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("Apakah anda ingin melakukan simpan data?", "Confirmation", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { string hasilCetak = NotaBeli.CetakNota("", "", "daftar_nota_beli.txt"); MessageBox.Show("Data telah tercetak"); } }
private void buttonCetak_Click(object sender, EventArgs e) { try { NotaBeli.CetakNota("nonota", textBoxNoNota.Text, "nota_beli.txt", new Font("Courier New", 12)); MessageBox.Show("Nota Beli berhasil dicetak"); } catch (Exception error) { MessageBox.Show($"Gagal Mencetak data, Error : {error.Message}"); } }
private void buttonCetak_Click(object sender, EventArgs e) { string criteria; switch (comboBoxCari.Text) { case "Tanggal": criteria = "tanggal"; break; case "Kode Supplier": criteria = "supplier.kodesupplier"; break; case "Nama Supplier": criteria = "supplier.nama"; break; case "Alamat Supplier": criteria = "supplier.alamat"; break; case "Kode Pegawai": criteria = "pegawai.kodepegawai"; break; case "Nama Pegawai": criteria = "pegawai.nama"; break; default: criteria = "nonota"; break; } try { if (textBoxCari.Text != "") { NotaBeli.CetakNota(criteria, textBoxCari.Text, $"nota_beli_{comboBoxCari.Text}_{textBoxCari.Text}.txt", new Font("Courier New", 12)); MessageBox.Show("Nota Beli berhasil dicetak"); } else { NotaBeli.CetakNota("", textBoxCari.Text, "nota_beli_all.txt", new Font("Courier New", 12)); MessageBox.Show("Nota Beli berhasil dicetak"); } } catch (Exception error) { MessageBox.Show($"Gagal Mencetak data, Error : {error.Message}"); } }
private void buttonPrint_Click(object sender, EventArgs e) { try { NotaBeli.CetakNota("NoNota", textBoxNoNota.Text, "Purchase_bill.txt", new Font("Courier New", 12)); MessageBox.Show("Nota Beli telah tercetak"); } catch (Exception ex) { MessageBox.Show("Nota Beli Gagal dicetak. Pesan Kesalahan : " + ex.Message); } }
public void cetak() { string hasilCetak = NotaBeli.CetakNota("NoNota", textBoxNoNota.Text, "nota_beli.txt"); if (hasilCetak == "1") { MessageBox.Show("Nota jual telah tercetak"); } else { MessageBox.Show("Nota jual gagal dicetak. Pesan kesalahan : " + hasilCetak); } }
private void buttonCetak_Click(object sender, EventArgs e) { string hasilCetak = NotaBeli.CetakNota("NoNota", textBoxNoNota.Text, "nota_Beli.txt"); if (hasilCetak == "1") { MessageBox.Show("Nota jual telah tercetak"); } else { MessageBox.Show("Nota jual gagal dicetak. Pesan kesalahan : " + hasilCetak); } }
private void buttonPrint_Click(object sender, EventArgs e) { NotaBeli.CetakNota(kriteria, textBoxSearch.Text, "List_Of_Purchase_Bill.txt", new Font("Courier New", 12)); }
private void buttonCetak_Click(object sender, EventArgs e) { string hasilCetak = NotaBeli.CetakNota(kriteria, textBoxCari.Text, "daftar_nota_beli.txt"); MessageBox.Show("Data telah tercetak"); }