Ejemplo n.º 1
0
        public void promobarang()
        {
            DataTable dtPromoBarang = Prolib.DataPromoBarangBonus(SumqtyBarang, SumHargaBarang);

            datagridviewBarangPromo.DataSource = dtPromoBarang.DefaultView;

            for (int i = 0; i < datagridviewBarangPromo.Rows.Count; ++i)
            {
                barangid = dtPromoBarang.Rows[i]["id_brg"].ToString();
                cekstok(barangid);
                int qtybonus = Convert.ToInt32(dtsumKelipatanQtyBarang.Rows[i]["qty_bns"]);


                if (qtybonus > qtystokakhir)
                {
                    qtybonusfinal = qtystokakhir;
                }
                else
                {
                    qtybonusfinal = qtybonus;
                }

                datagridviewBarangPromo.Rows[i].Cells["QtyBonus"].Value = qtybonusfinal;
            }
        }
Ejemplo n.º 2
0
        public void PromoBengkel()
        {
            DataTable dtPrmBengkel = Prolib.DataPromoBengkel(SumqtyKelompok, SumHargaKelompok, "");

            datagridviewpromotetap.DataSource = dtPrmBengkel.DefaultView;
            for (int i = 0; i < datagridviewpromotetap.Rows.Count; i++)
            {
                barangid = dtPrmBengkel.Rows[i]["id_brg"].ToString();
                cekstok(barangid);
                int qtybonus = Convert.ToInt32(dtPrmBengkel.Rows[i]["QtyPromo"]);
                if (qtybonus > qtystokakhir)
                {
                    qtybonusfinal = qtystokakhir;
                }
                else
                {
                    qtybonusfinal = qtybonus;
                }
                datagridviewpromotetap.Rows[i].Cells["QtyBonus2"].Value = qtybonusfinal;
            }
        }
Ejemplo n.º 3
0
        public void PromoKelompok()
        {
            DataTable dtPromoKelompok = Prolib.DataPromoKelompok(SumqtyKelompok, SumHargaKelompok);

            datagridviewpromokelompok.DataSource = dtPromoKelompok.DefaultView;

            for (int i = 0; i < datagridviewpromokelompok.Rows.Count; i++)
            {
                barangid = dtPromoKelompok.Rows[i]["id_brg"].ToString();
                cekstok(barangid);
                int qtybonus = Convert.ToInt32(dtsumKelipatanQtyKelompok.Rows[i]["qty_bns"]);

                if (qtybonus > qtystokakhir)
                {
                    qtybonusfinal = qtystokakhir;
                }
                else
                {
                    qtybonusfinal = qtybonus;
                }
                datagridviewpromokelompok.Rows[i].Cells["qtybunus1"].Value = qtybonusfinal;
            }
        }