protected override void SetID()
 {
     SummitDS.AIManageRecurringActivityRow thisRow = _rowToSave as SummitDS.AIManageRecurringActivityRow;
     if (thisRow != null)
     {
         this._ID = thisRow.Id;
     }
 }
        protected override void LoadFromRow(DataRow _dataRow)
        {
            SummitDS.AIManageRecurringActivityRow _thisRow = _dataRow as SummitDS.AIManageRecurringActivityRow;

            if (_thisRow != null)
            {
                this._ID               = _thisRow.Id;
                this.m_iShopId         = _thisRow.ShopId;
                this.m_iUserId         = _thisRow.UserId;
                this.m_dtDeliveryDate  = _thisRow.DeliveryDate;
                this.m_IsProcessed     = _thisRow.IsIsProcessedNull() ? (Nullable <Boolean>)null : _thisRow.IsProcessed;
                this.m_dtProcessedDate = _thisRow.IsProcessedDateNull() ? (Nullable <DateTime>)null : _thisRow.ProcessedDate;

                _rowToSave = _thisRow;
            }
        }
        protected override void SaveToRow()
        {
            SummitDS.AIManageRecurringActivityDataTable _thisTable = new SummitDS.AIManageRecurringActivityDataTable();
            if (_rowToSave == null)
            {
                _rowToSave = _thisTable.NewAIManageRecurringActivityRow();
            }
            SummitDS.AIManageRecurringActivityRow _dataRow = _rowToSave as SummitDS.AIManageRecurringActivityRow;

            if (_dataRow != null)
            {
                if (IsExisting())
                {
                    _dataRow.ShopId       = m_iShopId;
                    _dataRow.UserId       = m_iUserId;
                    _dataRow.DeliveryDate = m_dtDeliveryDate;

                    if (m_IsProcessed == null)
                    {
                        if (!_dataRow.IsIsProcessedNull())
                        {
                            _dataRow.SetIsProcessedNull();
                        }
                    }
                    else if (_dataRow.IsIsProcessedNull() ? true : _dataRow.IsProcessed != m_IsProcessed)
                    {
                        _dataRow.IsProcessed = m_IsProcessed.Value;
                    }

                    if (dtProcessedDate.HasValue)
                    {
                        _dataRow.ProcessedDate = dtProcessedDate.Value;
                    }
                    else
                    {
                        _dataRow.SetProcessedDateNull();
                    }
                }
                else
                {
                    _dataRow.ShopId       = m_iShopId;
                    _dataRow.UserId       = m_iUserId;
                    _dataRow.DeliveryDate = m_dtDeliveryDate;

                    if (m_IsProcessed == null)
                    {
                        if (!_dataRow.IsIsProcessedNull())
                        {
                            _dataRow.SetIsProcessedNull();
                        }
                    }
                    else if (_dataRow.IsIsProcessedNull() ? true : _dataRow.IsProcessed != m_IsProcessed)
                    {
                        _dataRow.IsProcessed = m_IsProcessed.Value;
                    }

                    if (dtProcessedDate.HasValue)
                    {
                        _dataRow.ProcessedDate = dtProcessedDate.Value;
                    }
                    else
                    {
                        _dataRow.SetProcessedDateNull();
                    }

                    _thisTable.AddAIManageRecurringActivityRow(_dataRow);
                }
            }
        }