Exemple #1
0
 public CallRecordEntity(Billing.Models.CallRecord CallRecord)
 {
     this.Id                     = CallRecord.Id;
     this.Month                  = (int)CallRecord.Month;
     this.Year                   = (int)CallRecord.Year;
     this.Duration               = (int)CallRecord.Duration;
     this.CallingPartyNumber     = (int)CallRecord.CallingPartyNumber;
     this.Charge                 = (int)CallRecord.Charge;
     this.DirectoryNumber        = (int)CallRecord.DirectoryNumber;
     this.AuthCodeDescription    = CallRecord.AuthCodeDescription;
     this.FinalCalledPartyNumber = CallRecord.FinalCalledPartyNumber;
     this.DateTimeConnect        = ConvertFromUnixTimestamp((int)CallRecord.DateTimeConnect);
     this.DataTimeDisconnect     = ConvertFromUnixTimestamp((int)CallRecord.DataTimeDisconnect);
     this.Owner                  = CallRecord.Owner;
     this.Department             = CallRecord.Department;
     this.Company                = CallRecord.Company;
 }
Exemple #2
0
 public Billing.Models.CallRecord ToModel(int Id)
 {
     Billing.Models.CallRecord CallRecord = new Billing.Models.CallRecord();
     this.Id                           = Id;
     CallRecord.Id                     = Id;
     CallRecord.Month                  = this.Month;
     CallRecord.Year                   = this.Year;
     CallRecord.Duration               = this.Duration;
     CallRecord.CallingPartyNumber     = this.CallingPartyNumber;
     CallRecord.Charge                 = this.Charge;
     CallRecord.DirectoryNumber        = this.DirectoryNumber;
     CallRecord.AuthCodeDescription    = this.AuthCodeDescription;
     CallRecord.FinalCalledPartyNumber = this.FinalCalledPartyNumber;
     CallRecord.DateTimeConnect        = (int)ConvertToUnixTimestamp(this.DateTimeConnect);
     CallRecord.DataTimeDisconnect     = (int)ConvertToUnixTimestamp(this.DataTimeDisconnect);
     CallRecord.Owner                  = this.Owner;
     CallRecord.Department             = this.Department;
     CallRecord.Company                = this.Company;
     return(CallRecord);
 }