private void barButtonItem10_ItemClick(object sender, ItemClickEventArgs e) { AddhangHoa addhangHoa = new AddhangHoa(); addhangHoa.MdiParent = this; addhangHoa.Show(); }
private void btnAdd_Click(object sender, EventArgs e) { AddhangHoa addhangHoa = new AddhangHoa(); addhangHoa.MdiParent = this.MdiParent; addhangHoa.WindowState = FormWindowState.Normal; addhangHoa.Show(); }
private void simpleButton2_Click(object sender, EventArgs e) { var selected = gvDSHang.GetFocusedRow() as dynamic; if (selected != null) { string id = selected.MA_HANG.ToString(); DM_HANG hang = dbContext.DM_HANG.FirstOrDefault(x => x.MA_HANG == id); if (hang != null) { AddhangHoa addhangHoa = new AddhangHoa(hang, false); addhangHoa.Show(); } else { XtraMessageBox.Show("Mã hàng không tồn tại!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { XtraMessageBox.Show("Chọn MỘT hàng để xem chi tiết!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } }