예제 #1
0
        private static List <KLNotify> LoadListFromReader(IDataReader reader)
        {
            List <KLNotify> kLNotifyList = new List <KLNotify>();

            try
            {
                while (reader.Read())
                {
                    KLNotify kLNotify = new KLNotify();
                    kLNotify.notifyid        = Convert.ToInt32(reader["Notifyid"]);
                    kLNotify.userName_Action = reader["UserName_Action"].ToString();
                    kLNotify.authorID        = Convert.ToInt32(reader["AuthorID"]);
                    kLNotify.notifyType      = reader["NotifyType"].ToString();
                    kLNotify.notify          = reader["Notify"].ToString();
                    kLNotify.notifyLink      = reader["NotifyLink"].ToString();
                    kLNotify.viewed          = Convert.ToBoolean(reader["viewed"]);
                    kLNotify.dateCreate      = Convert.ToDateTime(reader["DateCreate"]);
                    kLNotifyList.Add(kLNotify);
                }
            }
            finally
            {
                reader.Close();
            }

            return(kLNotifyList);
        }
예제 #2
0
 /// <summary>
 /// Compares 2 instances of KLNotify.
 /// </summary>
 public static int CompareByDateCreate(KLNotify kLNotify1, KLNotify kLNotify2)
 {
     return(kLNotify1.DateCreate.CompareTo(kLNotify2.DateCreate));
 }
예제 #3
0
 /// <summary>
 /// Compares 2 instances of KLNotify.
 /// </summary>
 public static int CompareByNotifyLink(KLNotify kLNotify1, KLNotify kLNotify2)
 {
     return(kLNotify1.NotifyLink.CompareTo(kLNotify2.NotifyLink));
 }
예제 #4
0
 /// <summary>
 /// Compares 2 instances of KLNotify.
 /// </summary>
 public static int CompareByNotify(KLNotify kLNotify1, KLNotify kLNotify2)
 {
     return(kLNotify1.Notify.CompareTo(kLNotify2.Notify));
 }
예제 #5
0
 /// <summary>
 /// Compares 2 instances of KLNotify.
 /// </summary>
 public static int CompareByNotifyType(KLNotify kLNotify1, KLNotify kLNotify2)
 {
     return(kLNotify1.NotifyType.CompareTo(kLNotify2.NotifyType));
 }
예제 #6
0
 /// <summary>
 /// Compares 2 instances of KLNotify.
 /// </summary>
 public static int CompareByAuthorID(KLNotify kLNotify1, KLNotify kLNotify2)
 {
     return(kLNotify1.AuthorID.CompareTo(kLNotify2.AuthorID));
 }
예제 #7
0
 /// <summary>
 /// Compares 2 instances of KLNotify.
 /// </summary>
 public static int CompareByUserName_Action(KLNotify kLNotify1, KLNotify kLNotify2)
 {
     return(kLNotify1.UserName_Action.CompareTo(kLNotify2.UserName_Action));
 }