private void btnInStore_Click(object sender, EventArgs e) { FrmEPCCard_Oper frm = new FrmEPCCard_Oper(); frm.ShowDialog(); BindData(); }
private void btnAdd_Click(object sender, EventArgs e) { FrmEPCCard_Oper frmEdit = new FrmEPCCard_Oper(Guid.NewGuid().ToString(), eEditMode.新增); if (frmEdit.ShowDialog() == DialogResult.OK) { BindData(); } }
private void BtnAdd_Click(object sender, EventArgs e) { FrmEPCCard_Oper frmEdit = new FrmEPCCard_Oper(String.Empty, true); if (frmEdit.ShowDialog() == DialogResult.OK) { BindData(); } }
private void superGridControl1_CellMouseDown(object sender, DevComponents.DotNetBar.SuperGrid.GridCellMouseEventArgs e) { CmcsEPCCard entity = Dbers.GetInstance().SelfDber.Get <CmcsEPCCard>(superGridControl1.PrimaryGrid.GetCell(e.GridCell.GridRow.Index, superGridControl1.PrimaryGrid.Columns["clmId"].ColumnIndex).Value.ToString()); switch (superGridControl1.PrimaryGrid.Columns[e.GridCell.ColumnIndex].Name) { case "clmShow": FrmEPCCard_Oper frmShow = new FrmEPCCard_Oper(entity.Id, eEditMode.查看); if (frmShow.ShowDialog() == DialogResult.OK) { BindData(); } break; case "clmEdit": FrmEPCCard_Oper frmEdit = new FrmEPCCard_Oper(entity.Id, eEditMode.修改); if (frmEdit.ShowDialog() == DialogResult.OK) { BindData(); } break; case "clmDelete": // 查询正在使用该标签卡的车数 if (MessageBoxEx.Show("确定要删除该标签卡?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { try { Dbers.GetInstance().SelfDber.Delete <CmcsEPCCard>(entity.Id); } catch (Exception) { MessageBoxEx.Show("该标签卡正在使用中,禁止删除!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } BindData(); } break; } }