private void LoadData(DateTime tanggalMulai, DateTime tanggalSelesai) { using (new StCursor(Cursors.WaitCursor, new TimeSpan(0, 0, 0, 0))) { _listOfKasbon = _bll.GetByTanggal(tanggalMulai, tanggalSelesai); GridListControlHelper.Refresh <Kasbon>(this.gridList, _listOfKasbon); } ResetButton(); btnTambahPembayaran.Enabled = _listOfKasbon.Count > 0; GridListHandleSelectionChanged(this.gridListHistoriPembayaran); }
public void GetByTanggalTest() { var index = 1; var tglMulai = new DateTime(2017, 1, 1); var tglSelesai = new DateTime(2017, 4, 19); var oList = _bll.GetByTanggal(tglMulai, tglSelesai); var obj = oList[index]; Assert.IsNotNull(obj); Assert.AreEqual("5f913b90-6ff2-4210-878d-ed4b2717050e", obj.kasbon_id); Assert.AreEqual("00b5acfa-b533-454b-8dfd-e7881edd180f", obj.pengguna_id); Assert.AreEqual("201703270003", obj.nota); Assert.AreEqual(new DateTime(2017, 3, 27), obj.tanggal); Assert.AreEqual(10000, obj.nominal); Assert.AreEqual(0, obj.total_pelunasan); Assert.AreEqual("tessss", obj.keterangan); var karyawan = obj.Karyawan; Assert.AreEqual("d3506b64-df74-4283-b17a-6c5dbb770e85", obj.karyawan_id); Assert.AreEqual("d3506b64-df74-4283-b17a-6c5dbb770e85", karyawan.karyawan_id); Assert.AreEqual("Doni", karyawan.nama_karyawan); }