Exemplo n.º 1
0
        private void btnUtenza_Click(object sender, EventArgs e)
        {
            FormUser frm = new FormUser(null);

            frm.ShowDialog();
            LoadGridUtenze();
        }
Exemplo n.º 2
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridView1.Columns[e.ColumnIndex].Name != "Name")
            {
                return;
            }

            int?intKey = null;

            if (dataTable.Rows.Count != dataGridView1.Rows[e.RowIndex].Index)
            {
                DataRow row = dataTable.Rows[e.RowIndex];
                if (row != null)
                {
                    int outIntKey;
                    if (int.TryParse(row.ItemArray[0].ToString(), out outIntKey))
                    {
                        intKey = outIntKey;
                    }
                }
            }
            FormUser frm = new FormUser(intKey);

            frm.ShowDialog();
            LoadGridUtenze();
        }
Exemplo n.º 3
0
        private void toolStripViewUte_Click(object sender, EventArgs e)
        {
            if (dataTable.Rows.Count == 0)
            {
                return;
            }

            DataRow row = dataTable.Rows[rowIndex];

            if (row != null)
            {
                int res;
                if (int.TryParse(row.ItemArray[0].ToString(), out res))
                {
                    FormUser frm = new FormUser(res);
                    frm.ShowDialog();
                    LoadGridUtenze();
                }
            }
        }