Exemplo n.º 1
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 30-3-2015
        /// Comments :: Select all records for CampaignQueue details based on CampaignQueueid.
        /// </summary>
        public List <CampaignQueue> CampaignQueueSelectbasedonid(int CampaignQueueid)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstCampaignQueue        = new List <CampaignQueue>();

            var Select = (from cde in objEmailCampDataContext.spCampaignQueue_AllActions(CampaignQueueid, null, null, null, null, null, null, null, null, null, null, null, null, null, null, ref val, "s")
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstCampaignQueue = new List <CampaignQueue>();
                foreach (var item in Select)
                {
                    objCampaignQueue = new CampaignQueue();
                    objCampaignQueue.PK_CampaignQueueID = item.PK_CampaignQueueID;

                    if (item.FK_CampaignID != null)
                    {
                        objCampaignQueue.FK_CampaignID = Convert.ToInt32(item.FK_CampaignID);
                    }

                    objCampaignQueue.SentOn            = item.SentOn;
                    objCampaignQueue.MailFailedContent = item.MailFailedContent;
                    objCampaignQueue.IsMailSent        = item.IsMailSent;
                    objCampaignQueue.IsBounced         = item.isBounced;
                    objCampaignQueue.Isdelivered       = item.Isdelivered;
                    objCampaignQueue.IsHardBounce      = item.IsHardBounce;
                    objCampaignQueue.IsRead            = item.IsRead;

                    if (item.ReadCount != null)
                    {
                        objCampaignQueue.ReadCount = Convert.ToByte(item.ReadCount.ToString());
                    }

                    if (item.FK_ContactID != null)
                    {
                        objCampaignQueue.FK_ContactID = Convert.ToInt32(item.FK_ContactID);
                    }

                    objCampaignQueue.CreatedBy = item.CreatedBy;
                    objCampaignQueue.CreatedOn = item.CreatedOn;
                    objCampaignQueue.UpdatedBy = item.UpdatedBy;
                    objCampaignQueue.UpdatedOn = item.UpdatedOn;

                    lstCampaignQueue.Add(objCampaignQueue);
                }
            }
            objEmailCampDataContext = null;
            objCampaignQueue        = null;
            return(lstCampaignQueue);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 30-3-2015
        /// Comments :: Updation function of CampaignQueue details.
        /// </summary>
        #region Delete_CampaignQueueCreation
        public void CampaignQueueDelete(int CampaignQueueid)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Delete = (from cde in objEmailCampDataContext.spCampaignQueue_AllActions(CampaignQueueid, null, null, null, null, null, null, null, null, null, null, null, null, null, null, ref val, "d")
                              select cde).ToList();

                Delete                  = null;
                objCampaignQueue        = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 30-3-2015
        /// Comments :: Updation function of CampaignQueue details.
        /// </summary>
        #region Update_CampaignQueueCreation
        public void CampaignQueueUpdate(CampaignQueue objCampaignQueue)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Update = (from cde in objEmailCampDataContext.spCampaignQueue_AllActions(objCampaignQueue.PK_CampaignQueueID, objCampaignQueue.FK_CampaignID, objCampaignQueue.SentOn, objCampaignQueue.MailFailedContent, objCampaignQueue.IsMailSent, objCampaignQueue.IsBounced, objCampaignQueue.Isdelivered, objCampaignQueue.IsHardBounce, objCampaignQueue.IsRead, objCampaignQueue.ReadCount, objCampaignQueue.CreatedBy, objCampaignQueue.CreatedOn, objCampaignQueue.UpdatedBy, objCampaignQueue.UpdatedOn, objCampaignQueue.FK_ContactID, ref val, "u")
                              select cde).ToList();

                Update                  = null;
                objCampaignQueue        = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
        private string CampaignQueueInsert(bool status, int contactid)
        {
            objCampaignQueue = new CampaignQueue();
            objBL_CampaignQueue = new BL_CampaignQueue();
            objCampaignQueue.FK_CampaignID = Convert.ToInt32(Session["CampgnID"].ToString());

            if (status == true)
                objCampaignQueue.SentOn = DateTime.Now;

            objCampaignQueue.IsMailSent = status;
            objCampaignQueue.CreatedBy = Convert.ToInt32(Session["UserID"].ToString());
            objCampaignQueue.CreatedOn = DateTime.Now;

            if (contactid != 0)
                objCampaignQueue.FK_ContactID = contactid;

            string pkcqid = objBL_CampaignQueue.AccessInsertCampignQueue(objCampaignQueue);
            objCampaignQueue = null;
            objBL_CampaignQueue = null;
            return pkcqid;
        }
Exemplo n.º 5
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 27-5-2015
        /// Comments :: Insertion function of CampaignQueue details.
        /// </summary>
        #region Insert_CampaignQueueCreation
        public string CampaignQueueInsert(CampaignQueue objCampaignQueue)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();
                long?totrow = 0;
                var  Insert = (from cde in objEmailCampDataContext.spCampaignQueue_AllActions(objCampaignQueue.PK_CampaignQueueID, objCampaignQueue.FK_CampaignID, objCampaignQueue.SentOn, objCampaignQueue.MailFailedContent, objCampaignQueue.IsMailSent, objCampaignQueue.IsBounced, objCampaignQueue.Isdelivered, objCampaignQueue.IsHardBounce, objCampaignQueue.IsRead, objCampaignQueue.ReadCount, objCampaignQueue.CreatedBy, objCampaignQueue.CreatedOn, objCampaignQueue.UpdatedBy, objCampaignQueue.UpdatedOn, objCampaignQueue.FK_ContactID, ref totrow, "i")
                               select cde).ToList();
                //totrow = (int)objEmailCampDataContext.spCampaignQueue_AllActions(objCampaignQueue.PK_CampaignQueueID, objCampaignQueue.FK_CampaignID, objCampaignQueue.SentOn, objCampaignQueue.MailFailedContent, objCampaignQueue.IsMailSent, objCampaignQueue.IsBounced, objCampaignQueue.Isdelivered, objCampaignQueue.IsHardBounce, objCampaignQueue.IsRead, objCampaignQueue.ReadCount, objCampaignQueue.CreatedBy, objCampaignQueue.CreatedOn, objCampaignQueue.UpdatedBy, objCampaignQueue.UpdatedOn, objCampaignQueue.FK_ContactID, ref val, "i").ReturnValue;

                Insert = null;

                objEmailCampDataContext = null;
                return(totrow.ToString());
            }
            catch (Exception ex)
            {
                ex.ToString();
                return(null);
            }
        }
Exemplo n.º 6
0
 public void AccessUpdateCampignQueue(CampaignQueue objCampaignQueue1)
 {
     objDL_CampaignQueue.CampaignQueueUpdate(objCampaignQueue1);
 }
Exemplo n.º 7
0
        public string AccessInsertCampignQueue(CampaignQueue objCampaignQueue1)
        {
            string pkid = objDL_CampaignQueue.CampaignQueueInsert(objCampaignQueue1);

            return(pkid);
        }