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