예제 #1
0
 private void mnuAddVolunteer_Click(object sender, EventArgs e)
 {
     frmVolunteer fVol = new frmVolunteer(-1);
     if (fVol.ShowDialog() == DialogResult.OK)
     {
         FillData();
     }
 }
예제 #2
0
 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();
     }
 }
예제 #3
0
        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();

            }
        }
예제 #4
0
 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();
     }
 }