Exemple #1
0
        protected override void SaveToRow()
        {
            SummitDS.UserDataTable _thisTable = new SummitDS.UserDataTable();
            if (_rowToSave == null)
            {
                _rowToSave = _thisTable.NewUserRow();
            }
            SummitDS.UserRow _dataRow = _rowToSave as SummitDS.UserRow;

            if (_dataRow != null)
            {
                if (IsExisting())
                {
                    if (String.IsNullOrEmpty(m_strEmail))
                    {
                        if (!_dataRow.IsemailNull())
                        {
                            _dataRow.SetemailNull();
                        }
                    }
                    else if (_dataRow.IsemailNull() ? true : _dataRow.email != m_strEmail)
                    {
                        _dataRow.email = m_strEmail;
                    }

                    if (String.IsNullOrEmpty(m_strPhone))
                    {
                        if (!_dataRow.IsphoneNull())
                        {
                            _dataRow.SetphoneNull();
                        }
                    }
                    else if (_dataRow.IsphoneNull() ? true : _dataRow.phone != m_strPhone)
                    {
                        _dataRow.phone = m_strPhone;
                    }

                    if (String.IsNullOrEmpty(m_strUserName))
                    {
                        if (!_dataRow.IsusernameNull())
                        {
                            _dataRow.SetusernameNull();
                        }
                    }
                    else if (_dataRow.IsusernameNull() ? true : _dataRow.username != m_strUserName)
                    {
                        _dataRow.username = m_strUserName;
                    }

                    if (String.IsNullOrEmpty(m_strZip))
                    {
                        if (!_dataRow.IszipNull())
                        {
                            _dataRow.SetzipNull();
                        }
                    }
                    else if (_dataRow.IszipNull() ? true : _dataRow.zip != m_strZip)
                    {
                        _dataRow.zip = m_strZip;
                    }

                    if (!m_dtAppDownLoadDate.HasValue)
                    {
                        if (!_dataRow.IsappDownLoadDateNull())
                        {
                            _dataRow.SetappDownLoadDateNull();
                        }
                    }
                    else if (_dataRow.IsappDownLoadDateNull() ? true : _dataRow.appDownLoadDate != m_dtAppDownLoadDate.Value)
                    {
                        _dataRow.appDownLoadDate = m_dtAppDownLoadDate.Value;
                    }

                    if (bIsRegistred.HasValue)
                    {
                        _dataRow.isRegistred = bIsRegistred.Value;
                    }
                    else
                    {
                        _dataRow.SetisRegistredNull();
                    }

                    if (bIsNew.HasValue)
                    {
                        _dataRow.isNew = bIsNew.Value;
                    }
                    else
                    {
                        _dataRow.SetisNewNull();
                    }

                    if (bIsRegistred_Shop.HasValue)
                    {
                        _dataRow.isRegistred_Shop = bIsRegistred_Shop.Value;
                    }
                    else
                    {
                        _dataRow.SetisRegistred_ShopNull();
                    }

                    if (String.IsNullOrEmpty(m_strPhone_Id))
                    {
                        if (!_dataRow.Isphone_idNull())
                        {
                            _dataRow.Setphone_idNull();
                        }
                    }
                    else if (_dataRow.Isphone_idNull() ? true : _dataRow.phone_id != m_strPhone_Id)
                    {
                        _dataRow.phone_id = m_strPhone_Id;
                    }

                    if (String.IsNullOrEmpty(m_strFirstName))
                    {
                        if (!_dataRow.Isfirst_nameNull())
                        {
                            _dataRow.Setfirst_nameNull();
                        }
                    }
                    else if (_dataRow.Isfirst_nameNull() ? true : _dataRow.first_name != m_strFirstName)
                    {
                        _dataRow.first_name = m_strFirstName;
                    }

                    if (String.IsNullOrEmpty(m_strLastName))
                    {
                        if (!_dataRow.Islast_nameNull())
                        {
                            _dataRow.Setlast_nameNull();
                        }
                    }
                    else if (_dataRow.Islast_nameNull() ? true : _dataRow.last_name != m_strLastName)
                    {
                        _dataRow.last_name = m_strLastName;
                    }

                    if (String.IsNullOrEmpty(m_strAddress1))
                    {
                        if (!_dataRow.Isaddress1Null())
                        {
                            _dataRow.Setaddress1Null();
                        }
                    }
                    else if (_dataRow.Isaddress1Null() ? true : _dataRow.address1 != m_strAddress1)
                    {
                        _dataRow.address1 = m_strAddress1;
                    }

                    if (String.IsNullOrEmpty(m_strAddress2))
                    {
                        if (!_dataRow.Isaddress2Null())
                        {
                            _dataRow.Setaddress2Null();
                        }
                    }
                    else if (_dataRow.Isaddress2Null() ? true : _dataRow.address2 != m_strAddress2)
                    {
                        _dataRow.address2 = m_strAddress2;
                    }

                    if (String.IsNullOrEmpty(m_strCity))
                    {
                        if (!_dataRow.IscityNull())
                        {
                            _dataRow.SetcityNull();
                        }
                    }
                    else if (_dataRow.IscityNull() ? true : _dataRow.city != m_strCity)
                    {
                        _dataRow.city = m_strCity;
                    }

                    if (String.IsNullOrEmpty(m_strState))
                    {
                        if (!_dataRow.IsstateNull())
                        {
                            _dataRow.SetstateNull();
                        }
                    }
                    else if (_dataRow.IsstateNull() ? true : _dataRow.state != m_strState)
                    {
                        _dataRow.state = m_strState;
                    }

                    if (bIsShow.HasValue)
                    {
                        _dataRow.isShow = bIsShow.Value;
                    }
                    else
                    {
                        _dataRow.SetisShowNull();
                    }

                    if (bIsShowEmailMarketing.HasValue)
                    {
                        _dataRow.isShowEmailMarketing = bIsShowEmailMarketing.Value;
                    }
                    else
                    {
                        _dataRow.SetisShowEmailMarketingNull();
                    }

                    if (bIsShowTextMarketing.HasValue)
                    {
                        _dataRow.isShowTextMarketing = bIsShowTextMarketing.Value;
                    }
                    else
                    {
                        _dataRow.SetisShowTextMarketingNull();
                    }

                    if (dtUpdatedEntryTime.HasValue)
                    {
                        _dataRow.updatedEntryTime = dtUpdatedEntryTime.Value;
                    }
                    else
                    {
                        _dataRow.SetupdatedEntryTimeNull();
                    }

                    if (String.IsNullOrEmpty(m_strPhone2))
                    {
                        if (!_dataRow.Isphone2Null())
                        {
                            _dataRow.Setphone2Null();
                        }
                    }
                    else if (_dataRow.Isphone2Null() ? true : _dataRow.phone2 != m_strPhone2)
                    {
                        _dataRow.phone2 = m_strPhone2;
                    }

                    if (bIsOptOutNotificationSent.HasValue)
                    {
                        _dataRow.isOptOutNotificationSent = bIsOptOutNotificationSent.Value;
                    }
                    else
                    {
                        _dataRow.SetisOptOutNotificationSentNull();
                    }

                    if (bIsOptedOutForMobileMessage.HasValue)
                    {
                        _dataRow.isOptedOutForMobileMessage = bIsOptedOutForMobileMessage.Value;
                    }
                    else
                    {
                        _dataRow.SetisOptedOutForMobileMessageNull();
                    }

                    if (String.IsNullOrEmpty(m_strPush_notification_device_id))
                    {
                        _dataRow.Setpush_notification_device_idNull();
                    }
                    else
                    {
                        _dataRow.push_notification_device_id = strPush_notification_device_id;
                    }

                    if (iDeviceType.HasValue)
                    {
                        _dataRow.Device_Type = iDeviceType.Value;
                    }
                    else
                    {
                        _dataRow.SetDevice_TypeNull();
                    }
                }
                else
                {
                    if (String.IsNullOrEmpty(strEmail))
                    {
                        _dataRow.SetemailNull();
                    }
                    else
                    {
                        _dataRow.email = strEmail;
                    }

                    if (String.IsNullOrEmpty(strPhone))
                    {
                        _dataRow.SetphoneNull();
                    }
                    else
                    {
                        _dataRow.phone = strPhone;
                    }

                    if (String.IsNullOrEmpty(m_strUserName))
                    {
                        if (!_dataRow.IsusernameNull())
                        {
                            _dataRow.SetusernameNull();
                        }
                    }
                    else if (_dataRow.IsusernameNull() ? true : _dataRow.username != m_strUserName)
                    {
                        _dataRow.username = m_strUserName;
                    }

                    if (String.IsNullOrEmpty(strZip))
                    {
                        _dataRow.SetzipNull();
                    }
                    else
                    {
                        _dataRow.zip = strZip;
                    }

                    if (dtAppDownLoadDate.HasValue)
                    {
                        _dataRow.appDownLoadDate = dtAppDownLoadDate.Value;
                    }
                    else
                    {
                        _dataRow.SetappDownLoadDateNull();
                    }

                    if (bIsRegistred.HasValue)
                    {
                        _dataRow.isRegistred = bIsRegistred.Value;
                    }
                    else
                    {
                        _dataRow.SetisRegistredNull();
                    }

                    if (bIsNew.HasValue)
                    {
                        _dataRow.isNew = bIsNew.Value;
                    }
                    else
                    {
                        _dataRow.SetisNewNull();
                    }

                    if (bIsRegistred_Shop.HasValue)
                    {
                        _dataRow.isRegistred_Shop = bIsRegistred_Shop.Value;
                    }
                    else
                    {
                        _dataRow.SetisRegistred_ShopNull();
                    }

                    if (String.IsNullOrEmpty(strPhone_Id))
                    {
                        _dataRow.Setphone_idNull();
                    }
                    else
                    {
                        _dataRow.phone_id = strPhone_Id;
                    }

                    if (String.IsNullOrEmpty(strFirstName))
                    {
                        _dataRow.Setfirst_nameNull();
                    }
                    else
                    {
                        _dataRow.first_name = strFirstName;
                    }

                    if (String.IsNullOrEmpty(strLastName))
                    {
                        _dataRow.Setlast_nameNull();
                    }
                    else
                    {
                        _dataRow.last_name = strLastName;
                    }

                    if (String.IsNullOrEmpty(strAddress1))
                    {
                        _dataRow.Setaddress1Null();
                    }
                    else
                    {
                        _dataRow.address1 = strAddress1;
                    }

                    if (String.IsNullOrEmpty(strAddress2))
                    {
                        _dataRow.Setaddress2Null();
                    }
                    else
                    {
                        _dataRow.address2 = strAddress2;
                    }

                    if (String.IsNullOrEmpty(strCity))
                    {
                        _dataRow.SetcityNull();
                    }
                    else
                    {
                        _dataRow.city = strCity;
                    }

                    if (String.IsNullOrEmpty(strState))
                    {
                        _dataRow.SetstateNull();
                    }
                    else
                    {
                        _dataRow.state = strState;
                    }

                    if (bIsShow.HasValue)
                    {
                        _dataRow.isShow = bIsShow.Value;
                    }
                    else
                    {
                        _dataRow.SetisShowNull();
                    }

                    if (bIsShowEmailMarketing.HasValue)
                    {
                        _dataRow.isShowEmailMarketing = bIsShowEmailMarketing.Value;
                    }
                    else
                    {
                        _dataRow.SetisShowEmailMarketingNull();
                    }

                    if (bIsShowTextMarketing.HasValue)
                    {
                        _dataRow.isShowTextMarketing = bIsShowTextMarketing.Value;
                    }
                    else
                    {
                        _dataRow.SetisShowTextMarketingNull();
                    }

                    if (dtUpdatedEntryTime.HasValue)
                    {
                        _dataRow.updatedEntryTime = dtUpdatedEntryTime.Value;
                    }
                    else
                    {
                        _dataRow.SetupdatedEntryTimeNull();
                    }

                    if (String.IsNullOrEmpty(m_strPhone2))
                    {
                        if (!_dataRow.Isphone2Null())
                        {
                            _dataRow.Setphone2Null();
                        }
                    }
                    else if (_dataRow.Isphone2Null() ? true : _dataRow.phone2 != m_strPhone2)
                    {
                        _dataRow.phone2 = m_strPhone2;
                    }

                    if (bIsOptOutNotificationSent.HasValue)
                    {
                        _dataRow.isOptOutNotificationSent = bIsOptOutNotificationSent.Value;
                    }
                    else
                    {
                        _dataRow.SetisOptOutNotificationSentNull();
                    }

                    if (bIsOptedOutForMobileMessage.HasValue)
                    {
                        _dataRow.isOptedOutForMobileMessage = bIsOptedOutForMobileMessage.Value;
                    }
                    else
                    {
                        _dataRow.SetisOptedOutForMobileMessageNull();
                    }

                    if (String.IsNullOrEmpty(m_strPush_notification_device_id))
                    {
                        _dataRow.Setpush_notification_device_idNull();
                    }
                    else
                    {
                        _dataRow.push_notification_device_id = strPush_notification_device_id;
                    }

                    if (iDeviceType.HasValue)
                    {
                        _dataRow.Device_Type = iDeviceType.Value;
                    }
                    else
                    {
                        _dataRow.SetDevice_TypeNull();
                    }

                    _thisTable.AddUserRow(_dataRow);
                }
            }
        }