Beispiel #1
0
 public static ConnectAPIBL getDataByShopId(Int32 ShopId)
 {
     SummitDS.ConnectAPIDataTable thisTable = getAdapter().GetDataByShopId(ShopId);
     if (thisTable != null && thisTable.Rows.Count > 0)
     {
         return(BuildFromRow(thisTable.Rows[0]));
     }
     return(null);
 }
Beispiel #2
0
 public static List <ConnectAPIBL> getDataForAllShops()
 {
     SummitDS.ConnectAPIDataTable thisTable = getAdapter().GetData();
     if (thisTable != null && thisTable.Rows.Count > 0)
     {
         return(BuildFromTable(thisTable));
     }
     return(null);
 }
Beispiel #3
0
        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);
                }
            }
        }