Esempio n. 1
0
 protected override void SetID()
 {
     SummitDS.VehicleStatusRow thisRow = _rowToSave as SummitDS.VehicleStatusRow;
     if (thisRow != null)
     {
         this._ID = thisRow.VehicleStatusId;
     }
 }
Esempio n. 2
0
        protected override void LoadFromRow(DataRow _dataRow)
        {
            SummitDS.VehicleStatusRow _thisRow = _dataRow as SummitDS.VehicleStatusRow;

            if (_thisRow != null)
            {
                this._ID = _thisRow.VehicleStatusId;
                this.m_strVehicleStatus = _thisRow.VehicleStatus;
                this.m_strMessage       = _thisRow.IsMessageNull() ? String.Empty : _thisRow.Message;
                this.m_bIsActive        = _thisRow.IsIsActiveNull() ? (Nullable <Boolean>)null : _thisRow.IsActive;
                this.m_iShopId          = _thisRow.Isshop_idNull() ? (Nullable <Int32>)null : _thisRow.shop_id;
                this.m_bSMS             = _thisRow.IsSMSNull() ? (Nullable <Boolean>)null : _thisRow.SMS;
                this.m_bEmail           = _thisRow.IsEmailNull() ? (Nullable <Boolean>)null : _thisRow.Email;
                this.bMoveToMarketing   = _thisRow.IsMoveToMarketingNull() ? (Nullable <Boolean>)null : _thisRow.MoveToMarketing;
                //  this.m_dt_ts = _thisRow.Is_tsNull() ? (Nullable<DateTime>) null : _thisRow._ts ;
                _rowToSave = _thisRow;
            }
        }
Esempio n. 3
0
        protected override void SaveToRow()
        {
            SummitDS.VehicleStatusDataTable _thisTable = new SummitDS.VehicleStatusDataTable();
            if (_rowToSave == null)
            {
                _rowToSave = _thisTable.NewVehicleStatusRow();
            }
            SummitDS.VehicleStatusRow _dataRow = _rowToSave as SummitDS.VehicleStatusRow;

            if (_dataRow != null)
            {
                if (IsExisting())
                {
                    _dataRow.VehicleStatus = m_strVehicleStatus;

                    if (String.IsNullOrEmpty(m_strMessage))
                    {
                        if (!_dataRow.IsMessageNull())
                        {
                            _dataRow.SetMessageNull();
                        }
                    }
                    else if (_dataRow.IsMessageNull() ? true : _dataRow.Message != m_strMessage)
                    {
                        _dataRow.Message = m_strMessage;
                    }

                    if (bIsActive.HasValue)
                    {
                        _dataRow.IsActive = bIsActive.Value;
                    }
                    else
                    {
                        _dataRow.SetIsActiveNull();
                    }

                    if (iShopId.HasValue)
                    {
                        _dataRow.shop_id = iShopId.Value;
                    }
                    else
                    {
                        _dataRow.Setshop_idNull();
                    }

                    if (bSMS.HasValue)
                    {
                        _dataRow.SMS = bSMS.Value;
                    }
                    else
                    {
                        _dataRow.SetSMSNull();
                    }

                    if (bEmail.HasValue)
                    {
                        _dataRow.Email = bEmail.Value;
                    }
                    else
                    {
                        _dataRow.SetEmailNull();
                    }

                    if (bMoveToMarketing.HasValue)
                    {
                        _dataRow.MoveToMarketing = bMoveToMarketing.Value;
                    }
                    else
                    {
                        _dataRow.SetMoveToMarketingNull();
                    }
                }
                else
                {
                    _dataRow.VehicleStatus = m_strVehicleStatus;

                    if (String.IsNullOrEmpty(m_strMessage))
                    {
                        if (!_dataRow.IsMessageNull())
                        {
                            _dataRow.SetMessageNull();
                        }
                    }
                    else if (_dataRow.IsMessageNull() ? true : _dataRow.Message != m_strMessage)
                    {
                        _dataRow.Message = m_strMessage;
                    }

                    if (bIsActive.HasValue)
                    {
                        _dataRow.IsActive = bIsActive.Value;
                    }
                    else
                    {
                        _dataRow.SetIsActiveNull();
                    }

                    if (iShopId.HasValue)
                    {
                        _dataRow.shop_id = iShopId.Value;
                    }
                    else
                    {
                        _dataRow.Setshop_idNull();
                    }

                    if (bSMS.HasValue)
                    {
                        _dataRow.SMS = bSMS.Value;
                    }
                    else
                    {
                        _dataRow.SetSMSNull();
                    }

                    if (bEmail.HasValue)
                    {
                        _dataRow.Email = bEmail.Value;
                    }
                    else
                    {
                        _dataRow.SetEmailNull();
                    }

                    if (bMoveToMarketing.HasValue)
                    {
                        _dataRow.MoveToMarketing = bMoveToMarketing.Value;
                    }
                    else
                    {
                        _dataRow.SetMoveToMarketingNull();
                    }

                    _thisTable.AddVehicleStatusRow(_dataRow);
                }
            }
        }