コード例 #1
0
ファイル: MarketingUsers.cs プロジェクト: AlohaGEM-CRM/Summit
        protected override void SaveToRow()
        {
            SummitDS.MarketingUsersDataTable _thisTable = new SummitDS.MarketingUsersDataTable();
            if (_rowToSave == null)
            {
                _rowToSave = _thisTable.NewMarketingUsersRow();
            }
            SummitDS.MarketingUsersRow _dataRow = _rowToSave as SummitDS.MarketingUsersRow;

            if (_dataRow != null)
            {
                if (IsExisting())
                {
                    if (bisShowInProcess.HasValue)
                    {
                        _dataRow.isShowInProcess = bisShowInProcess.Value;
                    }
                    else
                    {
                        _dataRow.SetisShowInProcessNull();
                    }

                    if (iContactMethod.HasValue)
                    {
                        _dataRow.contactMethod = iContactMethod.Value;
                    }
                    else
                    {
                        _dataRow.SetcontactMethodNull();
                    }

                    // throw new DataException("Record Already Existed.");
                }
                else
                {
                    _dataRow.user_id    = iUserId;
                    _dataRow.shop_id    = iShopId;
                    _dataRow.vehicle_id = iVehicleId;
                    if (bisShowInProcess.HasValue)
                    {
                        _dataRow.isShowInProcess = bisShowInProcess.Value;
                    }
                    else
                    {
                        _dataRow.SetisShowInProcessNull();
                    }

                    if (iContactMethod.HasValue)
                    {
                        _dataRow.contactMethod = iContactMethod.Value;
                    }
                    else
                    {
                        _dataRow.SetcontactMethodNull();
                    }

                    _thisTable.AddMarketingUsersRow(_dataRow);
                }
            }
        }
コード例 #2
0
ファイル: MarketingUsers.cs プロジェクト: AlohaGEM-CRM/Summit
        protected override void LoadFromRow(DataRow _dataRow)
        {
            SummitDS.MarketingUsersRow _thisRow = _dataRow as SummitDS.MarketingUsersRow;

            if (_thisRow != null)
            {
                this.iUserId            = _thisRow.user_id;
                this.iShopId            = _thisRow.shop_id;
                this.m_bIsShowInProcess = _thisRow.IsisShowInProcessNull() ? (Nullable <Boolean>)null : _thisRow.isShowInProcess;
                this.m_iContactMethod   = _thisRow.IscontactMethodNull() ? (Nullable <Int32>)null : _thisRow.contactMethod;
                this.m_iVehicleId       = _thisRow.vehicle_id;
                _rowToSave = _thisRow;
            }
        }