コード例 #1
0
        private void btnAccept_Click(object sender, EventArgs e)
        {
            BLAdmin bl = new BLAdmin();

            if (gridRequests.SelectedRows[0] != null)
            {
                DataGridViewRow row = gridRequests.SelectedRows[0];
                bl.AcceptRequest(Convert.ToInt32(row.Cells["ExternalId"].Value), Convert.ToInt32(row.Cells["StudentId"].Value));
                MessageBox.Show("Cererea a fost acceptata!", "Succes", MessageBoxButtons.OK, MessageBoxIcon.Information);
                DataTable requestsTable = bl.GetRequests();
                gridRequests.DataSource = requestsTable;
            }
            else
            {
                MessageBox.Show("Alegeti cererea pe care doriti sa o aprobati!", "Atentie", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }