Esempio n. 1
0
 public Shipper(EnterpriseDataset.AgentTableRow agent)
 {
     //Constructor
     try {
         if (agent != null)
         {
             this._number = agent.Number;
             if (!agent.IsNameNull())
             {
                 this._name = agent.Name;
             }
             if (!agent.IsStatusNull())
             {
                 this._status = agent.Status;
             }
             if (!agent.IsAddressLine1Null())
             {
                 this._addressline1 = agent.AddressLine1;
             }
             if (!agent.IsAddressLine2Null())
             {
                 this._addressline2 = agent.AddressLine2;
             }
             if (!agent.IsCityNull())
             {
                 this._city = agent.City;
             }
             if (!agent.IsStateNull())
             {
                 this._state = agent.State;
             }
             if (!agent.IsZipNull())
             {
                 this._zip = agent.Zip;
             }
             if (!agent.IsZip4Null())
             {
                 this._zip4 = agent.Zip4;
             }
         }
     }
     catch (Exception ex) { throw new ApplicationException("Unexpected exception creating new shipper instance.", ex); }
 }
Esempio n. 2
0
 public Agent(EnterpriseDataset.AgentTableRow agent) : base(agent)
 {
     //Constructor
     try {
         if (agent != null)
         {
             if (!agent.IsContactNameNull())
             {
                 this._contactname = agent.ContactName;
             }
             if (!agent.IsPhoneNull())
             {
                 this._phone = agent.Phone;
             }
             this._parentnumber = agent.ParentNumber;
             this._scannertype  = agent.ScannerType;
             this._agenttype    = agent.AgentType;
             this._scangunqty   = agent.ScanGunQty;
         }
     }
     catch (Exception ex) { throw new ApplicationException("Unexpected exception creating new agent instance.", ex); }
 }