private void xemChiTiếtToolStripMenuItem_Click(object sender, EventArgs e) { int id = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colObjectID)); if (id == 0) { return; } if (BaiThucHanh.ID > 0) { BaiThucHanhModel model = (BaiThucHanhModel)BaiThucHanhBO.Instance.FindByPK(id); int version = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colVersion)); frmBaiTHDetail frm = new frmBaiTHDetail(); frm.BaiThucHanh = model; frm.IsShowVersion = true; frm.Version = version; TextUtils.OpenForm(frm); } else { ProductsModel model = (ProductsModel)ProductsBO.Instance.FindByPK(id); int version = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colVersion)); frmProduct frm = new frmProduct(); frm.Product = model; frm.IsShowVersion = true; frm.Version = version; TextUtils.OpenForm(frm); } }
private void btnAdd_Click(object sender, EventArgs e) { frmProduct frm = new frmProduct(); frm.GroupID = TextUtils.ToInt(treeData.FocusedNode.GetValue(colIDTree)); if (frm.ShowDialog() == DialogResult.OK) { loadGrid(true); } }
private void btnEdit_Click(object sender, EventArgs e) { int id = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)); if (id == 0) { return; } ProductsModel model = (ProductsModel)ProductsBO.Instance.FindByPK(id); _rownIndex = grvData.FocusedRowHandle; frmProduct frm = new frmProduct(); frm.Product = model; if (frm.ShowDialog() == DialogResult.OK) { loadGrid(true); } }
private void btnArea_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frmProduct frm = new frmProduct(); TextUtils.OpenChildForm(frm, this); }