Exemple #1
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);
        }