Example #1
0
 protected override void SetID()
 {
     SummitDS.User_PreferredShopRow thisRow = _rowToSave as SummitDS.User_PreferredShopRow;
     if (thisRow != null)
     {
         this._ID = thisRow.ID;
     }
 }
Example #2
0
        protected override void SaveToRow()
        {
            SummitDS.User_PreferredShopDataTable _thisTable = new SummitDS.User_PreferredShopDataTable();
            if (_rowToSave == null)
            {
                _rowToSave = _thisTable.NewUser_PreferredShopRow();
            }
            SummitDS.User_PreferredShopRow _dataRow = _rowToSave as SummitDS.User_PreferredShopRow;

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

                    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();
                    }

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

                    _thisTable.AddUser_PreferredShopRow(_dataRow);
                }
            }
        }
Example #3
0
        protected override void LoadFromRow(DataRow _dataRow)
        {
            SummitDS.User_PreferredShopRow _thisRow = _dataRow as SummitDS.User_PreferredShopRow;

            if (_thisRow != null)
            {
                this._ID = _thisRow.ID;

                this.m_iShopId = _thisRow.Isshop_idNull() ? (Nullable <Int32>)null : _thisRow.shop_id;
                this.m_iUserId = _thisRow.Isuser_idNull() ? (Nullable <Int32>)null : _thisRow.user_id;

                //  this.m_dt_ts = _thisRow.Is_tsNull() ? (Nullable<DateTime>) null : _thisRow._ts ;
                _rowToSave = _thisRow;
            }
        }