/// <summary> /// Sửa dữ liệu DT ở hàng thứ index. /// </summary> private void SuaDuLieuDGV(DienThoai DT, int index) { object[] Row = new object[] { DT.GSMaSP, DT.GSTenSP, DT.GSXuatSu, DT.GSDonGia, DT.GSSoLuong, DT.ThanhTien() }; DGV.Rows[index].SetValues(Row); }
private void BT_Them_Click(object sender, EventArgs e) { DienThoai DT = LayDuLieuVao(); DGV.Rows.Add(DT.GSMaSP, DT.GSTenSP, DT.GSXuatSu, DT.GSDonGia, DT.GSSoLuong, DT.ThanhTien()); XoaDuLieuNhap(); }