Пример #1
0
        /// <summary>
        /// Returns a new CommunicationLogDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual CommunicationLogDetails GetCommunicationLogFromReader(DbDataReader reader)
        {
            CommunicationLogDetails communicationLog = new CommunicationLogDetails();

            if (reader.HasRows)
            {
                communicationLog.CommunicationLogId = GetReaderValue_Int32(reader, "CommunicationLogId", 0);                             //From: [Table]
                communicationLog.Notes     = GetReaderValue_String(reader, "Notes", "");                                                 //From: [Table]
                communicationLog.ContactNo = GetReaderValue_NullableInt32(reader, "ContactNo", null);                                    //From: [Table]
                communicationLog.CompanyNo = GetReaderValue_NullableInt32(reader, "CompanyNo", null);                                    //From: [Table]
                communicationLog.Frozen    = GetReaderValue_Boolean(reader, "Frozen", false);                                            //From: [Table]
                communicationLog.UpdatedBy = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);                                    //From: [Table]
                communicationLog.DLUP      = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);                                 //From: [Table]
                communicationLog.LogDate   = GetReaderValue_DateTime(reader, "LogDate", DateTime.MinValue);                              //From: [Table]
                communicationLog.KeyNo     = GetReaderValue_NullableInt32(reader, "KeyNo", null);                                        //From: [Table]
                communicationLog.CommunicationLogTypeNo          = GetReaderValue_NullableInt32(reader, "CommunicationLogTypeNo", null); //From: [Table]
                communicationLog.SystemDocumentNo                = GetReaderValue_NullableInt32(reader, "SystemDocumentNo", null);       //From: [Table]
                communicationLog.DocumentNumber                  = GetReaderValue_NullableInt32(reader, "DocumentNumber", null);         //From: [Table]
                communicationLog.ContactName                     = GetReaderValue_String(reader, "ContactName", "");                     //From: [usp_datalistnugget_CommunicationLog]
                communicationLog.CompanyName                     = GetReaderValue_String(reader, "CompanyName", "");                     //From: [usp_datalistnugget_CommunicationLog]
                communicationLog.CommunicationLogTypeDescription = GetReaderValue_String(reader, "CommunicationLogTypeDescription", ""); //From: [usp_datalistnugget_CommunicationLog]
                communicationLog.EnteredBy = GetReaderValue_String(reader, "EnteredBy", "");                                             //From: [usp_datalistnugget_CommunicationLog]
                communicationLog.RowCnt    = GetReaderValue_NullableInt32(reader, "RowCnt", null);                                       //From: [usp_datalistnugget_CommunicationLog]
            }
            return(communicationLog);
        }
Пример #2
0
 /// <summary>
 /// Get
 /// Calls [usp_select_CommunicationLog]
 /// </summary>
 public static CommunicationLog Get(System.Int32?communicationLogId)
 {
     Rebound.GlobalTrader.DAL.CommunicationLogDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.CommunicationLog.Get(communicationLogId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         CommunicationLog obj = new CommunicationLog();
         obj.CommunicationLogId = objDetails.CommunicationLogId;
         obj.Notes     = objDetails.Notes;
         obj.ContactNo = objDetails.ContactNo;
         obj.CompanyNo = objDetails.CompanyNo;
         obj.Frozen    = objDetails.Frozen;
         obj.UpdatedBy = objDetails.UpdatedBy;
         obj.DLUP      = objDetails.DLUP;
         obj.LogDate   = objDetails.LogDate;
         obj.KeyNo     = objDetails.KeyNo;
         obj.CommunicationLogTypeNo          = objDetails.CommunicationLogTypeNo;
         obj.SystemDocumentNo                = objDetails.SystemDocumentNo;
         obj.DocumentNumber                  = objDetails.DocumentNumber;
         obj.CommunicationLogTypeDescription = objDetails.CommunicationLogTypeDescription;
         obj.ContactName = objDetails.ContactName;
         obj.EnteredBy   = objDetails.EnteredBy;
         objDetails      = null;
         return(obj);
     }
 }