Exemple #1
0
 private void EditSelectedAward()
 {
     if (ctlAwards.SelectedRows.Count > 0)
     {
         Awards    award = (Awards)ctlAwards.SelectedCells[0].OwningRow.DataBoundItem;
         AwardForm form  = new AwardForm(award);
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             award.ID          = form.ID;
             award.Title       = form.Title;
             award.Description = form.Description;
         }
     }
 }
Exemple #2
0
        private void ctlFileInsertAward_Click(object sender, EventArgs e)
        {
            AwardForm NewAwardForm = new AwardForm();

            if (NewAwardForm.ShowDialog(this) == DialogResult.OK)
            {
                awardService.CreateNewAward
                (
                    NewAwardForm.Title,
                    NewAwardForm.Description
                );
            }
            UpdateAwardDataGridView();
        }
Exemple #3
0
        private void RegisterNewAward()
        {
            AwardForm form = new AwardForm();

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                Awards award = new Awards();
                award.ID          = form.ID;
                award.Title       = form.Title;
                award.Description = form.Description;

                _awards.Add(award);
            }
        }