Ejemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            int markID = Convert.ToInt32(cbMark.SelectedValue);

            Model model = new Model(markID);
            Model_AddEdit modelAddEdit = new Model_AddEdit(model);

            if (modelAddEdit.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ModelList models = ModelList.getInstance();
                models.Add(model);

                loadModel();
            }
        }
Ejemplo n.º 2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            int markID = Convert.ToInt32(cbMark.SelectedValue);

            Model         model        = new Model(markID);
            Model_AddEdit modelAddEdit = new Model_AddEdit(model);

            if (modelAddEdit.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ModelList models = ModelList.getInstance();
                models.Add(model);

                loadModel();
            }
        }
Ejemplo n.º 3
0
        private void _dgv_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if ((e.ColumnIndex < 0) || (e.RowIndex < 0))
            {
                return;
            }

            int idModel = Convert.ToInt32(_dgv.Rows[e.RowIndex].Cells[0].Value);

            ModelList models = ModelList.getInstance();

            Model_AddEdit aeM = new Model_AddEdit(models.getItem(idModel));

            if (aeM.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                loadModel();
            }
        }
Ejemplo n.º 4
0
        private void _dgv_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if ((e.ColumnIndex < 0) || (e.RowIndex < 0))
                return;

            int idModel = Convert.ToInt32(_dgv.Rows[e.RowIndex].Cells[0].Value);

            ModelList models = ModelList.getInstance();

            Model_AddEdit aeM = new Model_AddEdit(models.getItem(idModel));
            if (aeM.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                loadModel();
            }
        }