예제 #1
0
파일: KLBook.cs 프로젝트: sang-nm/kinhluan
        private static List <KLBook> LoadListFromReader(IDataReader reader)
        {
            List <KLBook> KLBookList = new List <KLBook>();

            try
            {
                while (reader.Read())
                {
                    KLBook KLBook = new KLBook();
                    KLBook.bookID      = Convert.ToInt32(reader["BookID"]);
                    KLBook.authorID    = Convert.ToInt32(reader["AuthorID"]);
                    KLBook.title       = reader["Title"].ToString();
                    KLBook.image       = reader["Image"].ToString();
                    KLBook.url         = reader["Url"].ToString();
                    KLBook.description = reader["Description"].ToString();
                    KLBook.isPublish   = Convert.ToBoolean(reader["IsPublish"]);
                    KLBook.isDelected  = Convert.ToBoolean(reader["IsDelected"]);
                    KLBookList.Add(KLBook);
                }
            }
            finally
            {
                reader.Close();
            }

            return(KLBookList);
        }
예제 #2
0
파일: KLBook.cs 프로젝트: sang-nm/kinhluan
 /// <summary>
 /// Compares 2 instances of KLBook.
 /// </summary>
 public static int CompareByDescription(KLBook KLBook1, KLBook KLBook2)
 {
     return(KLBook1.Description.CompareTo(KLBook2.Description));
 }
예제 #3
0
파일: KLBook.cs 프로젝트: sang-nm/kinhluan
 /// <summary>
 /// Compares 2 instances of KLBook.
 /// </summary>
 public static int CompareByUrl(KLBook KLBook1, KLBook KLBook2)
 {
     return(KLBook1.Url.CompareTo(KLBook2.Url));
 }
예제 #4
0
파일: KLBook.cs 프로젝트: sang-nm/kinhluan
 /// <summary>
 /// Compares 2 instances of KLBook.
 /// </summary>
 public static int CompareByImage(KLBook KLBook1, KLBook KLBook2)
 {
     return(KLBook1.Image.CompareTo(KLBook2.Image));
 }
예제 #5
0
파일: KLBook.cs 프로젝트: sang-nm/kinhluan
 /// <summary>
 /// Compares 2 instances of KLBook.
 /// </summary>
 public static int CompareByTitle(KLBook KLBook1, KLBook KLBook2)
 {
     return(KLBook1.Title.CompareTo(KLBook2.Title));
 }
예제 #6
0
파일: KLBook.cs 프로젝트: sang-nm/kinhluan
 /// <summary>
 /// Compares 2 instances of KLBook.
 /// </summary>
 public static int CompareByAuthorID(KLBook KLBook1, KLBook KLBook2)
 {
     return(KLBook1.AuthorID.CompareTo(KLBook2.AuthorID));
 }
예제 #7
0
파일: KLBook.cs 프로젝트: sang-nm/kinhluan
 /// <summary>
 /// Compares 2 instances of KLBook.
 /// </summary>
 public static int CompareByBookID(KLBook KLBook1, KLBook KLBook2)
 {
     return(KLBook1.BookID.CompareTo(KLBook2.BookID));
 }