public static List <AIManageRecurringActivityBL> getData()
 {
     SummitDS.AIManageRecurringActivityDataTable thisTable = getAdapter().GetData();
     if (thisTable != null && thisTable.Rows.Count > 0)
     {
         return(BuildFromTable(thisTable));
     }
     return(null);
 }
 public static AIManageRecurringActivityBL getDataByShopIdUserIdAndDeliveryDate(Int32 iUserId, Int32 iShopId, DateTime dtDeliveryDate)
 {
     SummitDS.AIManageRecurringActivityDataTable thisTable = getAdapter().GetDataByShopIdUserIdAndDeliveryDate(iUserId, iShopId, dtDeliveryDate);
     if (thisTable != null && thisTable.Rows.Count > 0)
     {
         return(BuildFromRow(thisTable.Rows[0]));
     }
     return(null);
 }
        public static List <AIManageRecurringActivityBL> GetUnprocessedDataForAddingRecurringInfo()
        {
            SummitDS.AIManageRecurringActivityDataTable thisTable = getAdapter().GetUnprocessedDataForAddingRecurringInfo();
            List <AIManageRecurringActivityBL>          lstAIManageRecurringActivityBL = null;

            if (thisTable != null && thisTable.Rows.Count > 0)
            {
                lstAIManageRecurringActivityBL = BuildFromTable(thisTable);
            }
            return(lstAIManageRecurringActivityBL);
        }
        protected override void SaveToRow()
        {
            SummitDS.AIManageRecurringActivityDataTable _thisTable = new SummitDS.AIManageRecurringActivityDataTable();
            if (_rowToSave == null)
            {
                _rowToSave = _thisTable.NewAIManageRecurringActivityRow();
            }
            SummitDS.AIManageRecurringActivityRow _dataRow = _rowToSave as SummitDS.AIManageRecurringActivityRow;

            if (_dataRow != null)
            {
                if (IsExisting())
                {
                    _dataRow.ShopId       = m_iShopId;
                    _dataRow.UserId       = m_iUserId;
                    _dataRow.DeliveryDate = m_dtDeliveryDate;

                    if (m_IsProcessed == null)
                    {
                        if (!_dataRow.IsIsProcessedNull())
                        {
                            _dataRow.SetIsProcessedNull();
                        }
                    }
                    else if (_dataRow.IsIsProcessedNull() ? true : _dataRow.IsProcessed != m_IsProcessed)
                    {
                        _dataRow.IsProcessed = m_IsProcessed.Value;
                    }

                    if (dtProcessedDate.HasValue)
                    {
                        _dataRow.ProcessedDate = dtProcessedDate.Value;
                    }
                    else
                    {
                        _dataRow.SetProcessedDateNull();
                    }
                }
                else
                {
                    _dataRow.ShopId       = m_iShopId;
                    _dataRow.UserId       = m_iUserId;
                    _dataRow.DeliveryDate = m_dtDeliveryDate;

                    if (m_IsProcessed == null)
                    {
                        if (!_dataRow.IsIsProcessedNull())
                        {
                            _dataRow.SetIsProcessedNull();
                        }
                    }
                    else if (_dataRow.IsIsProcessedNull() ? true : _dataRow.IsProcessed != m_IsProcessed)
                    {
                        _dataRow.IsProcessed = m_IsProcessed.Value;
                    }

                    if (dtProcessedDate.HasValue)
                    {
                        _dataRow.ProcessedDate = dtProcessedDate.Value;
                    }
                    else
                    {
                        _dataRow.SetProcessedDateNull();
                    }

                    _thisTable.AddAIManageRecurringActivityRow(_dataRow);
                }
            }
        }