private void BtnAddCal_Click(object sender, EventArgs e) { FmVarCal fm = new FmVarCal(); fm.SelectValue += (obj) => { VarCal info = obj as VarCal; mDataGridCal.AddItem <VarCal>(info); }; fm.ShowDialog(); }
private void BtnEditCal_Click(object sender, EventArgs e) { if (mDataGridCal.CurrentRow == null) { return; } VarCal old = mDataGridCal.GetCurrentEntity() as VarCal; FmVarCal fm = new FmVarCal(old); fm.SelectValue += (obj) => { VarCal info = obj as VarCal; mDataGridCal.EditCurrentItem <VarCal>(info); }; fm.ShowDialog(); }