Exemplo n.º 1
0
        private void btnThemHangHoa_Click(object sender, EventArgs e)
        {
            frmHangHoaThemSua f = new frmHangHoaThemSua();

            f.FormClosing += new FormClosingEventHandler(reloadHangHoa);
            f.ShowDialog();
        }
Exemplo n.º 2
0
        private void initSua(int row)
        {
            frmHangHoaThemSua.MaHangHoa  = grvHangHoa.GetRowCellValue(row, "MaHangHoa").ToString();
            frmHangHoaThemSua.TenHangHoa = grvHangHoa.GetRowCellValue(row, "TenHangHoa").ToString();
            frmHangHoaThemSua.GiaNhap    = (Decimal)grvHangHoa.GetRowCellValue(row, "GiaNhap");
            frmHangHoaThemSua.GiaBan     = (Decimal)grvHangHoa.GetRowCellValue(row, "GiaBan");
            frmHangHoaThemSua.LoaiHang   = (int)grvHangHoa.GetRowCellValue(row, "MaLoaiHang");
            frmHangHoaThemSua.DonViTinh  = (int)grvHangHoa.GetRowCellValue(row, "MaDVT");

            frmHangHoaThemSua f = new frmHangHoaThemSua(1);

            f.FormClosing += new FormClosingEventHandler(reload);
            f.ShowDialog();
        }