private void BtnAddOrgan_Click(object sender, EventArgs e) { FmSalaryRanageFormula fm = new FmSalaryRanageFormula(); fm.SelectValue += (obj) => { SalaryRanageFormula info = obj as SalaryRanageFormula; mDataGridOrgan.AddItem <SalaryRanageFormula>(info); }; fm.ShowDialog(); }
private void BtnEditOrgan_Click(object sender, EventArgs e) { if (mDataGridOrgan.CurrentRow == null) { return; } SalaryRanageFormula old = mDataGridOrgan.GetCurrentEntity() as SalaryRanageFormula; FmSalaryRanageFormula fm = new FmSalaryRanageFormula(old); fm.SelectValue += (obj) => { SalaryRanageFormula info = obj as SalaryRanageFormula; mDataGridOrgan.EditCurrentItem <SalaryRanageFormula>(info); }; fm.ShowDialog(); }