コード例 #1
0
ファイル: ConnectAPIBL.cs プロジェクト: AlohaGEM-CRM/Summit
 protected override void SetID()
 {
     SummitDS.ConnectAPIRow thisRow = _rowToSave as SummitDS.ConnectAPIRow;
     if (thisRow != null)
     {
         this._ID = thisRow.Id;
     }
 }
コード例 #2
0
ファイル: ConnectAPIBL.cs プロジェクト: AlohaGEM-CRM/Summit
        protected override void LoadFromRow(DataRow _dataRow)
        {
            SummitDS.ConnectAPIRow _thisRow = _dataRow as SummitDS.ConnectAPIRow;

            if (_thisRow != null)
            {
                this._ID              = _thisRow.Id;
                this.m_iShopId        = _thisRow.ShopId;
                this.m_strPartnerKey  = _thisRow.IsPartnerKeyNull() ? String.Empty : _thisRow.PartnerKey;
                this.m_strClientKey   = _thisRow.IsClientKeyNull() ? String.Empty : _thisRow.ClientKey;
                this.m_dtCreatedDate  = _thisRow.IsCreatedDateNull() ? (Nullable <DateTime>)null : _thisRow.CreatedDate;
                this.m_dtLastSyncDate = _thisRow.IsLastSyncDateNull() ? (Nullable <DateTime>)null : _thisRow.LastSyncDate;
                this.m_dtFromDate     = _thisRow.IsFromDateNull() ? (Nullable <DateTime>)null : _thisRow.FromDate;

                _rowToSave = _thisRow;
            }
        }
コード例 #3
0
ファイル: ConnectAPIBL.cs プロジェクト: AlohaGEM-CRM/Summit
        protected override void SaveToRow()
        {
            SummitDS.ConnectAPIDataTable _thisTable = new SummitDS.ConnectAPIDataTable();
            if (_rowToSave == null)
            {
                _rowToSave = _thisTable.NewConnectAPIRow();
            }
            SummitDS.ConnectAPIRow _dataRow = _rowToSave as SummitDS.ConnectAPIRow;

            if (_dataRow != null)
            {
                _dataRow.ShopId = m_iShopId;

                if (!String.IsNullOrEmpty(m_strPartnerKey))
                {
                    _dataRow.PartnerKey = m_strPartnerKey;
                }
                else
                {
                    _dataRow.SetPartnerKeyNull();
                }

                if (!String.IsNullOrEmpty(m_strClientKey))
                {
                    _dataRow.ClientKey = m_strClientKey;
                }
                else
                {
                    _dataRow.SetClientKeyNull();
                }

                if (m_dtCreatedDate.HasValue)
                {
                    _dataRow.CreatedDate = m_dtCreatedDate.Value;
                }
                else
                {
                    _dataRow.SetCreatedDateNull();
                }

                if (m_dtLastSyncDate.HasValue)
                {
                    _dataRow.LastSyncDate = m_dtLastSyncDate.Value;
                }
                else
                {
                    _dataRow.SetLastSyncDateNull();
                }

                if (m_dtFromDate.HasValue)
                {
                    _dataRow.FromDate = m_dtFromDate.Value;
                }
                else
                {
                    _dataRow.SetLastSyncDateNull();
                }

                if (!IsExisting())
                {
                    _thisTable.AddConnectAPIRow(_dataRow);
                }
            }
        }