public Agent(AgentDS.AgentTableRow agent) : base(agent) { //Constructor try { if (agent != null) { if (!agent.IsAgentIDNull()) { this._agentid = agent.AgentID; } if (!agent.IsContactNameNull()) { this._contactname = agent.ContactName; } if (!agent.IsPhoneNull()) { this._phone = agent.Phone; } if (!agent.IsFaxNull()) { this._fax = agent.Fax; } if (!agent.IsMnemonicNull()) { this._mnemonic = agent.Mnemonic; } if (!agent.IsAPNumberNull()) { this._apnumber = agent.APNumber; } if (!agent.IsTransmitEBOLNull()) { this._transmitebol = agent.TransmitEBOL; } if (!agent.IsDeliveryScanStatusNull()) { this._deliveryscanstatus = agent.DeliveryScanStatus; } if (!agent.IsParentIDNull()) { this._parentid = agent.ParentID; } if (!agent.IsLastUpdatedNull()) { this._lastupdated = agent.LastUpdated; } if (!agent.IsUserIDNull()) { this._userid = agent.UserID; } } } catch (Exception ex) { throw new ApplicationException("Unexpected exception creating new agent instance.", ex); } }
public Shipper(AgentDS.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.IsADDRESS_LINE1Null()) { this._address_line1 = agent.ADDRESS_LINE1; } if (!agent.IsADDRESS_LINE2Null()) { this._address_line2 = agent.ADDRESS_LINE2; } 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; } if (!agent.IsLocationIDNull()) { this._locationID = agent.LocationID; } } } catch (Exception ex) { throw new ApplicationException("Unexpected exception creating new shipper instance.", ex); } }