Exemple #1
0
        private void btnInfoDetails_Click(object sender, EventArgs e)
        {
            int              infoIndex = dgvInfoTable.CurrentCell.RowIndex;
            InfoEntity       info      = AllInfos.ElementAt(infoIndex);
            CRUD_Information crudInfo  = new CRUD_Information(info, login.Id);

            crudInfo.makeReadOnly();
            crudInfo.Show();
        }
Exemple #2
0
        private void btnInfoAdd_Click(object sender, EventArgs e)
        {
            InfoEntity       info     = new InfoEntity();
            CRUD_Information crudInfo = new CRUD_Information(info, login.Id);

            crudInfo.ShowDialog();
            if (crudInfo.DialogResult == DialogResult.OK)
            {
                AllInfos.Add(info);
                dgvInfoTable.Invalidate();
            }
        }
Exemple #3
0
        private void btnInfoEdit_Click(object sender, EventArgs e)
        {
            int        infoIndex = dgvInfoTable.CurrentCell.RowIndex;
            InfoEntity info      = AllInfos.ElementAt(infoIndex);

            CRUD_Information crudInfo = new CRUD_Information(info, login.Id);

            crudInfo.editing = true;
            crudInfo.ShowDialog();

            if (crudInfo.DialogResult == DialogResult.OK)
            {
                dgvInfoTable.InvalidateRow(infoIndex);
            }
        }