예제 #1
0
 public static DataTable BindAllContactsTargetedByAssignCamp_Unsub_Search(string where, string ConnectionString, string CampignID, string orderby, string dir, int pageIndex, int pageSize, out int Count)
 {
     try
     {
         using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
         {
             bool ExecutionState = false;
             oDatabaseHelper.AddParameter("@whereCondition", where);
             oDatabaseHelper.AddParameter("@AssignedCampaignID", CampignID);
             oDatabaseHelper.AddParameter("@orderby", orderby);
             oDatabaseHelper.AddParameter("@dir", dir);
             oDatabaseHelper.AddParameter("@PageIndex", pageIndex);
             oDatabaseHelper.AddParameter("@PageSize", pageSize);
             oDatabaseHelper.AddParameter("@Count", -1, System.Data.ParameterDirection.Output);
             DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_ListContactMaster_ShowContactsTargetedWithAssignCampaignID_Pagewise_Search", ref ExecutionState);
             Count = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@Count"].Value);
             oDatabaseHelper.Dispose();
             return ds.Tables[0];
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #2
0
 public static DataTable SearchDomainLookup(string ConnectionString, string Domain, string ListIds)
 {
     try
     {
         using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
         {
             bool ExecutionState = false;
             //StringBuilder whereCondition = new StringBuilder();
             //Domain = Domain.Replace("'", "''");
             //Domain = Domain.Replace("%", "[%]");
             //Domain = Domain.Replace("_", "[_]");
             //if (!string.IsNullOrEmpty(Domain))
             //{
             //    if (whereCondition.Length > 0)
             //        whereCondition.Append(" OR %" + Domain + "%");
             //    else whereCondition.Append(" %" + Domain + "%");
             //}
             //if (whereCondition.Length == 0)
             //{
             //    whereCondition.Append("1=1");
             //}
             string whereCondition = "%" + Domain + "%";
             oDatabaseHelper.AddParameter("@ListIDs", ListIds.ToString());
             oDatabaseHelper.AddParameter("@whereCondition", whereCondition.ToString());
             DataSet dataSet = oDatabaseHelper.ExecuteDataSet("sp_ListMaster_SearchDomainName", ref ExecutionState);
             return dataSet.Tables[0];
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #3
0
 public static DataTable GetContactStatusByEmailIdsWithActiveStatus(string ConnectionString, DataTable tblEmailAddress)
 {
     DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
     bool ExecutionState = false;
     oDatabaseHelper.AddParameter("@TableEmailIds", tblEmailAddress);
     DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_SelectContactStatusByEmailId_Active", ref ExecutionState);
     oDatabaseHelper.Dispose();
     return ds.Tables[0];
 }
예제 #4
0
 public static DataTable GetAllBounceAndUnsubDetailsByType(string ConnectionString, string Type)
 {
     DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
     bool ExecutionState = false;
     oDatabaseHelper.AddParameter("@Type", Type);
     DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_GetAllBounceAndUnsubRecipientsByType", ref ExecutionState);
     oDatabaseHelper.Dispose();
     return ds.Tables[0];
 }
예제 #5
0
 public static DataTable getSegmentDetails(long segmentId, string ConnectionString)
 {
     DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
     bool ExecutionState = false;
     oDatabaseHelper.AddParameter("@SegmentID", segmentId);
     oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);
     DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_SegmentMaster_GetSegmentDetails", ref ExecutionState);
     oDatabaseHelper.Dispose();
     return ds.Tables[0];
 }
예제 #6
0
 public static DataTable GetAllRecipientsByListMasterIds(StringBuilder strbSelectedLists, string ConnectionString)
 {
     DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
     bool ExecutionState = false;
     // The parameter '@ErrorCode' will contain the status after execution of the stored procedure.
     oDatabaseHelper.AddParameter("@listids", strbSelectedLists.ToString());
     DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_GetAllRecipientsByListMasterIds", ref ExecutionState);
     oDatabaseHelper.Dispose();
     return ds.Tables[0];
 }
예제 #7
0
        //This method will get contact(s) of a particulat list from listcontactmaster table
        //public DataTable getCustomLabel(Int64 TemplateID, Int64 CampaignID)
        //{
        //    try
        //    {
        //        using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
        //        {
        //            bool ExecutionState = false;
        //            oDatabaseHelper.AddParameter("@CampaignID", CampaignID.ToString());
        //            oDatabaseHelper.AddParameter("@TemplateID", TemplateID.ToString());
        //            DataSet dataSet =
        //                oDatabaseHelper.ExecuteDataSet("sp_GetCustomLabel", ref ExecutionState);
        //            return dataSet.Tables[0];
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //}
        //This method will get contact(s) of a particulat list from listcontactmaster table
        public DataTable getSuppressDomain(Int64 CampaignID)
        {
            bool ExecutionState = false;
            using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
            {
                string qryStr = "select * from DomineSupress where CampaignId = " + CampaignID;
                DataSet dataSet = oDatabaseHelper.ExecuteDataSet(qryStr, CommandType.Text, ref ExecutionState);
                return dataSet.Tables[0];

            }
        }
예제 #8
0
        public int SelectEmailCount(string ClientName, string ConnectionString)
        {
            DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
            bool ExecutionState = false;

            oDatabaseHelper.AddParameter("@ClientName", ClientName);

            DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_Material_GetTierSizeByClient", ref ExecutionState);

            //we get only single column and row value in this so return single value
            return Convert.ToInt32(ds.Tables[0].Rows[0][0]);
        }
예제 #9
0
        public static DataTable SelectAllTemplateNames(string ConnectionString, int CategoryID)
        {
            DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
            bool ExecutionState = false;

            oDatabaseHelper.AddParameter("@CategoryID", CategoryID);
            // The parameter '@ErrorCode' will contain the status after execution of the stored procedure.
            oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);

            DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_CategoryTemplateMaster_SelectAllTemplateNames", ref ExecutionState);
            oDatabaseHelper.Dispose();
            return ds.Tables[0];
        }
예제 #10
0
        public static DataTable SelectAllCategoryNames(string ConnectionString)
        {
            DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
            bool ExecutionState = false;

            // The parameter '@ErrorCode' will contain the status after execution of the stored procedure.
            oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);

            //IDataReader dr = oDatabaseHelper.ExecuteReader("sp_CategoryTemplateMaster_SelectAllCategoryNames", ref ExecutionState);
            //CategoryTemplateMasters CategoryTemplateMasters = PopulateObjectsFromReader(dr, ConnectionString);
            //dr.Close();
            DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_CategoryTemplateMaster_SelectAllCategoryNames", ref ExecutionState);
            oDatabaseHelper.Dispose();
            return ds.Tables[0];
        }
예제 #11
0
 public static DataTable GetAllAdvancedImportContactsPageWise(string ConnectionString, string OrderBy, string sortdir, int pageSize, int pageIndex, out int rowCount)
 {
     DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
     bool ExecutionState = false;
     oDatabaseHelper.AddParameter("@orderby", OrderBy);
     oDatabaseHelper.AddParameter("@dir", sortdir);
     oDatabaseHelper.AddParameter("@PageIndex", pageIndex);
     oDatabaseHelper.AddParameter("@PageSize", pageSize);
     oDatabaseHelper.AddParameter("@Count", -1, System.Data.ParameterDirection.Output);
     oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);
     DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_RecipienMaster_GetAllContacts_PageWise", ref ExecutionState);
     rowCount = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@Count"].Value);
     oDatabaseHelper.Dispose();
     return ds.Tables[0];
 }
예제 #12
0
        public static DataSet GetTemplatesInDraftByTemplateIds(string TemplateIds, string ConnectionString)
        {
            try
            {
                using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
                {
                    bool ExecutionState = false;
                    oDatabaseHelper.AddParameter("@TemplateIDs", TemplateIds);
                    DataSet dataSet = oDatabaseHelper.ExecuteDataSet("sp_TemplateMaster_ShowTemplatesUsedInDraftMails_CustomProc", ref ExecutionState);
                    return dataSet;
                }
            }
            catch (Exception ex)
            {
                throw ex;

            }
        }
예제 #13
0
 public DataTable getAllMailingLinkUrls(String ConnectionString, string MailingName, string orderby, string dir)
 {
     try
     {
         using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
         {
             bool ExecutionState = false;
             oDatabaseHelper.AddParameter("@MailingName", MailingName);
             oDatabaseHelper.AddParameter("@orderby", orderby);
             oDatabaseHelper.AddParameter("@dir", dir);
             DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_ContactMaster_GetLinkURLsByCampName_AMMRpt", ref ExecutionState);
             oDatabaseHelper.Dispose();
             return ds.Tables[0];
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #14
0
        public static DataTable AdvanceSearchSelectLookup(string ConnectionString, string ListName)
        {
            try
            {
                using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
                {
                    bool ExecutionState = false;

                    StringBuilder whereCondition = new StringBuilder();

                    ListName = ListName.Replace("'", "''");

                    ListName = ListName.Replace("%", "[%]");
                    ListName = ListName.Replace("_", "[_]");

                    if (!string.IsNullOrEmpty(ListName))
                    {
                        if (whereCondition.Length > 0)
                            whereCondition.Append(" OR ListName LIKE '%" + ListName + "%'");
                        else whereCondition.Append(" ListName LIKE '%" + ListName + "%'");
                    }

                    if (whereCondition.Length == 0)
                    {
                        whereCondition.Append("1=1");
                    }

                    oDatabaseHelper.AddParameter("@whereCondition", whereCondition.ToString());

                    oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);

                    DataSet dataSet = oDatabaseHelper.ExecuteDataSet("sp_AdvanceListMaster_SearchSelectNew", ref ExecutionState);
                    return dataSet.Tables[0];

                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #15
0
        public DataTable getCustomLabel(Int64 TemplateID, Int64 CampaignID)
        {
            try
            {
                using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
                {

                    bool ExecutionState = false;
                    oDatabaseHelper.AddParameter("@CampaignID", CampaignID.ToString());
                    oDatabaseHelper.AddParameter("@TemplateID", TemplateID.ToString());

                    DataSet dataSet =
                        oDatabaseHelper.ExecuteDataSet("sp_GetCustomLabel", ref ExecutionState);
                    return dataSet.Tables[0];

                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #16
0
        public static DataSet GetSegmentResult(string ConString, string CampaignIds, string whereCondition, string orderBy, string dir, string keyValue, string segType)
        {
            try
            {
                using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConString))
                {
                    bool ExecutionState = false;
                    oDatabaseHelper.AddParameter("@CampaignIds", CampaignIds);
                    oDatabaseHelper.AddParameter("@whereCondition", whereCondition);
                    oDatabaseHelper.AddParameter("@orderby", orderBy);
                    oDatabaseHelper.AddParameter("@dir", dir);
                    oDatabaseHelper.AddParameter("@keyValue", keyValue);
                    oDatabaseHelper.AddParameter("@segType", segType);
                    DataSet dataSet = oDatabaseHelper.ExecuteDataSet("sp_ListContactMaster_ShowRecipientsOfCampaign_CustomProc", ref ExecutionState);
                    return dataSet;
                }
            }
            catch (Exception ex)
            {
                throw ex;

            }
        }
예제 #17
0
 public DataTable getAllCountsOfCampaignsWithFilePagewise(String ConnectionString, string orderby, string dir, int pageIndex, int pageSize, out int count)
 {
     try
     {
         using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
         {
             bool ExecutionState = false;
             oDatabaseHelper.AddParameter("@orderby", orderby);
             oDatabaseHelper.AddParameter("@dir", dir);
             oDatabaseHelper.AddParameter("@PageIndex", pageIndex);
             oDatabaseHelper.AddParameter("@PageSize", pageSize);
             oDatabaseHelper.AddParameter("@TotalRowsCount", -1, System.Data.ParameterDirection.Output);
             DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_getAllCountsOfCampaignsWithFile_Pagewise", ref ExecutionState);
             count = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@TotalRowsCount"].Value);
             oDatabaseHelper.Dispose();
             return ds.Tables[0];
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #18
0
 public static DataTable BindAllContactsTargeted(string ConnectionString, string ListIds, string orderby, string dir, int pageIndex, int pageSize, out int Count)
 {
     try
     {
         using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
         {
             bool ExecutionState = false;
             oDatabaseHelper.AddParameter("@ListID", ListIds);
             oDatabaseHelper.AddParameter("@orderby", orderby);
             oDatabaseHelper.AddParameter("@dir", dir);
             oDatabaseHelper.AddParameter("@PageIndex", pageIndex);
             oDatabaseHelper.AddParameter("@PageSize", pageSize);
             oDatabaseHelper.AddParameter("@Count", -1, System.Data.ParameterDirection.Output);
             DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_ListContactMaster_ShowListRecipientsWithCampaignID_Pagewise", ref ExecutionState);
             Count = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@Count"].Value);
             oDatabaseHelper.Dispose();
             return ds.Tables[0];
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #19
0
 public static DataTable getAllSentCampaignsOlderThan90Days(String ConnectionString, string orderby, string dir,int pageIndex, int pageSize, out int count)
 {
     try
     {
         using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
         {
             bool ExecutionState = false;
             //oDatabaseHelper.AddParameter("@status", status);
             oDatabaseHelper.AddParameter("@orderby", orderby);
             oDatabaseHelper.AddParameter("@dir", dir);
             oDatabaseHelper.AddParameter("@PageIndex", pageIndex);
             oDatabaseHelper.AddParameter("@PageSize", pageSize);
             oDatabaseHelper.AddParameter("@Count", -1, System.Data.ParameterDirection.Output);
             DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_CampaignJob_SelectAll_OlderThan90Days", ref ExecutionState);
             count = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@Count"].Value);
             oDatabaseHelper.Dispose();
             return ds.Tables[0];
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #20
0
 //State
 public DataTable getCampaignRptByState(String ConnectionString, string campId, string orderby, string dir, int pageIndex, int pageSize, out int count)
 {
     try
     {
         using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
         {
             bool ExecutionState = false;
             oDatabaseHelper.AddParameter("@AssignedCampaignID", campId);
             oDatabaseHelper.AddParameter("@orderby", orderby);
             oDatabaseHelper.AddParameter("@dir", dir);
             oDatabaseHelper.AddParameter("@PageIndex", pageIndex);
             oDatabaseHelper.AddParameter("@PageSize", pageSize);
             oDatabaseHelper.AddParameter("@TotalRecs", -1, System.Data.ParameterDirection.Output);
             DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_ContactMaster_GetStateRecsByCampId_Pagewise_AMMRpt", ref ExecutionState);
             count = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@TotalRecs"].Value);
             oDatabaseHelper.Dispose();
             return ds.Tables[0];
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #21
0
 public DataTable getAllSentMailingsByCampId_PageWise(String ConnectionString, string orderby, string dir, int AssignCampId, int pageIndex, int pageSize,
     out long totalMailings, out long totalOpens, out long totalClicks, out long totalSubmits)
 {
     try
     {
         using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
         {
             bool ExecutionState = false;
             oDatabaseHelper.AddParameter("@AssignedCampID", Convert.ToInt64(AssignCampId));
             oDatabaseHelper.AddParameter("@orderby", orderby);
             oDatabaseHelper.AddParameter("@dir", dir);
             oDatabaseHelper.AddParameter("@PageIndex", pageIndex);
             oDatabaseHelper.AddParameter("@PageSize", pageSize);
             //oDatabaseHelper.AddParameter("@TotalRecsCount", -1, System.Data.ParameterDirection.Output);
             oDatabaseHelper.AddParameter("@TotalNoOfMailings", -1, System.Data.ParameterDirection.Output);
             oDatabaseHelper.AddParameter("@TotalOpens", -1, System.Data.ParameterDirection.Output);
             oDatabaseHelper.AddParameter("@TotalClicks", -1, System.Data.ParameterDirection.Output);
             oDatabaseHelper.AddParameter("@TotalSubmits", -1, System.Data.ParameterDirection.Output);
             DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_CampaignJob_SelectAllMailingsWithCampaign", ref ExecutionState);
             //totalRecscount = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@TotalRecsCount"].Value);
             totalMailings = Convert.ToInt64(oDatabaseHelper.Command.Parameters["@TotalNoOfMailings"].Value);
             totalOpens = Convert.ToInt64(oDatabaseHelper.Command.Parameters["@TotalOpens"].Value);
             totalClicks = Convert.ToInt64(oDatabaseHelper.Command.Parameters["@TotalClicks"].Value);
             totalSubmits = Convert.ToInt64(oDatabaseHelper.Command.Parameters["@TotalSubmits"].Value);
             oDatabaseHelper.Dispose();
             return ds.Tables[0];
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #22
0
 // by Anwar on 6th feb  for Getting all sent camps
 public DataTable getAllSentCampaignsForCampaignSegment(String ConnectionString, string orderby, string dir, int status)
 {
     try
     {
         using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
         {
             bool ExecutionState = false;
             oDatabaseHelper.AddParameter("@status", status);
             oDatabaseHelper.AddParameter("@orderby", orderby);
             oDatabaseHelper.AddParameter("@dir", dir);
             DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_CampaignJob_SelectAll_WithCampaignMaster_CustomProc_Filter_StatusName", ref ExecutionState);
             oDatabaseHelper.Dispose();
             return ds.Tables[0];
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #23
0
 public DataTable getAllSentCampaignsByDateRangeDownload(string ConnectionString, string startDate, string endDate)
 {
     try
     {
         using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
         {
             bool ExecutionState = false;
             oDatabaseHelper.AddParameter("@FromDate", startDate);
             oDatabaseHelper.AddParameter("@ToDate", endDate);
             DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_CampaignJob_GetCampaignsReportBYDateRange_Download", ref ExecutionState);
             oDatabaseHelper.Dispose();
             return ds.Tables[0];
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #24
0
 public DataTable getAllSentCampaignsByDateRange(string ConnectionString, string startDate, string endDate, string orderby, string dir, int pageIndex, int pageSize, out int rowCount, out int targetedCount, out int sentCount, out int bounceCount)
 {
     try
     {
         using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
         {
             bool ExecutionState = false;
             oDatabaseHelper.AddParameter("@StartDay",startDate);
             oDatabaseHelper.AddParameter("@EndDay", endDate);
             oDatabaseHelper.AddParameter("@orderby", orderby);
             oDatabaseHelper.AddParameter("@dir", dir);
             oDatabaseHelper.AddParameter("@PageIndex", pageIndex);
             oDatabaseHelper.AddParameter("@PageSize", pageSize);
             oDatabaseHelper.AddParameter("@Count", -1, System.Data.ParameterDirection.Output);
             oDatabaseHelper.AddParameter("@Targeted", -1, System.Data.ParameterDirection.Output);
             oDatabaseHelper.AddParameter("@Delivered", -1, System.Data.ParameterDirection.Output);
             oDatabaseHelper.AddParameter("@Bounces", -1, System.Data.ParameterDirection.Output);
             DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_CampaignJob_GetCampaignsReportBYDateRange", ref ExecutionState);
             rowCount = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@Count"].Value);
             targetedCount = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@Targeted"].Value);
             sentCount = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@Delivered"].Value);
             bounceCount = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@Bounces"].Value);
             oDatabaseHelper.Dispose();
             return ds.Tables[0];
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #25
0
 public DataTable getAllFblContactsByDateClient_Pagewise(string ConnectionString, string orderby, string dir, int pageIndex, int pageSize, out int rowCount)
 {
     try
     {
         using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
         {
             bool ExecutionState = false;
             oDatabaseHelper.AddParameter("@orderby", orderby);
             oDatabaseHelper.AddParameter("@dir", dir);
             oDatabaseHelper.AddParameter("@PageIndex", pageIndex);
             oDatabaseHelper.AddParameter("@PageSize", pageSize);
             oDatabaseHelper.AddParameter("@Count", -1, System.Data.ParameterDirection.Output);
             DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_MailFbl_ShowFblContactsListByClient_Pagewise", ref ExecutionState);
             rowCount = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@Count"].Value);
             oDatabaseHelper.Dispose();
             return ds.Tables[0];
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #26
0
 public DataTable getTop10MailingLinkUrlsByCampaign(String ConnectionString, string campId)
 {
     try
     {
         using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
         {
             bool ExecutionState = false;
             oDatabaseHelper.AddParameter("@AssignedCampaignID", campId);
             DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_ContactMaster_GetTop10LinkURLsByCampId_AMMRpt", ref ExecutionState);
             oDatabaseHelper.Dispose();
             return ds.Tables[0];
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #27
0
 //Year of Grad
 public DataTable getMailingRptByYearofGrade(String ConnectionString, string MailingName,string FieldName,  string orderby, string dir, int pageIndex, int pageSize, out int count)
 {
     try
     {
         using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
         {
             bool ExecutionState = false;
             oDatabaseHelper.AddParameter("@MailingName", MailingName);
             oDatabaseHelper.AddParameter("@FieldName", FieldName);
             oDatabaseHelper.AddParameter("@orderby", orderby);
             oDatabaseHelper.AddParameter("@dir", dir);
             oDatabaseHelper.AddParameter("@PageIndex", pageIndex);
             oDatabaseHelper.AddParameter("@PageSize", pageSize);
             oDatabaseHelper.AddParameter("@TotalRecs", -1, System.Data.ParameterDirection.Output);
             DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_ContactMaster_GetYearOfGradRecsByMailingName_Pagewise_AMMRpt", ref ExecutionState);
             count = Convert.ToInt32(oDatabaseHelper.Command.Parameters["@TotalRecs"].Value);
             oDatabaseHelper.Dispose();
             return ds.Tables[0];
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #28
0
        public DataTable getAllCampaignsWithStatus(String ConnectionString, string orderby, string dir, int status)
        {
            try
            {
                using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
                {
                    bool ExecutionState = false;
                    oDatabaseHelper.AddParameter("@status", status);
                    oDatabaseHelper.AddParameter("@orderby", orderby);
                    oDatabaseHelper.AddParameter("@dir", dir);
                    //DataTable dt = new DataTable();
                    //// Add the table columns.
                    //for (int i = 0; i < drCampaigns.FieldCount; i++)
                    //    dt.Columns.Add(drCampaigns.GetName(i), drCampaigns.GetFieldType(i));

                    //while (drCampaigns.Read())
                    //{
                    //    DataRow r = dt.NewRow();
                    //    // Assign DataReader values to DataRow.
                    //    for (int i = 0; i < drCampaigns.FieldCount; i++)
                    //        r[i] = drCampaigns[i];
                    //    dt.Rows.Add(r);
                    //}

                    //drCampaigns.Close();
                    DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_CampaignJob_SelectAll_WithCampaignMaster_CustomProc_Filter", ref ExecutionState);
                    oDatabaseHelper.Dispose();
                    return ds.Tables[0];
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #29
0
 public static DataTable SelectAllContactIdsByForeignKeyFromCampaignMaster(int CampId, String ConnectionString)
 {
     DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString);
     bool ExecutionState = false;
     oDatabaseHelper.AddParameter("@CampaignId", CampId);
     oDatabaseHelper.AddParameter("@ErrorCode", -1, System.Data.ParameterDirection.Output);
     DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_RPT_EmailOpenDetails_SelectDistinctContactIDByForeignKeyCampaignMaster", ref ExecutionState);
     oDatabaseHelper.Dispose();
     return ds.Tables[0];
 }
예제 #30
0
 public DataTable getAllFblContactsByDateClient(string ConnectionString)
 {
     try
     {
         using (DatabaseHelper oDatabaseHelper = new DatabaseHelper(ConnectionString))
         {
             bool ExecutionState = false;
             DataSet ds = oDatabaseHelper.ExecuteDataSet("sp_MailFbl_ShowFblContactsListByClient", ref ExecutionState);
             oDatabaseHelper.Dispose();
             return ds.Tables[0];
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }