/// <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__CarSystem model = new Common.BLL.Entity.GasStation.Base__CarSystem() { id = id }; CarSystemEntryForm form = new CarSystemEntryForm(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) { CarSystemEntryForm form = new CarSystemEntryForm(); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { reload(); } }