Exemplo n.º 1
0
        public override DataSet ToDataSet()
        {
            //Return a dataset containing values for this object
            AgentDS ds = null;

            try {
                ds = new AgentDS();
                AgentDS.AgentDetailTableRow agent = ds.AgentDetailTable.NewAgentDetailTableRow();
                agent.AgentID            = this._agentid;
                agent.NUMBER             = base._number;
                agent.NAME               = base._name;
                agent.STATUS             = base._status;
                agent.ADDRESS_LINE1      = base._address_line1;
                agent.ADDRESS_LINE2      = base._address_line2;
                agent.CITY               = base._city;
                agent.STATE              = base._state;
                agent.ZIP                = base._zip;
                agent.ZIP4               = base._zip4;
                agent.ContactName        = this._contactname;
                agent.Phone              = this._phone;
                agent.Fax                = this._fax;
                agent.Mnemonic           = this._mnemonic;
                agent.APNumber           = this._apnumber;
                agent.TransmitEBOL       = this._transmitebol;
                agent.DeliveryScanStatus = this._deliveryscanstatus;
                agent.ParentID           = this._parentid;
                agent.LastUpdated        = this._lastupdated;
                agent.UserID             = this._userid;
                ds.AgentDetailTable.AddAgentDetailTableRow(agent);
            }
            catch (Exception) { }
            return(ds);
        }
Exemplo n.º 2
0
 public Agent(AgentDS.AgentDetailTableRow 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); }
 }
Exemplo n.º 3
0
 public Shipper(AgentDS.AgentDetailTableRow 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;
             }
         }
     }
     catch (Exception ex) { throw new ApplicationException("Unexpected exception creating new shipper instance.", ex); }
 }