//Click vào lưới
 private void dgv_DanhSachHoaDon_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         //Nút xem chi tiết
         if (e.ColumnIndex == dgv_DanhSachHoaDon.Columns["Detail"].Index)
         {
             HoaDon hd = new HoaDon();
             hd.MaHoaDon    = dgv_DanhSachHoaDon.CurrentRow.Cells["MaHoaDon"].Value.ToString();
             hd.NhanVien    = dgv_DanhSachHoaDon.CurrentRow.Cells["NhanVien"].Value.ToString();
             hd.KhachHang   = dgv_DanhSachHoaDon.CurrentRow.Cells["KhachHang"].Value.ToString();
             hd.NgayXuat    = Convert.ToDateTime(dgv_DanhSachHoaDon.CurrentRow.Cells["NgayXuat"].Value);
             hd.DonDatHang  = dgv_DanhSachHoaDon.CurrentRow.Cells["DonHang"].Value.ToString();
             hd.TongTien    = Convert.ToDecimal(dgv_DanhSachHoaDon.CurrentRow.Cells["TongTien"].Value);
             hd.DaThanhToan = Convert.ToDecimal(dgv_DanhSachHoaDon.CurrentRow.Cells["DaThanhToan"].Value);
             hd.ConLai      = Convert.ToDecimal(dgv_DanhSachHoaDon.CurrentRow.Cells["ConLai"].Value);
             hd.DSChiTiet   = client.HoaDon_LoadChiTiet(hd.MaHoaDon);
             uc_SellingInvoiceCreate uc = new uc_SellingInvoiceCreate(hd, true);
             LoadTab("Chi tiết hoá đơn", uc);
         }
         //Nút sửa
         if (e.ColumnIndex == dgv_DanhSachHoaDon.Columns["Fix"].Index)
         {
             HoaDon hd = new HoaDon();
             hd.MaHoaDon    = dgv_DanhSachHoaDon.CurrentRow.Cells["MaHoaDon"].Value.ToString();
             hd.NhanVien    = dgv_DanhSachHoaDon.CurrentRow.Cells["NhanVien"].Value.ToString();
             hd.KhachHang   = dgv_DanhSachHoaDon.CurrentRow.Cells["KhachHang"].Value.ToString();
             hd.NgayXuat    = Convert.ToDateTime(dgv_DanhSachHoaDon.CurrentRow.Cells["NgayXuat"].Value);
             hd.DonDatHang  = dgv_DanhSachHoaDon.CurrentRow.Cells["DonHang"].Value.ToString();
             hd.TongTien    = Convert.ToDecimal(dgv_DanhSachHoaDon.CurrentRow.Cells["TongTien"].Value);
             hd.DaThanhToan = Convert.ToDecimal(dgv_DanhSachHoaDon.CurrentRow.Cells["DaThanhToan"].Value);
             hd.ConLai      = Convert.ToDecimal(dgv_DanhSachHoaDon.CurrentRow.Cells["ConLai"].Value);
             hd.DSChiTiet   = client.HoaDon_LoadChiTiet(hd.MaHoaDon);
             uc_SellingInvoiceCreate uc = new uc_SellingInvoiceCreate(hd, false);
             LoadTab("Sửa hoá đơn", uc);
         }
         //Nút xoá
         if (e.ColumnIndex == dgv_DanhSachHoaDon.Columns["Delete"].Index)
         {
             HoaDon hd = new HoaDon();
             hd.MaHoaDon    = dgv_DanhSachHoaDon.CurrentRow.Cells["MaHoaDon"].Value.ToString();
             hd.NhanVien    = dgv_DanhSachHoaDon.CurrentRow.Cells["NhanVien"].Value.ToString();
             hd.KhachHang   = dgv_DanhSachHoaDon.CurrentRow.Cells["KhachHang"].Value.ToString();
             hd.NgayXuat    = Convert.ToDateTime(dgv_DanhSachHoaDon.CurrentRow.Cells["NgayXuat"].Value);
             hd.DonDatHang  = dgv_DanhSachHoaDon.CurrentRow.Cells["DonHang"].Value.ToString();
             hd.TongTien    = Convert.ToDecimal(dgv_DanhSachHoaDon.CurrentRow.Cells["TongTien"].Value);
             hd.DaThanhToan = Convert.ToDecimal(dgv_DanhSachHoaDon.CurrentRow.Cells["DaThanhToan"].Value);
             hd.ConLai      = Convert.ToDecimal(dgv_DanhSachHoaDon.CurrentRow.Cells["ConLai"].Value);
             hd.DSChiTiet   = client.HoaDon_LoadChiTiet(hd.MaHoaDon);
             if (MessageBox.Show("Bạn chắc chắn muốn xoá hoá đơn này", "Thông báo", MessageBoxButtons.OKCancel) == DialogResult.OK)
             {
                 if (client.HoaDon_Delete(hd.MaHoaDon))
                 {
                     MessageBox.Show("Xoá hoá đơn thành công");
                 }
                 else
                 {
                     MessageBox.Show("Xoá hoá đơn thất bại");
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }