Exemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            OneString_AddEdit ae = new OneString_AddEdit(_dicName);

            if (ae.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                loadData();
            }
        }
Exemplo n.º 2
0
        private void _dgv_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if ((e.ColumnIndex < 0) || (e.RowIndex < 0))
            {
                return;
            }

            int id = 0;

            int.TryParse(_dgv.Rows[e.RowIndex].Cells[0].Value.ToString(), out id);
            string name = _dgv.Rows[e.RowIndex].Cells[1].Value.ToString();

            OneString_AddEdit ae = new OneString_AddEdit(_dicName, id, name);

            if (ae.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                loadData();
            }
        }