Esempio n. 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            YearlyHolidayAddEditDialog add_form = new YearlyHolidayAddEditDialog(this.main_form);

            if (add_form.ShowDialog() == DialogResult.OK)
            {
                if (CreateHolidayNote(add_form.note_calendar) == true)
                {
                    this.bs.ResetBindings(true);
                    this.bs.DataSource = GetNoteCalendarList(this.current_year).ToHolidayViewModel();
                    this.calendar.RefreshAtDate(add_form.note_calendar._Date);
                }
            }
        }
Esempio n. 2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            NoteCalendar note_calendar           = (NoteCalendar)this.dgv.Rows[this.dgv.CurrentCell.RowIndex].Cells["colNoteCalendar"].Value;
            YearlyHolidayAddEditDialog edit_form = new YearlyHolidayAddEditDialog(this.main_form, note_calendar);

            if (edit_form.ShowDialog() == DialogResult.OK)
            {
                if (UpdateHolidayNote(edit_form.note_calendar) == true)
                {
                    this.bs.ResetBindings(true);
                    this.bs.DataSource = GetNoteCalendarList(this.current_year).ToHolidayViewModel();
                    this.calendar.RefreshAtDate(edit_form.note_calendar._Date);
                }
            }
        }
Esempio n. 3
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     NoteCalendar note_calendar = (NoteCalendar)this.dgv.Rows[this.dgv.CurrentCell.RowIndex].Cells["colNoteCalendar"].Value;
     YearlyHolidayAddEditDialog edit_form = new YearlyHolidayAddEditDialog(this.main_form, note_calendar);
     if (edit_form.ShowDialog() == DialogResult.OK)
     {
         if (UpdateHolidayNote(edit_form.note_calendar) == true)
         {
             this.bs.ResetBindings(true);
             this.bs.DataSource = GetNoteCalendarList(this.current_year).ToHolidayViewModel();
             this.calendar.RefreshAtDate(edit_form.note_calendar._Date);
         }
     }
 }
Esempio n. 4
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     YearlyHolidayAddEditDialog add_form = new YearlyHolidayAddEditDialog(this.main_form);
     if (add_form.ShowDialog() == DialogResult.OK)
     {
         if (CreateHolidayNote(add_form.note_calendar) == true)
         {
             this.bs.ResetBindings(true);
             this.bs.DataSource = GetNoteCalendarList(this.current_year).ToHolidayViewModel();
             this.calendar.RefreshAtDate(add_form.note_calendar._Date);
         }
     }
 }