示例#1
0
        private void InitComplicatedFilter()
        {
            AuthorsRecords.Clear();

            RuleOrderLine.AuthorsCallByParams
                (_Dir.SelectedDir.DirectionName, _Subj.SelectedSubj.SubName,
                _AuthorStatus.SelectedAuthorStatus.AuthorStatusName, AuthorsRecords);
        }
示例#2
0
 private void AllAuthorsCall()
 {
     using (StudentuConteiner db = new StudentuConteiner())
     {
         try
         {
             var result = db.Authors.
                          Include("Subject")
                          .Include("Direction")
                          .Include("Persone")
                          .Include("AuthorStatus").ToList();
             AuthorsRecord record;
             int           count = result.Count();
             for (int i = 1; i < count; i++)
             {
                 record = new AuthorsRecord
                 {
                     Author   = result[i],
                     Persone  = result[i].Persone,
                     Contacts = result[i].Persone.Contacts
                 };
                 AuthorsRecords.Add(record);
             }
         }
         catch (ArgumentNullException ex)
         {
             dialogService.ShowMessage(ex.Message);
         }
         catch (OverflowException ex)
         {
             dialogService.ShowMessage(ex.Message);
         }
         catch (System.Data.SqlClient.SqlException ex)
         {
             dialogService.ShowMessage(ex.Message);
         }
         catch (System.Data.Entity.Core.EntityCommandExecutionException ex)
         {
             dialogService.ShowMessage(ex.Message);
         }
         catch (System.Data.Entity.Core.EntityException ex)
         {
             dialogService.ShowMessage(ex.Message);
         }
     }
 }