Exemplo n.º 1
0
 protected override void SetID()
 {
     SummitDS.ReocurringCampaignUsersRow thisRow = _rowToSave as SummitDS.ReocurringCampaignUsersRow;
     if (thisRow != null)
     {
         this._ID      = thisRow.reocurring_campaign_user_id;
         this.m_iRowId = thisRow.reocurring_campaign_user_id;
     }
 }
Exemplo n.º 2
0
        protected override void LoadFromRow(DataRow _dataRow)
        {
            SummitDS.ReocurringCampaignUsersRow row = _dataRow as SummitDS.ReocurringCampaignUsersRow;

            if (row != null)
            {
                this._ID                = row.reocurring_campaign_user_id;
                this.m_iRowId           = row.reocurring_campaign_user_id;
                this.m_iFrequencyID     = row.Isfrequency_idNull() ? (Nullable <Int32>)null : row.frequency_id;
                this.m_iShopID          = row.Isshop_idNull() ? (Nullable <Int32>)null : row.shop_id;
                this.m_iVehicleID       = row.Isvehicle_idNull() ? (Nullable <Int32>)null : row.vehicle_id;
                this.m_iUserID          = row.Isshop_idNull() ? (Nullable <Int32>)null : row.user_id;
                this.m_strPhone         = row.IsphoneNull() ? String.Empty : row.phone;
                this.m_dtDeliveredDate  = row.Isdelivered_dateNull() ? (Nullable <DateTime>)null : row.delivered_date;
                this.m_bIsMailSent      = row.IsisMailSentNull() ? (Nullable <Boolean>)null : row.isMailSent;
                this.m_strFirstName     = row.Isfirst_nameNull() ? String.Empty : row.first_name;
                this.m_strUserName      = row.IsusernameNull() ? String.Empty : row.username;
                this.m_bIsSmsSent       = row.IsisSmsSentNull() ? (Nullable <Boolean>)null : row.isSmsSent;
                this.m_strEmail         = row.IsemailNull() ? String.Empty : row.email;
                this.m_iEmailTemplateId = row.Isemail_template_idNull() ? (Nullable <Int32>)null : row.email_template_id;
                _rowToSave              = row;
            }
        }
Exemplo n.º 3
0
        protected override void SaveToRow()
        {
            SummitDS.ReocurringCampaignUsersDataTable _thisTable = new SummitDS.ReocurringCampaignUsersDataTable();
            if (_rowToSave == null)
            {
                _rowToSave = _thisTable.NewReocurringCampaignUsersRow();
            }
            SummitDS.ReocurringCampaignUsersRow _dataRow = _rowToSave as SummitDS.ReocurringCampaignUsersRow;

            if (_dataRow != null)
            {
                if (IsExisting())
                {
                    if (iShopID.HasValue)
                    {
                        _dataRow.shop_id = iShopID.Value;
                    }
                    else
                    {
                        _dataRow.Setshop_idNull();
                    }

                    if (iVehicleID.HasValue)
                    {
                        _dataRow.vehicle_id = iVehicleID.Value;
                    }
                    else
                    {
                        _dataRow.Setvehicle_idNull();
                    }

                    if (iFrequencyID.HasValue)
                    {
                        _dataRow.frequency_id = iFrequencyID.Value;
                    }
                    else
                    {
                        _dataRow.Setfrequency_idNull();
                    }

                    if (iUserID.HasValue)
                    {
                        _dataRow.user_id = iUserID.Value;
                    }
                    else
                    {
                        _dataRow.Setuser_idNull();
                    }

                    if (bIsMailSent.HasValue)
                    {
                        _dataRow.isMailSent = bIsMailSent.Value;
                    }
                    else
                    {
                        _dataRow.SetisMailSentNull();
                    }

                    if (bIsSmsSent.HasValue)
                    {
                        _dataRow.isSmsSent = bIsSmsSent.Value;
                    }
                    else
                    {
                        _dataRow.SetisSmsSentNull();
                    }

                    if (m_dtDeliveredDate.HasValue)
                    {
                        _dataRow.delivered_date = m_dtDeliveredDate.Value;
                    }
                    else
                    {
                        _dataRow.Setdelivered_dateNull();
                    }

                    if (m_iEmailTemplateId.HasValue)
                    {
                        _dataRow.email_template_id = m_iEmailTemplateId.Value;
                    }
                    else
                    {
                        _dataRow.Setemail_template_idNull();
                    }
                }
                else
                {
                    if (bIsMailSent.HasValue)
                    {
                        _dataRow.isMailSent = bIsMailSent.Value;
                    }
                    else
                    {
                        _dataRow.SetisMailSentNull();
                    }

                    if (bIsSmsSent.HasValue)
                    {
                        _dataRow.isSmsSent = bIsSmsSent.Value;
                    }
                    else
                    {
                        _dataRow.SetisSmsSentNull();
                    }

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

                    if (iVehicleID.HasValue)
                    {
                        _dataRow.vehicle_id = iVehicleID.Value;
                    }
                    else
                    {
                        _dataRow.Setvehicle_idNull();
                    }

                    if (iFrequencyID.HasValue)
                    {
                        _dataRow.frequency_id = iFrequencyID.Value;
                    }
                    else
                    {
                        _dataRow.Setfrequency_idNull();
                    }

                    if (iUserID.HasValue)
                    {
                        _dataRow.user_id = iUserID.Value;
                    }
                    else
                    {
                        _dataRow.Setuser_idNull();
                    }

                    if (m_dtDeliveredDate.HasValue)
                    {
                        _dataRow.delivered_date = m_dtDeliveredDate.Value;
                    }
                    else
                    {
                        _dataRow.Setdelivered_dateNull();
                    }

                    if (m_iEmailTemplateId.HasValue)
                    {
                        _dataRow.email_template_id = m_iEmailTemplateId.Value;
                    }
                    else
                    {
                        _dataRow.Setemail_template_idNull();
                    }


                    _thisTable.AddReocurringCampaignUsersRow(_dataRow);
                }
            }
        }