예제 #1
0
 public static bool InsertNewAuthor(EAuthors author)
 {
     if (author.FirstName == "" || author.LastName == "")
     {
         return(false);
     }
     else
     {
         DALAuthors.InsertNewAuthor(author);
         return(true);
     }
 }
예제 #2
0
        public static List <EAuthors> GetAll()
        {
            List <EAuthors> authList = new List <EAuthors>();

            authList = DALAuthors.GetAll();
            if (authList != null)
            {
                return(authList);
            }
            else
            {
                return(new List <EAuthors>());
            }
        }
예제 #3
0
        public static List <EAuthors> GetAuthorNames()
        {
            //List<EAuthors> list = new List<EAuthors>();

            //list = DALAuthors.GetAuthorNames();

            //list = (from l in list
            //        where l.FirstName.Contains("Ali")
            //        select l).ToList<EAuthors>();

            ////if (DALAuthors.GetAuthorNames()!= null)
            ////{

            ////}
            return(DALAuthors.GetAuthorNames());
        }
예제 #4
0
 public static bool Delete(EAuthors author)
 {
     DALAuthors.Delete(author);
     return(true);
 }
예제 #5
0
 public static bool Update(EAuthors author)
 {
     DALAuthors.Update(author);
     return(true);
 }
예제 #6
0
 public static EAuthors GetIdOnly(int authorID)
 {
     return(DALAuthors.GetIdOnly(authorID));
 }