Ejemplo n.º 1
0
        protected override void LoadFromRow(DataRow _dataRow)
        {
            SummitDS.AutoImporterShopsRow _thisRow = _dataRow as SummitDS.AutoImporterShopsRow;

            if (_thisRow != null)
            {
                this._ID                  = _thisRow.ID;
                this.m_bIsEmailSend       = _thisRow.IsIsEmailSendNull() ? (Nullable <Boolean>)null : _thisRow.IsEmailSend;
                this.m_iShopId            = _thisRow.IsShopIDNull() ? (Nullable <Int32>)null : _thisRow.ShopID;
                this.m_dtSyncDateTime     = _thisRow.IsSyncDateTimeNull() ? (Nullable <DateTime>)null : _thisRow.SyncDateTime;
                this.m_dtSendMailDateTime = _thisRow.IsSendMailDateNull() ? (Nullable <DateTime>)null : _thisRow.SendMailDate;
                _rowToSave                = _thisRow;
            }
        }
Ejemplo n.º 2
0
        protected override void SaveToRow()
        {
            SummitDS.AutoImporterShopsDataTable _thisTable = new SummitDS.AutoImporterShopsDataTable();
            if (_rowToSave == null)
            {
                _rowToSave = _thisTable.NewAutoImporterShopsRow();
            }
            SummitDS.AutoImporterShopsRow _dataRow = _rowToSave as SummitDS.AutoImporterShopsRow;

            if (_dataRow != null)
            {
                if (IsExisting())
                {
                    if (m_iShopId == null)
                    {
                        if (!_dataRow.IsShopIDNull())
                        {
                            _dataRow.SetShopIDNull();
                        }
                    }
                    else if (_dataRow.IsShopIDNull() ? true : _dataRow.ShopID != m_iShopId)
                    {
                        _dataRow.ShopID = m_iShopId.Value;
                    }

                    if (m_dtSyncDateTime == null)
                    {
                        if (!_dataRow.IsSyncDateTimeNull())
                        {
                            _dataRow.SetSyncDateTimeNull();
                        }
                    }
                    else if (_dataRow.IsSyncDateTimeNull() ? true : _dataRow.SyncDateTime != m_dtSyncDateTime)
                    {
                        _dataRow.SyncDateTime = m_dtSyncDateTime.Value;
                    }

                    if (m_bIsEmailSend == null)
                    {
                        if (!_dataRow.IsIsEmailSendNull())
                        {
                            _dataRow.SetIsEmailSendNull();
                        }
                    }
                    else if (_dataRow.IsIsEmailSendNull() ? true : _dataRow.IsEmailSend != m_bIsEmailSend)
                    {
                        _dataRow.IsEmailSend = m_bIsEmailSend.Value;
                    }

                    if (m_dtSendMailDateTime == null)
                    {
                        if (!_dataRow.IsSendMailDateNull())
                        {
                            _dataRow.SetSendMailDateNull();
                        }
                    }
                    else if (_dataRow.IsSendMailDateNull() ? true : _dataRow.SendMailDate != m_dtSendMailDateTime)
                    {
                        _dataRow.SendMailDate = m_dtSendMailDateTime.Value;
                    }
                }
                else
                {
                    if (m_iShopId == null)
                    {
                        if (!_dataRow.IsShopIDNull())
                        {
                            _dataRow.SetShopIDNull();
                        }
                    }
                    else if (_dataRow.IsShopIDNull() ? true : _dataRow.ShopID != m_iShopId)
                    {
                        _dataRow.ShopID = m_iShopId.Value;
                    }

                    if (m_dtSyncDateTime == null)
                    {
                        if (!_dataRow.IsSyncDateTimeNull())
                        {
                            _dataRow.SetSyncDateTimeNull();
                        }
                    }
                    else if (_dataRow.IsSyncDateTimeNull() ? true : _dataRow.SyncDateTime != m_dtSyncDateTime)
                    {
                        _dataRow.SyncDateTime = m_dtSyncDateTime.Value;
                    }

                    if (m_bIsEmailSend == null)
                    {
                        if (!_dataRow.IsIsEmailSendNull())
                        {
                            _dataRow.SetIsEmailSendNull();
                        }
                    }
                    else if (_dataRow.IsIsEmailSendNull() ? true : _dataRow.IsEmailSend != m_bIsEmailSend)
                    {
                        _dataRow.IsEmailSend = m_bIsEmailSend.Value;
                    }

                    if (m_dtSendMailDateTime == null)
                    {
                        if (!_dataRow.IsSendMailDateNull())
                        {
                            _dataRow.SetSendMailDateNull();
                        }
                    }
                    else if (_dataRow.IsSendMailDateNull() ? true : _dataRow.SendMailDate != m_dtSendMailDateTime)
                    {
                        _dataRow.SendMailDate = m_dtSendMailDateTime.Value;
                    }

                    _thisTable.AddAutoImporterShopsRow(_dataRow);
                }
            }
        }