/// <summary> /// Get data by shop ,user and frequency Id /// </summary> /// <param name="iShopId">shop id</param> /// <param name="iUserId">user id</param> /// <param name="iFrequencyId">frequency id</param> /// <returns>instance of ReocurringCampaignUsersBL</returns> public static ReocurringCampaignUsersBL getDataByShopIdUserIdAndFreqId(Int32 iShopId, Int32 iUserId, Int32 iFrequencyId) { SummitDS.ReocurringCampaignUsersDataTable thisTable = getAdapter().GetDataByShopUserAndFrequencyId(iShopId, iUserId, iFrequencyId); if (thisTable != null && thisTable.Rows.Count > 0) { if (BuildFromRow(thisTable.Rows[0]) != null) { return(BuildFromRow(thisTable.Rows[0])); } } return(null); }
public static ReocurringCampaignUsersBL getDataById(Int32 iRowId) { SummitDS.ReocurringCampaignUsersDataTable thisTable = getAdapter().GetDataById(iRowId); if (thisTable != null && thisTable.Rows.Count > 0) { if (BuildFromRow(thisTable.Rows[0]) != null) { return(BuildFromRow(thisTable.Rows[0])); } } return(null); }
/// <summary> /// Get List of ReocurringCampaignUsersBL instances by Frequency id /// </summary> /// <param name="iFrequencyId">Frequency Id</param> /// <param name="iShopId">shop id</param> /// <param name="days">number of days</param> /// <returns>List of ReocurringCampaignUsersBL instances</returns> public static List <ReocurringCampaignUsersBL> getCampaignUsers(Int32 iFrequencyId, Int32 iShopId, Int32 days) { SummitDS.ReocurringCampaignUsersDataTable thisTable = getAdapter().GetDataByFrequencyId(iFrequencyId, iShopId, days); if (thisTable != null && thisTable.Rows.Count > 0) { List <ReocurringCampaignUsersBL> list = new List <ReocurringCampaignUsersBL>(); list = BuildFromTable(thisTable); if (list != null) { return(list); } } return(null); }
protected override void SaveToRow() { SummitDS.ReocurringCampaignUsersDataTable _thisTable = new SummitDS.ReocurringCampaignUsersDataTable(); if (_rowToSave == null) { _rowToSave = _thisTable.NewReocurringCampaignUsersRow(); } SummitDS.ReocurringCampaignUsersRow _dataRow = _rowToSave as SummitDS.ReocurringCampaignUsersRow; if (_dataRow != null) { if (IsExisting()) { if (iShopID.HasValue) { _dataRow.shop_id = iShopID.Value; } else { _dataRow.Setshop_idNull(); } if (iVehicleID.HasValue) { _dataRow.vehicle_id = iVehicleID.Value; } else { _dataRow.Setvehicle_idNull(); } if (iFrequencyID.HasValue) { _dataRow.frequency_id = iFrequencyID.Value; } else { _dataRow.Setfrequency_idNull(); } if (iUserID.HasValue) { _dataRow.user_id = iUserID.Value; } else { _dataRow.Setuser_idNull(); } if (bIsMailSent.HasValue) { _dataRow.isMailSent = bIsMailSent.Value; } else { _dataRow.SetisMailSentNull(); } if (bIsSmsSent.HasValue) { _dataRow.isSmsSent = bIsSmsSent.Value; } else { _dataRow.SetisSmsSentNull(); } if (m_dtDeliveredDate.HasValue) { _dataRow.delivered_date = m_dtDeliveredDate.Value; } else { _dataRow.Setdelivered_dateNull(); } if (m_iEmailTemplateId.HasValue) { _dataRow.email_template_id = m_iEmailTemplateId.Value; } else { _dataRow.Setemail_template_idNull(); } } else { if (bIsMailSent.HasValue) { _dataRow.isMailSent = bIsMailSent.Value; } else { _dataRow.SetisMailSentNull(); } if (bIsSmsSent.HasValue) { _dataRow.isSmsSent = bIsSmsSent.Value; } else { _dataRow.SetisSmsSentNull(); } if (iShopID.HasValue) { _dataRow.shop_id = iShopID.Value; } else { _dataRow.Setshop_idNull(); } if (iVehicleID.HasValue) { _dataRow.vehicle_id = iVehicleID.Value; } else { _dataRow.Setvehicle_idNull(); } if (iFrequencyID.HasValue) { _dataRow.frequency_id = iFrequencyID.Value; } else { _dataRow.Setfrequency_idNull(); } if (iUserID.HasValue) { _dataRow.user_id = iUserID.Value; } else { _dataRow.Setuser_idNull(); } if (m_dtDeliveredDate.HasValue) { _dataRow.delivered_date = m_dtDeliveredDate.Value; } else { _dataRow.Setdelivered_dateNull(); } if (m_iEmailTemplateId.HasValue) { _dataRow.email_template_id = m_iEmailTemplateId.Value; } else { _dataRow.Setemail_template_idNull(); } _thisTable.AddReocurringCampaignUsersRow(_dataRow); } } }