コード例 #1
0
        /// <summary>
        /// Modify Menu
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private 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__CarFuel model = new Common.BLL.Entity.GasStation.Base__CarFuel()
                {
                    id = id
                };

                CarFuelEntryForm form = new CarFuelEntryForm(model);
                if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    reload();
                }
            }
            else
            {
                MessageBox.Show(this, "رکوردی انتخاب نشده است", "اخطار", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
コード例 #2
0
        /// <summary>
        /// Insert Menu
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void insertMenu_Click(object sender, EventArgs e)
        {
            CarFuelEntryForm form = new CarFuelEntryForm();

            if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                reload();
            }
        }