private void FormAddPurchaseBill_Load(object sender, EventArgs e) { listSupplier = Supplier.BacaData("", ""); comboBoxSupplier.DataSource = listSupplier; comboBoxSupplier.DisplayMember = "Nama"; comboBoxSupplier.DropDownStyle = ComboBoxStyle.DropDownList; listPembayaran = Pembayaran.BacaData("", ""); comboBoxPayment.DataSource = listPembayaran; comboBoxPayment.DisplayMember = "JenisPembayaran"; comboBoxPayment.DropDownStyle = ComboBoxStyle.DropDownList; textBoxNoNota.Text = NotaBeli.GenerateNoNota(); textBoxBarcode.MaxLength = 13; FormatDataGrid(); dateTimePickerDate.Value = DateTime.Now; }
public void FormDaftarPembayaran_Load(object sender, EventArgs e) { this.Location = new Point(0, 0); comboBoxCari.DropDownStyle = ComboBoxStyle.DropDownList; FormatDataGrid(); string hasilBaca = Pembayaran.BacaData("", "", listHasilData); if (hasilBaca == "1") { dataGridViewPembayaran.Rows.Clear(); for (int i = 0; i < listHasilData.Count; i++) { //tampilkan data sesuai urutan di format data grid string harga = listHasilData[i].Nominal.ToString("RP 0,###"); dataGridViewPembayaran.Rows.Add(listHasilData[i].IdPembayaran, listHasilData[i].NotaPembelian.NoNotaPembelian, listHasilData[i].Tgl.ToString("dddd, dd MMMM yyyy"), listHasilData[i].CaraPembayaran, harga); } } }