Example #1
0
 protected override void SetID()
 {
     SummitDS.ScheduledUsersRow thisRow = _rowToSave as SummitDS.ScheduledUsersRow;
     if (thisRow != null)
     {
         this._ID = thisRow.scheduled_users_id;;
     }
 }
Example #2
0
        protected override void LoadFromRow(DataRow _dataRow)
        {
            SummitDS.ScheduledUsersRow _thisRow = _dataRow as SummitDS.ScheduledUsersRow;

            if (_thisRow != null)
            {
                this._ID       = _thisRow.scheduled_users_id;
                this.m_iShopId = _thisRow.Isshop_idNull() ? (Nullable <Int32>)null : _thisRow.shop_id;
                //this.iCustomerId = _thisRow.customer_id;
                //this.iVehicleStatusId = _thisRow.vehiclestatus_id;
                this.m_dtSendDate  = _thisRow.Issend_dateNull() ? (Nullable <DateTime>)null : _thisRow.send_date;
                this.m_iFrequency  = _thisRow.Isfrequency_idNull() ? (Nullable <Int32>)null : _thisRow.frequency_id;
                this.m_iUserId     = _thisRow.Isuser_idNull() ? (Nullable <Int32>)null : _thisRow.user_id;
                this.m_bIsMailSent = _thisRow.IsisMailSentNull() ? (Nullable <Boolean>)null : _thisRow.isMailSent;
                this.m_bIsSmsSent  = _thisRow.IsisSmsSentNull() ? (Nullable <Boolean>)null : _thisRow.isSmsSent;

                //  this.m_dt_ts = _thisRow.Is_tsNull() ? (Nullable<DateTime>) null : _thisRow._ts ;
                _rowToSave = _thisRow;
            }
        }
Example #3
0
        protected override void SaveToRow()
        {
            SummitDS.ScheduledUsersDataTable _thisTable = new SummitDS.ScheduledUsersDataTable();
            if (_rowToSave == null)
            {
                _rowToSave = _thisTable.NewScheduledUsersRow();
            }
            SummitDS.ScheduledUsersRow _dataRow = _rowToSave as SummitDS.ScheduledUsersRow;

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

                    //_dataRow.customer_id = this.m_iCustomerId;
                    //_dataRow.vehiclestatus_id = this.m_iVehicleStatusId;
                    if (m_dtSendDate.HasValue)
                    {
                        _dataRow.send_date = m_dtSendDate.Value;
                    }
                    else
                    {
                        _dataRow.Setsend_dateNull();
                    }

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

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

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


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

                    //_dataRow.customer_id = this.m_iCustomerId;
                    //_dataRow.vehiclestatus_id = this.m_iVehicleStatusId;
                    if (m_dtSendDate.HasValue)
                    {
                        _dataRow.send_date = m_dtSendDate.Value;
                    }
                    else
                    {
                        _dataRow.Setsend_dateNull();
                    }

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

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


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

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

                    _thisTable.AddScheduledUsersRow(_dataRow);
                }
            }
        }