Ejemplo n.º 1
0
        private void btnLuu_Click(object sender, EventArgs e)
        {
            int     sl        = int.Parse(txtSL.Text);
            long    gia       = long.Parse(txtGiaNhap.Text);
            long    thanhtien = (long)sl * gia;
            long    masp      = long.Parse(cbbMaSP.SelectedValue.ToString());
            CTPNDTO ctpn      = new CTPNDTO(maphieu, masp, sl, gia, thanhtien);

            PhieuNhapBUS.InsertCTPN(ctpn);
            dgvNhapHang.DataSource = PhieuNhapBUS.GetCTPN(maphieu);
        }