Advertisement
Guest User

Untitled

a guest
Mar 31st, 2010
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 15.81 KB | None | 0 0
  1. namespace DataAccess
  2. {
  3.     public partial class Call: INotifyPropertyChanging, INotifyPropertyChanged
  4.     {
  5.         partial void OnLoaded();
  6.         partial void OnValidate(System.Data.Linq.ChangeAction action);
  7.         partial void OnCreated();
  8.        
  9.         public Call(){
  10.             OnCreated();
  11.         }
  12.        
  13.         #region Properties
  14.        
  15.         partial void OnIDChanging(long value);
  16.         partial void OnIDChanged();
  17.        
  18.         private long _ID;
  19.         public long ID {
  20.             get{
  21.                 return _ID;
  22.             }
  23.             set{
  24.                 this.OnIDChanging(value);
  25.                 this.SendPropertyChanging();
  26.                 this._ID = value;
  27.                 this.SendPropertyChanged("ID");
  28.                 this.OnIDChanged();
  29.             }
  30.         }
  31.        
  32.         partial void OnCallIDChanging(int? value);
  33.         partial void OnCallIDChanged();
  34.        
  35.         private int? _CallID;
  36.         public int? CallID {
  37.             get{
  38.                 return _CallID;
  39.             }
  40.             set{
  41.                 this.OnCallIDChanging(value);
  42.                 this.SendPropertyChanging();
  43.                 this._CallID = value;
  44.                 this.SendPropertyChanged("CallID");
  45.                 this.OnCallIDChanged();
  46.             }
  47.         }
  48.        
  49.         partial void OnSIPCallIdChanging(string value);
  50.         partial void OnSIPCallIdChanged();
  51.        
  52.         private string _SIPCallId;
  53.         public string SIPCallId {
  54.             get{
  55.                 return _SIPCallId;
  56.             }
  57.             set{
  58.                 this.OnSIPCallIdChanging(value);
  59.                 this.SendPropertyChanging();
  60.                 this._SIPCallId = value;
  61.                 this.SendPropertyChanged("SIPCallId");
  62.                 this.OnSIPCallIdChanged();
  63.             }
  64.         }
  65.        
  66.         partial void OnStartTimeChanging(DateTime value);
  67.         partial void OnStartTimeChanged();
  68.        
  69.         private DateTime _StartTime;
  70.         public DateTime StartTime {
  71.             get{
  72.                 return _StartTime;
  73.             }
  74.             set{
  75.                 this.OnStartTimeChanging(value);
  76.                 this.SendPropertyChanging();
  77.                 this._StartTime = value;
  78.                 this.SendPropertyChanged("StartTime");
  79.                 this.OnStartTimeChanged();
  80.             }
  81.         }
  82.        
  83.         partial void OnStartTimeMSChanging(int value);
  84.         partial void OnStartTimeMSChanged();
  85.        
  86.         private int _StartTimeMS;
  87.         public int StartTimeMS {
  88.             get{
  89.                 return _StartTimeMS;
  90.             }
  91.             set{
  92.                 this.OnStartTimeMSChanging(value);
  93.                 this.SendPropertyChanging();
  94.                 this._StartTimeMS = value;
  95.                 this.SendPropertyChanged("StartTimeMS");
  96.                 this.OnStartTimeMSChanged();
  97.             }
  98.         }
  99.        
  100.         partial void OnEndTimeChanging(DateTime? value);
  101.         partial void OnEndTimeChanged();
  102.        
  103.         private DateTime? _EndTime;
  104.         public DateTime? EndTime {
  105.             get{
  106.                 return _EndTime;
  107.             }
  108.             set{
  109.                 this.OnEndTimeChanging(value);
  110.                 this.SendPropertyChanging();
  111.                 this._EndTime = value;
  112.                 this.SendPropertyChanged("EndTime");
  113.                 this.OnEndTimeChanged();
  114.             }
  115.         }
  116.        
  117.         partial void OnEndTimeMSChanging(int? value);
  118.         partial void OnEndTimeMSChanged();
  119.        
  120.         private int? _EndTimeMS;
  121.         public int? EndTimeMS {
  122.             get{
  123.                 return _EndTimeMS;
  124.             }
  125.             set{
  126.                 this.OnEndTimeMSChanging(value);
  127.                 this.SendPropertyChanging();
  128.                 this._EndTimeMS = value;
  129.                 this.SendPropertyChanged("EndTimeMS");
  130.                 this.OnEndTimeMSChanged();
  131.             }
  132.         }
  133.        
  134.         partial void OnCallNoteChanging(string value);
  135.         partial void OnCallNoteChanged();
  136.        
  137.         private string _CallNote;
  138.         public string CallNote {
  139.             get{
  140.                 return _CallNote;
  141.             }
  142.             set{
  143.                 this.OnCallNoteChanging(value);
  144.                 this.SendPropertyChanging();
  145.                 this._CallNote = value;
  146.                 this.SendPropertyChanged("CallNote");
  147.                 this.OnCallNoteChanged();
  148.             }
  149.         }
  150.        
  151.         partial void OnBillingCodeChanging(string value);
  152.         partial void OnBillingCodeChanged();
  153.        
  154.         private string _BillingCode;
  155.         public string BillingCode {
  156.             get{
  157.                 return _BillingCode;
  158.             }
  159.             set{
  160.                 this.OnBillingCodeChanging(value);
  161.                 this.SendPropertyChanging();
  162.                 this._BillingCode = value;
  163.                 this.SendPropertyChanged("BillingCode");
  164.                 this.OnBillingCodeChanged();
  165.             }
  166.         }
  167.        
  168.         partial void OnFriendlyBillingCodeChanging(string value);
  169.         partial void OnFriendlyBillingCodeChanged();
  170.        
  171.         private string _FriendlyBillingCode;
  172.         public string FriendlyBillingCode {
  173.             get{
  174.                 return _FriendlyBillingCode;
  175.             }
  176.             set{
  177.                 this.OnFriendlyBillingCodeChanging(value);
  178.                 this.SendPropertyChanging();
  179.                 this._FriendlyBillingCode = value;
  180.                 this.SendPropertyChanged("FriendlyBillingCode");
  181.                 this.OnFriendlyBillingCodeChanged();
  182.             }
  183.         }
  184.        
  185.         partial void OnLockedChanging(bool? value);
  186.         partial void OnLockedChanged();
  187.        
  188.         private bool? _Locked;
  189.         public bool? Locked {
  190.             get{
  191.                 return _Locked;
  192.             }
  193.             set{
  194.                 this.OnLockedChanging(value);
  195.                 this.SendPropertyChanging();
  196.                 this._Locked = value;
  197.                 this.SendPropertyChanged("Locked");
  198.                 this.OnLockedChanged();
  199.             }
  200.         }
  201.        
  202.         partial void OnExtensionChanging(string value);
  203.         partial void OnExtensionChanged();
  204.        
  205.         private string _Extension;
  206.         public string Extension {
  207.             get{
  208.                 return _Extension;
  209.             }
  210.             set{
  211.                 this.OnExtensionChanging(value);
  212.                 this.SendPropertyChanging();
  213.                 this._Extension = value;
  214.                 this.SendPropertyChanged("Extension");
  215.                 this.OnExtensionChanged();
  216.             }
  217.         }
  218.        
  219.         partial void OnDurationChanging(DateTime? value);
  220.         partial void OnDurationChanged();
  221.        
  222.         private DateTime? _Duration;
  223.         public DateTime? Duration {
  224.             get{
  225.                 return _Duration;
  226.             }
  227.             set{
  228.                 this.OnDurationChanging(value);
  229.                 this.SendPropertyChanging();
  230.                 this._Duration = value;
  231.                 this.SendPropertyChanged("Duration");
  232.                 this.OnDurationChanged();
  233.             }
  234.         }
  235.        
  236.         partial void OnCallTypeChanging(short value);
  237.         partial void OnCallTypeChanged();
  238.        
  239.         private short _CallType;
  240.         public short CallType {
  241.             get{
  242.                 return _CallType;
  243.             }
  244.             set{
  245.                 this.OnCallTypeChanging(value);
  246.                 this.SendPropertyChanging();
  247.                 this._CallType = value;
  248.                 this.SendPropertyChanged("CallType");
  249.                 this.OnCallTypeChanged();
  250.             }
  251.         }
  252.        
  253.         partial void OnWorkgroupCallChanging(bool? value);
  254.         partial void OnWorkgroupCallChanged();
  255.        
  256.         private bool? _WorkgroupCall;
  257.         public bool? WorkgroupCall {
  258.             get{
  259.                 return _WorkgroupCall;
  260.             }
  261.             set{
  262.                 this.OnWorkgroupCallChanging(value);
  263.                 this.SendPropertyChanging();
  264.                 this._WorkgroupCall = value;
  265.                 this.SendPropertyChanged("WorkgroupCall");
  266.                 this.OnWorkgroupCallChanged();
  267.             }
  268.         }
  269.        
  270.         partial void OnLongDistanceChanging(bool? value);
  271.         partial void OnLongDistanceChanged();
  272.        
  273.         private bool? _LongDistance;
  274.         public bool? LongDistance {
  275.             get{
  276.                 return _LongDistance;
  277.             }
  278.             set{
  279.                 this.OnLongDistanceChanging(value);
  280.                 this.SendPropertyChanging();
  281.                 this._LongDistance = value;
  282.                 this.SendPropertyChanged("LongDistance");
  283.                 this.OnLongDistanceChanged();
  284.             }
  285.         }
  286.        
  287.         partial void OnDialedNumberChanging(string value);
  288.         partial void OnDialedNumberChanged();
  289.        
  290.         private string _DialedNumber;
  291.         public string DialedNumber {
  292.             get{
  293.                 return _DialedNumber;
  294.             }
  295.             set{
  296.                 this.OnDialedNumberChanging(value);
  297.                 this.SendPropertyChanging();
  298.                 this._DialedNumber = value;
  299.                 this.SendPropertyChanged("DialedNumber");
  300.                 this.OnDialedNumberChanged();
  301.             }
  302.         }
  303.        
  304.         partial void OnCallerIDChanging(string value);
  305.         partial void OnCallerIDChanged();
  306.        
  307.         private string _CallerID;
  308.         public string CallerID {
  309.             get{
  310.                 return _CallerID;
  311.             }
  312.             set{
  313.                 this.OnCallerIDChanging(value);
  314.                 this.SendPropertyChanging();
  315.                 this._CallerID = value;
  316.                 this.SendPropertyChanged("CallerID");
  317.                 this.OnCallerIDChanged();
  318.             }
  319.         }
  320.        
  321.         partial void OnAOCChanging(string value);
  322.         partial void OnAOCChanged();
  323.        
  324.         private string _AOC;
  325.         public string AOC {
  326.             get{
  327.                 return _AOC;
  328.             }
  329.             set{
  330.                 this.OnAOCChanging(value);
  331.                 this.SendPropertyChanging();
  332.                 this._AOC = value;
  333.                 this.SendPropertyChanged("AOC");
  334.                 this.OnAOCChanged();
  335.             }
  336.         }
  337.        
  338.         partial void OnUserI32Changing(int? value);
  339.         partial void OnUserI32Changed();
  340.        
  341.         private int? _UserI32;
  342.         public int? UserI32 {
  343.             get{
  344.                 return _UserI32;
  345.             }
  346.             set{
  347.                 this.OnUserI32Changing(value);
  348.                 this.SendPropertyChanging();
  349.                 this._UserI32 = value;
  350.                 this.SendPropertyChanged("UserI32");
  351.                 this.OnUserI32Changed();
  352.             }
  353.         }
  354.        
  355.         partial void OnUserI64Changing(long? value);
  356.         partial void OnUserI64Changed();
  357.        
  358.         private long? _UserI64;
  359.         public long? UserI64 {
  360.             get{
  361.                 return _UserI64;
  362.             }
  363.             set{
  364.                 this.OnUserI64Changing(value);
  365.                 this.SendPropertyChanging();
  366.                 this._UserI64 = value;
  367.                 this.SendPropertyChanged("UserI64");
  368.                 this.OnUserI64Changed();
  369.             }
  370.         }
  371.        
  372.         partial void OnUserChar16Changing(string value);
  373.         partial void OnUserChar16Changed();
  374.        
  375.         private string _UserChar16;
  376.         public string UserChar16 {
  377.             get{
  378.                 return _UserChar16;
  379.             }
  380.             set{
  381.                 this.OnUserChar16Changing(value);
  382.                 this.SendPropertyChanging();
  383.                 this._UserChar16 = value;
  384.                 this.SendPropertyChanged("UserChar16");
  385.                 this.OnUserChar16Changed();
  386.             }
  387.         }
  388.        
  389.         partial void OnUserTimestampChanging(DateTime? value);
  390.         partial void OnUserTimestampChanged();
  391.        
  392.         private DateTime? _UserTimestamp;
  393.         public DateTime? UserTimestamp {
  394.             get{
  395.                 return _UserTimestamp;
  396.             }
  397.             set{
  398.                 this.OnUserTimestampChanging(value);
  399.                 this.SendPropertyChanging();
  400.                 this._UserTimestamp = value;
  401.                 this.SendPropertyChanged("UserTimestamp");
  402.                 this.OnUserTimestampChanged();
  403.             }
  404.         }
  405.        
  406.         partial void OnUserStringChanging(string value);
  407.         partial void OnUserStringChanged();
  408.        
  409.         private string _UserString;
  410.         public string UserString {
  411.             get{
  412.                 return _UserString;
  413.             }
  414.             set{
  415.                 this.OnUserStringChanging(value);
  416.                 this.SendPropertyChanging();
  417.                 this._UserString = value;
  418.                 this.SendPropertyChanged("UserString");
  419.                 this.OnUserStringChanged();
  420.             }
  421.         }
  422.        
  423.         partial void OnSecurityFlagChanging(short? value);
  424.         partial void OnSecurityFlagChanged();
  425.        
  426.         private short? _SecurityFlag;
  427.         public short? SecurityFlag {
  428.             get{
  429.                 return _SecurityFlag;
  430.             }
  431.             set{
  432.                 this.OnSecurityFlagChanging(value);
  433.                 this.SendPropertyChanging();
  434.                 this._SecurityFlag = value;
  435.                 this.SendPropertyChanged("SecurityFlag");
  436.                 this.OnSecurityFlagChanged();
  437.             }
  438.         }
  439.        
  440.         partial void OnArchivedChanging(bool? value);
  441.         partial void OnArchivedChanged();
  442.        
  443.         private bool? _Archived;
  444.         public bool? Archived {
  445.             get{
  446.                 return _Archived;
  447.             }
  448.             set{
  449.                 this.OnArchivedChanging(value);
  450.                 this.SendPropertyChanging();
  451.                 this._Archived = value;
  452.                 this.SendPropertyChanged("Archived");
  453.                 this.OnArchivedChanged();
  454.             }
  455.         }
  456.        
  457.  
  458.         #endregion
  459.  
  460.         private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  461.         public event PropertyChangingEventHandler PropertyChanging;
  462.         public event PropertyChangedEventHandler PropertyChanged;
  463.         protected virtual void SendPropertyChanging()
  464.         {
  465.             var handler = PropertyChanging;
  466.             if (handler != null)
  467.                handler(this, emptyChangingEventArgs);
  468.         }
  469.  
  470.         protected virtual void SendPropertyChanged(String propertyName)
  471.         {
  472.             var handler = PropertyChanged;
  473.             if (handler != null)
  474.                 handler(this, new PropertyChangedEventArgs(propertyName));
  475.         }
  476.  
  477.     }
  478. }
  479.  
  480. namespace DataTypes
  481. {
  482.     [DataContract]
  483.     public class Call
  484.     {
  485.         /// <summary>
  486.         /// Primary key
  487.         /// </summary>
  488.         [DataMember]
  489.         public long Id { get; set; }
  490.  
  491.         // TODO: what is the difference between Id and CallId?
  492.         [DataMember]
  493.         public long CallId { get; set; }
  494.  
  495.         [DataMember]
  496.         public int CallTypeId { get; set; }
  497.         public CallType CallType
  498.         {
  499.             get { return (CallType)this.CallTypeId; }
  500.             set { this.CallTypeId = (int)value; }
  501.         }
  502.  
  503.         [DataMember]
  504.         public int StartTimeMs { get; set; }
  505.  
  506.         [DataMember]
  507.         public DateTime StartTime { get; set; }
  508.  
  509.         [DataMember]
  510.         public bool? Archived { get; set; }
  511.  
  512.         [DataMember]
  513.         public int? EndTimeMs { get; set; }
  514.  
  515.         [DataMember]
  516.         public string CallNote { get; set; }
  517.  
  518.         [DataMember]
  519.         public bool? Locked { get; set; }
  520.  
  521.         [DataMember]
  522.         public bool? WorkgroupCall { get; set; }
  523.  
  524.         [DataMember]
  525.         public bool? LongDistance { get; set; }
  526.  
  527.         [DataMember]
  528.         public long? UserI32 { get; set; }
  529.  
  530.         [DataMember]
  531.         public long? UserI64 { get; set; }
  532.  
  533.         [DataMember]
  534.         public DateTime? EndTime { get; set; }
  535.  
  536.         [DataMember]
  537.         public DateTime? Duration { get; set; }
  538.  
  539.         [DataMember]
  540.         public DateTime? UserTimestamp { get; set; }
  541.  
  542.         [DataMember]
  543.         public string Extension { get; set; }
  544.  
  545.         [DataMember]
  546.         public string DialedNumber { get; set; }
  547.  
  548.         [DataMember]
  549.         public string CallerId { get; set; }
  550.  
  551.         [DataMember]
  552.         public string UserChar16 { get; set; }
  553.  
  554.         [DataMember]
  555.         public string BillingCode { get; set; }
  556.  
  557.         [DataMember]
  558.         public string SipCallId { get; set; }
  559.  
  560.         [DataMember]
  561.         public string FriendlyBillingCode { get; set; }
  562.  
  563.         [DataMember]
  564.         public string UserString { get; set; }
  565.     }
  566.  
  567.     /// <summary>
  568.     /// Enumeration of the DB table CallType.
  569.     /// </summary>
  570.     public enum CallType
  571.     {
  572.         [Description("Null")]
  573.         Null = 0,
  574.  
  575.         [Description("Extension to extension call.")]
  576.         ExtToExt = 1,
  577.  
  578.         [Description("A trunk is the originating party.")]
  579.         Inbound = 2,
  580.  
  581.         [Description("An extension is originating and a trunk is called.")]
  582.         Outbound = 3,
  583.  
  584.         [Description("A call originating from a trunk and going to a trunk.")]
  585.         Tandem = 4
  586.     }
  587. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement