private void mnuAddVolunteer_Click(object sender, EventArgs e) { frmVolunteer fVol = new frmVolunteer(-1); if (fVol.ShowDialog() == DialogResult.OK) { FillData(); } }
private void mnuEditVolunteer_Click(object sender, EventArgs e) { if (dgvAvailableVolunteer.SelectedRows.Count > 0) { int pkVolunteer = (int)dgvAvailableVolunteer.SelectedRows[0].Cells["colpkVolunteerAvailable"].Value; frmVolunteer fVol = new frmVolunteer(pkVolunteer); fVol.ShowDialog(); } }
private void btnNewVolunteer_Click(object sender, EventArgs e) { frmVolunteer fVol = new frmVolunteer(-1); if (cboOrganization.SelectedIndex > 0) { fVol.setPkOrganization(CommonFunctions.ComboBoxSelectedIntValue(cboOrganization)); } if (fVol.ShowDialog() == DialogResult.OK) { if (_pkWorkDay == -1) { _pkWorkDay = VmData.SaveWorkDay(_pkWorkDay, (int)cboProject.SelectedValue, WorkDate, "", "", LunchfkOrganization); } VmData.AddVolunteerWorkDay(_pkWorkDay, fVol.pkVolunteer); FillAvailableVolunteerList(); FillSelectedVolunteerList(); } }
private void mnuEditVolunteer_Click(object sender, EventArgs e) { int pkVolunteer = (int)dgvVolunteer.SelectedRows[0].Cells["colpkVolunteer"].Value; frmVolunteer fVol = new frmVolunteer(pkVolunteer); if (fVol.ShowDialog() == DialogResult.OK) { FillData(); } }