public Form_ChiTietHoaDon(int maHDInput) { InitializeComponent(); Current = this; this.maHD = maHDInput; this.hoaDon = hd.getHDByMaHD(maHDInput); }
private void dtGridHDNgay_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (dtGridHDNgay.Rows[e.RowIndex].Cells[e.ColumnIndex] is DataGridViewLinkCell) { try { int maHD = Convert.ToInt32(dtGridHDNgay.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString()); Form_ChiTietHoaDon frm = new Form_ChiTietHoaDon(maHD); frm.Show(); this.Hide(); } catch (Exception ex) { MessageBox.Show("Mã hóa đơn không hợp lệ"); } } }
public Form_ChiTietHoaDon() { InitializeComponent(); Current = this; }