/// <summary> /// Modify menu /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void modifyMenu_Click(object sender, EventArgs e) { if (null != resultGrid.CurrentRow) { int id; // Get id id = Convert.ToInt32(resultGrid.CurrentRow.Cells["id"].Value); Common.BLL.Entity.GasStation.Base__CarLevel model = new Common.BLL.Entity.GasStation.Base__CarLevel() { id = id }; CarLevelEntryForm form = new CarLevelEntryForm(model); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { reload(); } } else { MessageBox.Show("رکوردی انتخاب نشده است", "اخطار", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
/// <summary> /// Insert Menu /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void insertMenu_Click(object sender, EventArgs e) { CarLevelEntryForm form = new CarLevelEntryForm(); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { reload(); } }