public UjfMeetingQuestionAddChangeForm(UjfMeetingQuestion q)
 {
     this.InitializeComponent();
     this.set_Font(Manager.WindowFont);
     this.question = q;
     if (!q.IsNew)
     {
         this.tbDecision.set_Text(this.question.Decision);
         this.tbMeetingQuestionName.set_Text(this.question.MeetingQuestionName);
         this.tbText.set_Text(this.question.Text);
     }
 }
Example #2
0
 private void tsbEditQuestion_Click(object sender, System.EventArgs e)
 {
     this.question = this.bsMeetingQuestion.get_Current() as UjfMeetingQuestion;
     if (this.question != null)
     {
         new UjfMeetingQuestionAddChangeForm(this.question).ShowDialog();
         this.UpdateBindingSourceMeetingQuestion();
     }
     else
     {
         System.Windows.Forms.MessageBox.Show("Выберите запись для редактирования");
     }
 }
Example #3
0
 private void tsbDeleteQuestion_Click(object sender, System.EventArgs e)
 {
     this.question = this.bsMeetingQuestion.get_Current() as UjfMeetingQuestion;
     if (this.question != null)
     {
         if (System.Windows.Forms.MessageBox.Show("Вы действительно хотите удалить? ", "Внимание", System.Windows.Forms.MessageBoxButtons.YesNo) != System.Windows.Forms.DialogResult.No)
         {
             this.question.Delete();
             this.question.SaveChanges();
             this.UpdateBindingSourceMeetingQuestion();
             Mappers.UjfApartmentOwnerVotingMapper.DeleteByQuestionId(this.question.Id);
             this.UpdateBindingSourceOwnerVotings();
         }
     }
     else
     {
         System.Windows.Forms.MessageBox.Show("Выберите строку для удаления");
     }
 }
Example #4
0
 private void tsbAddQuestion_Click(object sender, System.EventArgs e)
 {
     this.question = new UjfMeetingQuestion();
     this.question.MeetingId = this.meetingId;
     UjfMeetingQuestionAddChangeForm form = new UjfMeetingQuestionAddChangeForm(this.question);
     form.ShowDialog();
     this.UpdateBindingSourceMeetingQuestion();
     if (form.DialogResult == System.Windows.Forms.DialogResult.OK)
     {
         Mappers.UjfApartmentOwnerVotingMapper.FillUjfApartmentOwnerVotingExec(this.houseId, this.meetingId, this.question.Id);
         this.UpdateBindingSourceOwnerVotings();
     }
 }