Example #1
0
        /// <summary>
        /// Returns a new ToDoDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual ToDoDetails GetToDoFromReader(DbDataReader reader)
        {
            ToDoDetails toDo = new ToDoDetails();

            if (reader.HasRows)
            {
                toDo.ToDoId                  = GetReaderValue_Int32(reader, "ToDoId", 0);                          //From: [Table]
                toDo.LoginNo                 = GetReaderValue_NullableInt32(reader, "LoginNo", null);              //From: [Table]
                toDo.Subject                 = GetReaderValue_String(reader, "Subject", "");                       //From: [Table]
                toDo.DateAdded               = GetReaderValue_NullableDateTime(reader, "DateAdded", null);         //From: [Table]
                toDo.DueDate                 = GetReaderValue_NullableDateTime(reader, "DueDate", null);           //From: [Table]
                toDo.ToDoText                = GetReaderValue_String(reader, "ToDoText", "");                      //From: [Table]
                toDo.Priority                = GetReaderValue_NullableInt32(reader, "Priority", null);             //From: [Table]
                toDo.IsComplete              = GetReaderValue_Boolean(reader, "IsComplete", false);                //From: [Table]
                toDo.ReminderDate            = GetReaderValue_NullableDateTime(reader, "ReminderDate", null);      //From: [Table]
                toDo.ReminderText            = GetReaderValue_String(reader, "ReminderText", "");                  //From: [Table]
                toDo.CompanyNo               = GetReaderValue_NullableInt32(reader, "CompanyNo", null);            //From: [usp_list_Activity_by_Client_with_filter]
                toDo.ReminderHasBeenNotified = GetReaderValue_Boolean(reader, "ReminderHasBeenNotified", false);   //From: [Table]
                toDo.RelatedMailMessageNo    = GetReaderValue_NullableInt32(reader, "RelatedMailMessageNo", null); //From: [Table]
                toDo.UpdatedBy               = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);            //From: [Table]
                toDo.DLUP      = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);                       //From: [Table]
                toDo.LoginName = GetReaderValue_String(reader, "LoginName", "");                                   //From: [Table]
            }
            return(toDo);
        }
Example #2
0
 /// <summary>
 /// Get
 /// Calls [usp_select_ToDo]
 /// </summary>
 public static ToDo Get(System.Int32?toDoId)
 {
     Rebound.GlobalTrader.DAL.ToDoDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.ToDo.Get(toDoId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         ToDo obj = new ToDo();
         obj.LoginName               = objDetails.LoginName;
         obj.ToDoId                  = objDetails.ToDoId;
         obj.LoginNo                 = objDetails.LoginNo;
         obj.Subject                 = objDetails.Subject;
         obj.DateAdded               = objDetails.DateAdded;
         obj.DueDate                 = objDetails.DueDate;
         obj.ToDoText                = objDetails.ToDoText;
         obj.Priority                = objDetails.Priority;
         obj.IsComplete              = objDetails.IsComplete;
         obj.ReminderDate            = objDetails.ReminderDate;
         obj.ReminderText            = objDetails.ReminderText;
         obj.CompanyNo               = objDetails.CompanyNo;
         obj.ReminderHasBeenNotified = objDetails.ReminderHasBeenNotified;
         obj.RelatedMailMessageNo    = objDetails.RelatedMailMessageNo;
         obj.UpdatedBy               = objDetails.UpdatedBy;
         obj.DLUP   = objDetails.DLUP;
         objDetails = null;
         return(obj);
     }
 }