Esempio n. 1
0
 public Client(ClientDS.ClientDetailTableRow client)
 {
     //Constructor
     try {
         if (client != null)
         {
             if (!client.IsClientIDNull())
             {
                 this._clientid = client.ClientID;
             }
             if (!client.IsClientNumberNull())
             {
                 this._clientnumber = client.ClientNumber;
             }
             this._number   = client.NUMBER;
             this._division = client.DIVISION;
             if (!client.IsNAMENull())
             {
                 this._name = client.NAME;
             }
             if (!client.IsSTATUSNull())
             {
                 this._status = client.STATUS;
             }
             if (!client.IsUPS_SHIPPER_NBRNull())
             {
                 this._ups_shipper_nbr = client.UPS_SHIPPER_NBR;
             }
             if (!client.IsABBREVIATIONNull())
             {
                 this._abbreviation = client.ABBREVIATION;
             }
             if (!client.IsADDRESS_LINE1Null())
             {
                 this._address_line1 = client.ADDRESS_LINE1;
             }
             if (!client.IsADDRESS_LINE2Null())
             {
                 this._address_line2 = client.ADDRESS_LINE2;
             }
             if (!client.IsCITYNull())
             {
                 this._city = client.CITY;
             }
             if (!client.IsSTATENull())
             {
                 this._state = client.STATE;
             }
             if (!client.IsZIPNull())
             {
                 this._zip = client.ZIP;
             }
             if (!client.IsZIP4Null())
             {
                 this._zip4 = client.ZIP4;
             }
             if (!client.IsDELIVERY_BILL_TYPENull())
             {
                 this._delivery_bill_type = client.DELIVERY_BILL_TYPE;
             }
             if (!client.IsCARTON_COMMODITYNull())
             {
                 this._carton_commodity = client.CARTON_COMMODITY;
             }
             if (!client.IsDELIVERY_BILLNull())
             {
                 this._delivery_bill = client.DELIVERY_BILL;
             }
             if (!client.IsDBILL_COPIESNull())
             {
                 this._dbill_copies = client.DBILL_COPIES;
             }
             if (!client.IsIsSanNull())
             {
                 this._issan = client.IsSan;
             }
             if (!client.IsInvoiceProgramNull())
             {
                 this._invoiceprogram = client.InvoiceProgram;
             }
             if (!client.IsContactNameNull())
             {
                 this._contactname = client.ContactName;
             }
             if (!client.IsPhoneNull())
             {
                 this._phone = client.Phone;
             }
             if (!client.IsFaxNull())
             {
                 this._fax = client.Fax;
             }
             if (!client.IsMnemonicNull())
             {
                 this._mnemonic = client.Mnemonic;
             }
             if (!client.IsBLNumberOnInvoiceNull())
             {
                 this._blnumberoninvoice = client.BLNumberOnInvoice;
             }
             if (!client.IsARNumberNull())
             {
                 this._arnumber = client.ARNumber;
             }
             if (!client.IsPickupZipNull())
             {
                 this._pickupzip = client.PickupZip;
             }
             if (!client.IsManifestPerTrailerNull())
             {
                 this._manifestpertrailer = client.ManifestPerTrailer;
             }
             if (!client.IsLastUpdatedNull())
             {
                 this._lastupdated = client.LastUpdated;
             }
             if (!client.IsUserIDNull())
             {
                 this._userid = client.UserID;
             }
         }
     }
     catch (Exception ex) { throw new ApplicationException("Unexpected exception creating new client instance.", ex); }
 }
Esempio n. 2
0
        public DataSet ToDataSet()
        {
            //Return a dataset containing values for this object
            ClientDS ds = null;

            try {
                ds = new ClientDS();
                ClientDS.ClientDetailTableRow client = ds.ClientDetailTable.NewClientDetailTableRow();
                if (this._clientid > 0)
                {
                    client.ClientID = this._clientid;
                }
                if (this._clientnumber.Length > 0)
                {
                    client.ClientNumber = this._clientnumber;
                }
                if (this._clientnumber.Length > 0)
                {
                    client.NUMBER = this._number;
                }
                if (this._clientnumber.Length > 0)
                {
                    client.DIVISION = this._division;
                }
                if (this._name.Length > 0)
                {
                    client.NAME = this._name;
                }
                if (this._status.Length > 0)
                {
                    client.STATUS = this._status;
                }
                if (this._ups_shipper_nbr.Length > 0)
                {
                    client.UPS_SHIPPER_NBR = this._ups_shipper_nbr;
                }
                if (this._abbreviation.Length > 0)
                {
                    client.ABBREVIATION = this._abbreviation;
                }
                if (this._address_line1.Length > 0)
                {
                    client.ADDRESS_LINE1 = this._address_line1;
                }
                if (this._address_line2.Length > 0)
                {
                    client.ADDRESS_LINE2 = this._address_line2;
                }
                if (this._city.Length > 0)
                {
                    client.CITY = this._city;
                }
                if (this._state.Length > 0)
                {
                    client.STATE = this._state;
                }
                if (this._zip.Length > 0)
                {
                    client.ZIP = this._zip;
                }
                if (this._zip4.Length > 0)
                {
                    client.ZIP4 = this._zip4;
                }
                if (this._delivery_bill_type.Length > 0)
                {
                    client.DELIVERY_BILL_TYPE = this._delivery_bill_type;
                }
                if (this._carton_commodity.Length > 0)
                {
                    client.CARTON_COMMODITY = this._carton_commodity;
                }
                if (this._delivery_bill.Length > 0)
                {
                    client.DELIVERY_BILL_TYPE = this._delivery_bill;
                }
                if (this._dbill_copies > 0)
                {
                    client.DBILL_COPIES = this._dbill_copies;
                }
                if (this._issan.Length > 0)
                {
                    client.IsSan = this._issan;
                }
                if (this._invoiceprogram.Length > 0)
                {
                    client.InvoiceProgram = this._invoiceprogram;
                }
                if (this._contactname.Length > 0)
                {
                    client.ContactName = this._contactname;
                }
                if (this._phone.Length > 0)
                {
                    client.Phone = this._phone;
                }
                if (this._fax.Length > 0)
                {
                    client.Fax = this._fax;
                }
                if (this._mnemonic.Length > 0)
                {
                    client.Mnemonic = this._mnemonic;
                }
                if (this._blnumberoninvoice.Length > 0)
                {
                    client.BLNumberOnInvoice = this._blnumberoninvoice;
                }
                if (this._arnumber.Length > 0)
                {
                    client.ARNumber = this._arnumber;
                }
                if (this._pickupzip.Length > 0)
                {
                    client.PickupZip = this._pickupzip;
                }
                if (this._manifestpertrailer.Length > 0)
                {
                    client.ManifestPerTrailer = this._manifestpertrailer;
                }
                client.LastUpdated = this._lastupdated;
                client.UserID      = this._userid;
                ds.ClientDetailTable.AddClientDetailTableRow(client);
                ds.AcceptChanges();
            }
            catch (Exception) { }
            return(ds);
        }