public DataSet ToDataSet() { //Return a dataset containing values for this object InboundLabelDS ds = null; try { ds = new InboundLabelDS(); InboundLabelDS.FreightInfoRegTableRow label = ds.FreightInfoRegTable.NewFreightInfoRegTableRow(); label.TYPE = this.mType; label.INPUT1LENGTH = this.mInput1Length; label.INPUT2LENGTH = this.mInput2Length; label.INPUT3LENGTH = this.mInput3Length; label.STORE_BEGIN_POS = this.mStoreBeginPos; label.STORE_END_POS = this.mStoreEndPos; label.CARTON_BEGIN_POS = this.mCartonBeginPos; label.CARTON_END_POS = this.mCartonEndPos; label.CARTON_IN_INPUT1 = this.mCartonInInput1; label.DUP_CARTONS_OK = this.mDupCartonsOK; label.CARTONS_NBR_REQ = this.mCartonsNbrReq; label.CRTN_VALIDATION = this.mCartonValidation; label.USE_ALT_STORE = this.mUseAltStore; label.VALIDATION_STRING = this.mValidationString; label.VALIDATION_BEGIN = this.mValidationBegin; label.VALIDATION_END = this.mValidationEnd; label.POStart = this.mPOStart; label.POLength = this.mPOLength; label.POInputNumber = this.mPOInputNumber; ds.FreightInfoRegTable.AddFreightInfoRegTableRow(label); } catch (Exception) { } return(ds); }
//Constants //Events //Interface public FreightInfoLabel(InboundLabelDS.FreightInfoRegTableRow label) : base(null) { //Constructor try { //Create freight underlying info object this.mFreightInfo = new FreightInfo(label); //Map freight info object to Inbound Label base type base.mLabelID = Convert.ToInt32(this.mFreightInfo.Type); base.mSortTypeID = 0; base.mDescription = ""; adapt(); } catch (Exception ex) { throw new ApplicationException("Unexpected error while creating new Freight Info Label instance.", ex); } }
//Constants //Events //Interface public FreightInfo(InboundLabelDS.FreightInfoRegTableRow label) { //Constructor try { this.mType = label.TYPE; this.mInput1Length = label.INPUT1LENGTH; if (!label.IsINPUT2LENGTHNull()) { this.mInput2Length = label.INPUT2LENGTH; } if (!label.IsINPUT3LENGTHNull()) { this.mInput3Length = label.INPUT3LENGTH; } this.mStoreBeginPos = label.STORE_BEGIN_POS; this.mStoreEndPos = label.STORE_END_POS; if (!label.IsCARTON_BEGIN_POSNull()) { this.mCartonBeginPos = label.CARTON_BEGIN_POS; } if (!label.IsCARTON_END_POSNull()) { this.mCartonEndPos = label.CARTON_END_POS; } if (!label.IsCARTON_IN_INPUT1Null()) { this.mCartonInInput1 = label.CARTON_IN_INPUT1; } if (!label.IsDUP_CARTONS_OKNull()) { this.mDupCartonsOK = label.DUP_CARTONS_OK; } if (!label.IsCARTONS_NBR_REQNull()) { this.mCartonsNbrReq = label.CARTONS_NBR_REQ; } if (!label.IsCRTN_VALIDATIONNull()) { this.mCartonValidation = label.CRTN_VALIDATION; } if (!label.IsUSE_ALT_STORENull()) { this.mUseAltStore = label.USE_ALT_STORE; } if (!label.IsVALIDATION_STRINGNull()) { this.mValidationString = label.VALIDATION_STRING.Trim(); } if (!label.IsVALIDATION_BEGINNull()) { this.mValidationBegin = label.VALIDATION_BEGIN; } if (!label.IsVALIDATION_ENDNull()) { this.mValidationEnd = label.VALIDATION_END; } if (!label.IsPOStartNull()) { this.mPOStart = label.POStart; } if (!label.IsPOLengthNull()) { this.mPOLength = label.POLength; } if (!label.IsPOInputNumberNull()) { this.mPOInputNumber = label.POInputNumber; } } catch (Exception ex) { throw new ApplicationException("Unexpected error while creating new Freight Info instance.", ex); } }