コード例 #1
0
        public void GetItemBeliTest()
        {
            var index  = 2;
            var beliId = "70c46d69-ca7c-46b2-bd18-ebf03a28d02b";

            var oList = _bll.GetItemBeli(beliId);

            var itemBeli = oList[index];

            Assert.AreEqual("7f09a4aa-e660-4de3-a3aa-4b3244675f9f", itemBeli.Produk.produk_id);
            Assert.AreEqual("201607000000051", itemBeli.Produk.kode_produk);
            Assert.AreEqual("Access Point TPLINK TC-WA 500G", itemBeli.Produk.nama_produk);

            Assert.AreEqual(71000, itemBeli.harga);
            Assert.AreEqual(16, itemBeli.jumlah);
        }
コード例 #2
0
        protected override void Perbaiki()
        {
            var index = this.gridList.SelectedIndex;

            if (!base.IsSelectedItem(index, this.TabText))
            {
                return;
            }

            var beli = _listOfBeli[index];

            beli.tanggal_tempo_old = beli.tanggal_tempo;
            beli.item_beli         = _bll.GetItemBeli(beli.beli_produk_id);

            LogicalThreadContext.Properties["OldValue"] = beli.ToJson();

            var frm = new FrmEntryPembelianProduk("Edit Data " + this.Text, beli, _bll);

            frm.Listener = this;
            frm.ShowDialog();
        }