private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { HangHoaDTO hang = new HangHoaDTO(); DataGridViewRow row = this.dataGridView1.Rows[e.RowIndex]; hang.MAHANGHOA = row.Cells[0].Value.ToString(); hang.TEN = row.Cells[1].Value.ToString(); hang.SOLUONG = row.Cells[2].Value.ToString(); hang.GIA = row.Cells[3].Value.ToString(); /* hang.Mota = row.Cells[4].Value.ToString();*/ Pbhtt.Sender(hang); this.Hide(); Pbhtt.Show(); }
private void sua_btn_Click(object sender, EventArgs e) { if (loai == "Hợp đồng") { PBHHD pbhhd = new PBHHD(this); pbhhd.loadEdit(busHangHoa.selectHopDong(dtoDonHang)); pbhhd.Show(); } else if (loai == "Cá Nhân") { PBHTT pbhhd = new PBHTT(this); pbhhd.loadEdit(busHangHoa.selectCaNhan(dtoDonHang)); pbhhd.Show(); } }
private void them_btn_Click(object sender, EventArgs e) { PBHTT pbhtt = new PBHTT(this); pbhtt.Show(); }