Exemple #1
0
 private void SaveBtn_Click(object sender, RoutedEventArgs e)
 {
     if (RecordDateDP.SelectedDate == null || RecordDescriptionTxt.Text == "" || RecordDescriptionTxt.Text == "" || (ApplicantReqRadio.IsChecked == false && CommissionVoteRadio.IsChecked == false))
     {
         ErrorHandler.NotifyUser("برخی از اطلاعات ضروری وارد نشده است");
         return;
     }
     //if(!FilingManager.HasTenderingFile(CurrentTendering.TenderingId, committee, null, null, this.layoutRoot, null, CurrentMeeting.MeetingId)
     //    && !FilingManager.HasTenderingFile(CurrentTendering.TenderingId, applicant, null, null, this.layoutRoot, null, CurrentMeeting.MeetingId))
     //{
     //    ErrorHandler.ShowErrorMessage("بارگذاری فایل درخواست برای ثبت الزامی است.");
     //    return;
     //}
     if (CurrentMeeting.MeetingId == 0)
     {
         try
         {
             CurrentMeeting.MeetingType = (int)MeetingType;
             CurrentMeeting.TenderingId = CurrentTendering.TenderingId;
             DataManagement.CreateMeeting(CurrentMeeting);
             ErrorHandler.NotifyUser(ErrorHandler.ErrorMessages["SuccessfulSave"]);
             MC.IsEnabled   = true;
             MeetingList    = DataManagement.RetrieveMeetings(CurrentTendering, MeetingType);
             MC.ItemsSource = MeetingList;
         }
         catch
         {
             ErrorHandler.NotifyUser(ErrorHandler.ErrorMessages["FailedSave"]);
         }
     }
     else
     {
         try
         {
             DataManagement.UpdateMeeting(CurrentMeeting);
             ErrorHandler.NotifyUser(ErrorHandler.ErrorMessages["SuccessfulSave"]);
             MC.IsEnabled   = true;
             MeetingList    = DataManagement.RetrieveMeetings(CurrentTendering, MeetingType);
             MC.ItemsSource = MeetingList;
         }
         catch
         {
             ErrorHandler.NotifyUser(ErrorHandler.ErrorMessages["FailedSave"]);
         }
     }
 }
 private void SaveBtn_Click_1(object sender, RoutedEventArgs e)
 {
     DataManagement.CreateMeeting(CurrentMeeting);
     DataManagement.UpdateMeetingUserParticipants(dataGrid2.Items.Cast <User>().ToList(), CurrentMeeting);
     DataManagement.UpdateContractoOpenPacket(list);
 }