Exemple #1
0
 public Author GetAuthorByID(int authorID)
 {
     try
     {
         Author author = AuthorAccessor.FetchAuthorByID(authorID);
         return(author);
     }
     catch (Exception)
     {
         throw new ApplicationException("Author not found");
     }
 }
Exemple #2
0
        public bool DeleteAuthor(Author author, bool toRestore)
        {
            try
            {
                if (AuthorAccessor.InactivateAuthor(author, toRestore))
                {
                    return(true);
                }
            }
            catch (Exception)
            {
                throw;
            }

            return(false);
        }
Exemple #3
0
        public bool EditAuthor(Author author)
        {
            try
            {
                if (AuthorAccessor.UpdateAuthor(author))
                {
                    return(true);
                }
            }
            catch (Exception)
            {
                throw;
            }

            return(false);
        }
Exemple #4
0
        public bool AddNewAuthor(Author author)
        {
            try
            {
                if (AuthorAccessor.InsertAuthor(author))
                {
                    return(true);
                }
            }
            catch (Exception)
            {
                throw;
            }

            return(false);
        }
Exemple #5
0
        public List <Author> GetAuthorList(Active group)
        {
            try
            {
                List <Author> authorList = AuthorAccessor.FetchAuthorList(group);

                if (authorList.Count > 0)
                {
                    return(authorList);
                }
                else
                {
                    throw new ApplicationException("There were no records found.");
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemple #6
0
 public DataManager(AOTFilterAccessor aotFA, AuthorAccessor AA, CameraAccessor CA, dSTORMInfoAccessor DSIA, ExperimentAccessor EA,
                    FinalImageAccessor FIA, FluorophoreAccessor FA, FluorophoreResearchObjectAccessor FROA, InitialVideoAccessor IVA, LaserAccessor LA,
                    MicroscopeAccessor MA, ObjectiveAccessor OA, PhysicalPropertiesAccessor PPA, ResearchObjectAccessor ROA, SetupAccessor SA, VideoFragmentAccessor VFA
                    )
 {
     AOTFilterAccessor   = aotFA;
     AuthorAccessor      = AA;
     CameraAccessor      = CA;
     dSTORMInfoAccessor  = DSIA;
     ExperimentAccessor  = EA;
     FinalImageAccessor  = FIA;
     FluorophoreAccessor = FA;
     FluorophoreResearchObjectAccessor = FROA;
     InitialVideoAccessor       = IVA;
     LaserAccessor              = LA;
     MicroscopeAccessor         = MA;
     ObjectiveAccessor          = OA;
     PhysicalPropertiesAccessor = PPA;
     ResearchObjectAccessor     = ROA;
     SetupAccessor              = SA;
     VideoFragmentAccessor      = VFA;
 }