Example #1
0
        public DataSet ToDataSet()
        {
            //Return a dataset containing values for this object
            SpecialAgentDS ds = null;

            try {
                ds = new SpecialAgentDS();
                SpecialAgentDS.SpecialAgentTableRow specialagent = ds.SpecialAgentTable.NewSpecialAgentTableRow();
                specialagent.ID              = this._id;
                specialagent.CLIENT_NUMBER   = this._client_number;
                specialagent.CLIENT_DIVISION = this._client_division;
                specialagent.LOCATION        = this._location;
                if (this._account_number.Length > 0)
                {
                    specialagent.ACCOUNT_NUMBER = this._account_number;
                }
                if (this._san_id.Length > 0)
                {
                    specialagent.SAN_ID = this._san_id;
                }
                if (this._zone_code.Length > 0)
                {
                    specialagent.ZONE_CODE = this._zone_code;
                }
                if (this._is_record.Length > 0)
                {
                    specialagent.IS_RECORD = this._is_record;
                }
                if (this._title.Length > 0)
                {
                    specialagent.TITLE = this._title;
                }
                if (this._instructions.Length > 0)
                {
                    specialagent.INSTRUCTIONS = this._instructions;
                }
                if (this._indicator.Length > 0)
                {
                    specialagent.INDICATOR = this._indicator;
                }
                if (this._icon.Length > 0)
                {
                    specialagent.ICON = this._icon;
                }
                ds.SpecialAgentTable.AddSpecialAgentTableRow(specialagent);
            }
            catch (Exception) { }
            return(ds);
        }
Example #2
0
 public SpecialAgent(SpecialAgentDS.SpecialAgentTableRow specialagent)
 {
     //Constructor
     try {
         if (specialagent != null)
         {
             this._id              = specialagent.ID;
             this._client_number   = specialagent.CLIENT_NUMBER;
             this._client_division = specialagent.CLIENT_DIVISION;
             this._location        = specialagent.LOCATION;
             if (!specialagent.IsACCOUNT_NUMBERNull())
             {
                 this._account_number = specialagent.ACCOUNT_NUMBER;
             }
             if (!specialagent.IsSAN_IDNull())
             {
                 this._san_id = specialagent.SAN_ID;
             }
             if (!specialagent.IsZONE_CODENull())
             {
                 this._zone_code = specialagent.ZONE_CODE;
             }
             if (!specialagent.IsIS_RECORDNull())
             {
                 this._is_record = specialagent.IS_RECORD;
             }
             if (!specialagent.IsTITLENull())
             {
                 this._title = specialagent.TITLE;
             }
             if (!specialagent.IsINSTRUCTIONSNull())
             {
                 this._instructions = specialagent.INSTRUCTIONS;
             }
             if (!specialagent.IsINDICATORNull())
             {
                 this._indicator = specialagent.INDICATOR;
             }
             if (!specialagent.IsICONNull())
             {
                 this._icon = specialagent.ICON;
             }
         }
     }
     catch (Exception ex) { throw new ApplicationException("Unexpected error while creating new Special Agent instance.", ex); }
 }
Example #3
0
 //Members
 //Interface
 public UPSSpecialAgent(SpecialAgentDS.SpecialAgentTableRow specialagent) : base(specialagent)
 {
 }
Example #4
0
 //Members
 //Interface
 public StatSampleSpecialAgent(SpecialAgentDS.SpecialAgentTableRow specialagent) : base(specialagent)
 {
 }