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