예제 #1
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 30-4-2015
        /// Comments :: Select all records for ListContacts grid.
        /// </summary>
        #region Select_All_Records_ListContactsgrid
        public List <ListContacts> ListContactsgrid()
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstListContacts         = new List <ListContacts>();

            var Select = (from cde in objEmailCampDataContext.spListContacts_AllActions(null, null, null, null, null, null, null, null, "c")
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstListContacts = new List <ListContacts>();
                foreach (var item in Select)
                {
                    objListContacts          = new ListContacts();
                    objListContacts.ListName = item.ListName;
                    //objListContacts.TotalCount = item.;
                    objListContacts.CreatedOn     = item.CreatedOn;
                    objListContacts.CreatedBy     = item.CreatedBy;
                    objListContacts.UpdatedBy     = item.UpdatedBy;
                    objListContacts.UpdatedOn     = item.UpdatedOn;
                    objListContacts.PK_ContListID = item.PK_ContListID;
                    lstListContacts.Add(objListContacts);
                }
            }
            objEmailCampDataContext = null;
            objListContacts         = null;
            return(lstListContacts);
        }
예제 #2
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 28-4-2015
        /// Comments :: Select all records for ListContacts details.
        /// </summary>
        #region Select_All_Records_CreateListContacts
        public List <ListContacts> ListContactsSelect(int PK_ContListID)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstListContacts         = new List <ListContacts>();

            var Select = (from cde in objEmailCampDataContext.spListContacts_AllActions(PK_ContListID, null, null, null, null, null, null, null, "a")
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstListContacts = new List <ListContacts>();
                foreach (var item in Select)
                {
                    objListContacts              = new ListContacts();
                    objListContacts.ListName     = item.ListName;
                    objListContacts.Comments     = item.comments;
                    objListContacts.CreatedOn    = item.CreatedOn;
                    objListContacts.CreatedBy    = item.CreatedBy;
                    objListContacts.UpdatedBy    = item.UpdatedBy;
                    objListContacts.UpdatedOn    = item.UpdatedOn;
                    objListContacts.FK_CompanyID = item.FK_CompanyID;
                    lstListContacts.Add(objListContacts);
                }
            }
            objEmailCampDataContext = null;
            objListContacts         = null;
            return(lstListContacts);
        }
        public List<ListContacts> ListContactsgrid()
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstListContacts = new List<ListContacts>();

            var Select = (from cde in objEmailCampDataContext.spListContacts_AllActions(null, null, null, null, null, null, null, null, "c")
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstListContacts = new List<ListContacts>();
                foreach (var item in Select)
                {
                    objListContacts = new ListContacts();
                    objListContacts.ListName = item.ListName;
                    //objListContacts.TotalCount = item.;
                    objListContacts.CreatedOn = item.CreatedOn;
                    objListContacts.CreatedBy = item.CreatedBy;
                    objListContacts.UpdatedBy = item.UpdatedBy;
                    objListContacts.UpdatedOn = item.UpdatedOn;
                    objListContacts.PK_ContListID = item.PK_ContListID;
                    lstListContacts.Add(objListContacts);
                }
            }
            objEmailCampDataContext = null;
            objListContacts = null;
            return lstListContacts;
        }
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 2-4-2015
        /// Comments :: Select all records for Company details.
        /// </summary>
        #region Select_All_Records_CreateCompany
        public List <Company> CompanySelectbasedonid(int id)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstCompany = new List <Company>();

            var Select = (from cde in objEmailCampDataContext.spCompany_AllActions(id, null, null, null, null, null, null, null, null, null, null, null, "s")
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstCompany = new List <Company>();
                foreach (var item in Select)
                {
                    objCompany = new Company();
                    objCompany.Addressline1 = Convert.ToString(item.addressline1);
                    objCompany.City1        = Convert.ToString(item.city1);
                    objCompany.CreatedBy    = Convert.ToInt16(item.CreatedBy);
                    objCompany.CreatedOn    = Convert.ToDateTime(item.CreatedOn);
                    objCompany.UpdatedBy    = Convert.ToInt16(item.UpdatedBy);
                    objCompany.UpdatedOn    = Convert.ToDateTime(item.UpdatedOn);
                    objCompany.Company_Name = item.Company_Name;
                    objCompany.ContactNo    = item.ContactNo;
                    objCompany.Country1     = item.country1;
                    objCompany.PK_CompanyID = item.PK_CompanyID;
                    objCompany.Email_id     = item.email_id;
                    objCompany.State1       = item.state1;
                    lstCompany.Add(objCompany);
                }
            }
            objEmailCampDataContext = null;
            objCompany = null;
            return(lstCompany);
        }
        public List<Company> CompanySelectbasedonid(int id)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstCompany = new List<Company>();

            var Select = (from cde in objEmailCampDataContext.spCompany_AllActions(id, null, null, null, null, null, null, null, null, null, null, null, "s")
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstCompany = new List<Company>();
                foreach (var item in Select)
                {
                    objCompany = new Company();
                    objCompany.Addressline1 = Convert.ToString(item.addressline1);
                    objCompany.City1 = Convert.ToString(item.city1);
                    objCompany.CreatedBy = Convert.ToInt16(item.CreatedBy);
                    objCompany.CreatedOn = Convert.ToDateTime(item.CreatedOn);
                    objCompany.UpdatedBy = Convert.ToInt16(item.UpdatedBy);
                    objCompany.UpdatedOn = Convert.ToDateTime(item.UpdatedOn);
                    objCompany.Company_Name = item.Company_Name;
                    objCompany.ContactNo = item.ContactNo;
                    objCompany.Country1 = item.country1;
                    objCompany.PK_CompanyID = item.PK_CompanyID;
                    objCompany.Email_id = item.email_id;
                    objCompany.State1 = item.state1;
                    lstCompany.Add(objCompany);
                }
            }
            objEmailCampDataContext = null;
            objCompany = null;
            return lstCompany;
        }
예제 #6
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 24-9-2015
        /// Comments :: Select all records for Campaign details based on uertype and companyid.
        /// </summary>
        #region Select_MailCount
        public string SelectMailCount(int companyid, DateTime ActiveFrom, DateTime ActiveTo)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            long?totrow = 0;
            var  Select = (from cde in objEmailCampDataContext.spCampaignQueue_AllActions(companyid, null, null, null, null, null, null, null, null, null, null, ActiveFrom, null, ActiveTo, null, ref totrow, "e")
                           select cde).ToList();

            return(totrow.ToString());
        }
예제 #7
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 29-6-2015
        /// Comments :: Insertion function of Userplantype details.
        /// </summary>
        #region Insert_UserplantypeCreation
        public void UserplantypeInsert(Userplantype objUserplantype)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            var Insert = (from cde in objEmailCampDataContext.spPlanType_AllActions(objUserplantype.PK_PlanID, objUserplantype.PlanName, objUserplantype.IsSingleUser, objUserplantype.Planrate, objUserplantype.NOC, objUserplantype.AllowedMails, objUserplantype.IsActive, objUserplantype.CreatedBy, objUserplantype.CreatedOn, objUserplantype.UpdatedBy, objUserplantype.UpdatedOn, objUserplantype.Plandate, "i")
                          select cde).ToList();

            Insert = null;

            objEmailCampDataContext = null;
        }
        public void UserplantypeInsert(Userplantype objUserplantype)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            var Insert = (from cde in objEmailCampDataContext.spPlanType_AllActions(objUserplantype.PK_PlanID, objUserplantype.PlanName, objUserplantype.IsSingleUser, objUserplantype.Planrate, objUserplantype.NOC, objUserplantype.AllowedMails, objUserplantype.IsActive, objUserplantype.CreatedBy, objUserplantype.CreatedOn, objUserplantype.UpdatedBy, objUserplantype.UpdatedOn, objUserplantype.Plandate, "i")
                          select cde).ToList();

            Insert = null;

            objEmailCampDataContext = null;
        }
예제 #9
0
        public DataSet CampaignReportSelectforgridBasedonFilter(string uertype, int companyid, string CampName, string Title, Nullable <DateTime> CreatedOn, string all)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstCampaignreport       = new List <campaignreport>();


            var Select = (from cde in objEmailCampDataContext.spCampaign_AllActions(null, companyid, CampName, Title, null, null, null, null, all, null, CreatedOn, null, null, null, null, null, null, null, uertype)
                          select cde).ToList();


            if (Select.Count > 0)
            {
                lstCampaignreport = new List <campaignreport>();
                foreach (var item in Select)
                {
                    objcampaignreport = new campaignreport();
                    objcampaignreport.CampaignName    = Convert.ToString(item.CampaignName);
                    objcampaignreport.CampTimezone    = Convert.ToString(item.CampTimezone);
                    objcampaignreport.CreatedBy       = item.CreatedBy;
                    objcampaignreport.CreatedOn       = item.CreatedOn;
                    objcampaignreport.UpdatedBy       = item.UpdatedBy;
                    objcampaignreport.UpdatedOn       = item.UpdatedOn;
                    objcampaignreport.Emailid         = item.Emailid;
                    objcampaignreport.FK_UserID       = item.FK_UserID;
                    objcampaignreport.FromName        = item.FromName;
                    objcampaignreport.PK_CampaignID   = item.PK_CampaignID;
                    objcampaignreport.SchduleDateTime = item.SchduleDateTime;
                    objcampaignreport.Title           = item.Title;
                    objcampaignreport.Utctime         = item.utctime;
                    objcampaignreport.CampaignStatus  = item.CampaignStatus;
                    objcampaignreport.mailcontent     = item.mailcontent;
                    objcampaignreport.Subscribers     = item.Subscribers;
                    objcampaignreport.mailsent        = item.mailsent;
                    objcampaignreport.SentOn          = item.SentOn;
                    lstCampaignreport.Add(objcampaignreport);
                }
            }


            objEmailCampDataContext = null;
            objcampaignreport       = null;
            DataSet converted = new DataSet();

            if (lstCampaignreport.Count > 0)
            {
                converted.Tables.Add(ListToDataSet.newTable(lstCampaignreport));
                return(converted);
            }
            else
            {
                converted.Tables.Add(ListToDataSet.newTableColumnAlone(lstCampaignreport));
                return(converted);
            }
        }
예제 #10
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 15-9-2015
        /// Comments :: Insertion function of UserPlan details.
        /// </summary>
        #region Insert_UserPlanCreation
        public string UserPlanInsert(UserPlan objUserPlan)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            int?totrow = 0;
            var Insert = (from cde in objEmailCampDataContext.spUserPlan_AllActions(objUserPlan.PK_UserPlanID, objUserPlan.FK_UserID, objUserPlan.FK_PlanID, objUserPlan.ActiveFrom, objUserPlan.ActiveTo, objUserPlan.IsActive, objUserPlan.CreatedBy, objUserPlan.CreatedOn, objUserPlan.UpdatedBy, objUserPlan.UpdatedOn, "i")
                          select cde).ToList();

            Insert = null;

            objEmailCampDataContext = null;
            return(totrow.ToString());
        }
예제 #11
0
        public string RoleInsert(Role objRole)
        {
            objEmailCampDataContext = new EmailCampDataContext();
                int? totrow = 0;
                var Insert = (from cde in objEmailCampDataContext.spRole_AllActions(objRole.PK_RoleID, objRole.FK_CompanyID, objRole.RoleName, objRole.CampaignCreate, objRole.MailSend, objRole.CreateUser, objRole.CampaignDelete, objRole.ViewingReports, objRole.TemplateView, objRole.CreatedBy, objRole.CreatedOn, objRole.UpdatedBy, objRole.UpdatedOn, objRole.ListExports, ref totrow, "i")
                              select cde).ToList();

                Insert = null;
                objRole = null;
                objEmailCampDataContext = null;
                return totrow.ToString();
        }
예제 #12
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 23-3-2015
        /// Comments :: Insertion function of Role details.
        /// </summary>
        #region Insert_RoleCreation
        public string RoleInsert(Role objRole)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            int?totrow = 0;
            var Insert = (from cde in objEmailCampDataContext.spRole_AllActions(objRole.PK_RoleID, objRole.FK_CompanyID, objRole.RoleName, objRole.CampaignCreate, objRole.MailSend, objRole.CreateUser, objRole.CampaignDelete, objRole.ViewingReports, objRole.TemplateView, objRole.CreatedBy, objRole.CreatedOn, objRole.UpdatedBy, objRole.UpdatedOn, objRole.ListExports, ref totrow, "i")
                          select cde).ToList();

            Insert  = null;
            objRole = null;
            objEmailCampDataContext = null;
            return(totrow.ToString());
        }
예제 #13
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 30-3-2015
        /// Comments :: Check user credentials and retrieve records for UserDetails .
        /// </summary>
        #region Select_Records_CreateUserDetailsforlogin
        public List <UserDetails> UserDetailsSelectforLogin(string UserName, string Password)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstUserDetails          = new List <UserDetails>();

            var Select = (from cde in objEmailCampDataContext.spUserLogin_AllActions(null, null, null, null, UserName, null, null, null, null, null, null, null, UserName, null, null, null, null, null, null, null, null, null, null, null, null, null, null, Password, null, null, null, "p")
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstUserDetails = new List <UserDetails>();
                foreach (var item in Select)
                {
                    objUserDetails                    = new UserDetails();
                    objUserDetails.PK_UserID          = item.PK_UserID;
                    objUserDetails.FK_CompanyID       = Convert.ToInt16(item.FK_CompanyID);
                    objUserDetails.LastName           = item.LastName;
                    objUserDetails.FirstName          = item.FirstName;
                    objUserDetails.UserName           = item.UserName;
                    objUserDetails.UserType           = Convert.ToInt16(item.UserType);
                    objUserDetails.Addressline1       = item.addressline1;
                    objUserDetails.City1              = item.city1;
                    objUserDetails.State1             = item.state1;
                    objUserDetails.Country1           = item.country1;
                    objUserDetails.Designation        = item.Designation;
                    objUserDetails.DateOfBirth        = item.DateOfBirth;
                    objUserDetails.Email_id           = item.email_id;
                    objUserDetails.ContactNo          = item.ContactNo;
                    objUserDetails.AlternativeNo      = item.AlternativeNo;
                    objUserDetails.MemberSince        = Convert.ToDateTime(item.MemberSince);
                    objUserDetails.MemberTill         = Convert.ToDateTime(item.MemberTill);
                    objUserDetails.IsActive           = item.IsActive;
                    objUserDetails.CreatedBy          = item.CreatedBy;
                    objUserDetails.CreatedOn          = item.CreatedOn;
                    objUserDetails.UpdatedBy          = item.UpdatedBy;
                    objUserDetails.UpdatedOn          = item.UpdatedOn;
                    objUserDetails.ReportID           = item.ReportID;
                    objUserDetails.FK_RoleID          = item.FK_RoleID;
                    objUserDetails.TotalMailCount     = item.TotalMailCount;
                    objUserDetails.TotalContactsCount = item.TotalContactsCount;
                    objUserDetails.FK_UserPlanID      = item.FK_UserPlanID;
                    objUserDetails.UserPassword       = item.UserPassword;
                    objUserDetails.UserPhoto          = item.UserPhoto;
                    objUserDetails.AccountActivated   = Convert.ToBoolean(item.AccountActivated);
                    objUserDetails.SendNewsLetter     = Convert.ToBoolean(item.SendNewsLetter);
                    lstUserDetails.Add(objUserDetails);
                }
            }
            objEmailCampDataContext = null;
            objUserDetails          = null;
            return(lstUserDetails);
        }
예제 #14
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 25-6-2015
        /// Comments :: Insertion function of InviteUser details.
        /// </summary>
        #region Insert_InviteUserCreation
        public string InviteUserInsert(InviteUser objInviteUser)
        {
                objEmailCampDataContext = new EmailCampDataContext();
                int? totrow = 0;
                var Insert = (from cde in objEmailCampDataContext.spInviteUser_AllActions(objInviteUser.PK_Inviteid, objInviteUser.Emailid, objInviteUser.Invitedate, objInviteUser.FK_RoleID, objInviteUser.Message, objInviteUser.Mailsentstatus, objInviteUser.Expired, objInviteUser.ApproveStatus, objInviteUser.CreatedBy, objInviteUser.CreatedOn, objInviteUser.UpdatedBy, objInviteUser.UpdatedOn, objInviteUser.FK_CompanyID, ref totrow, "i")
                              select cde).ToList();

                Insert = null;
                
                objEmailCampDataContext = null;
                return totrow.ToString();
           
        }
예제 #15
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);
        }
예제 #16
0
        public DataSet SelectUserContactsbasedonIDFilter(string ContactName, string Designation, string city, string state, string country, string emailid, string contactno, int FKid, string alpha)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstUserContacts         = new List <UserContacts>();

            var Select = (from cde in objEmailCampDataContext.spUserContacts_AllActions(null, null, ContactName, Designation, alpha, city, state, country, emailid, null, contactno, FKid, null, null, null, null, "e")
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstUserContacts = new List <UserContacts>();
                foreach (var item in Select)
                {
                    objUserContacts = new UserContacts();
                    objUserContacts.Addressline1 = Convert.ToString(item.Addressline1);
                    objUserContacts.City1        = Convert.ToString(item.City1);
                    objUserContacts.CreatedBy    = item.CreatedBy;
                    objUserContacts.CreatedOn    = item.CreatedOn;
                    objUserContacts.UpdatedBy    = item.UpdatedBy;
                    objUserContacts.UpdatedOn    = item.UpdatedOn;
                    objUserContacts.Email_id     = item.email_id;
                    objUserContacts.FK_UserID    = item.FK_UserID;
                    objUserContacts.ContactName  = item.ContactName;
                    objUserContacts.PK_ContactID = Convert.ToInt16(item.PK_ContactID.ToString());
                    objUserContacts.State1       = item.State1;
                    objUserContacts.ContactNo    = item.ContactNo;
                    objUserContacts.Country1     = item.Country1;
                    objUserContacts.Designation  = item.Designation;
                    objUserContacts.MailContent  = item.MailContent;
                    objUserContacts.DateofBirth  = item.DateofBirth;
                    lstUserContacts.Add(objUserContacts);
                }
            }
            objEmailCampDataContext = null;
            objUserContacts         = null;
            DataSet converted = new DataSet();

            if (lstUserContacts.Count > 0)
            {
                converted.Tables.Add(ListToDataSet.newTable(lstUserContacts));
                return(converted);
            }
            else
            {
                converted.Tables.Add(ListToDataSet.newTableColumnAlone(lstUserContacts));
                return(converted);
            }
        }
예제 #17
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 30-3-2015
        /// Comments :: Select all records for Campaign details based on uertype and companyid.
        /// </summary>
        #region Select_All_Records_CreateCampaign
        public DataSet CampaignSelectforgrid(string uertype, Nullable <int> companyid, Nullable <int> userid, string alpha)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstCampaign             = new List <Campaign>();

            var Select = (from cde in objEmailCampDataContext.spCampaign_AllActions(null, userid, null, null, null, null, null, null, alpha, companyid, null, null, null, null, null, null, null, null, uertype)
                          select cde).ToList();


            if (Select.Count > 0)
            {
                lstCampaign = new List <Campaign>();
                foreach (var item in Select)
                {
                    objCampaign = new Campaign();
                    objCampaign.CampaignName    = Convert.ToString(item.CampaignName);
                    objCampaign.CampTimezone    = Convert.ToString(item.CampTimezone);
                    objCampaign.CreatedBy       = item.CreatedBy;
                    objCampaign.CreatedOn       = item.CreatedOn;
                    objCampaign.UpdatedBy       = item.UpdatedBy;
                    objCampaign.UpdatedOn       = item.UpdatedOn;
                    objCampaign.Emailid         = item.Emailid;
                    objCampaign.FK_UserID       = item.FK_UserID;
                    objCampaign.FromName        = item.FromName;
                    objCampaign.PK_CampaignID   = item.PK_CampaignID;
                    objCampaign.SchduleDateTime = item.SchduleDateTime;
                    objCampaign.Title           = item.Title;
                    objCampaign.Utctime         = item.utctime;
                    objCampaign.CampaignStatus  = item.CampaignStatus;
                    objCampaign.mailcontent     = item.mailcontent;
                    lstCampaign.Add(objCampaign);
                }
            }
            objEmailCampDataContext = null;
            objCampaign             = null;
            DataSet converted = new DataSet();

            if (lstCampaign.Count > 0)
            {
                converted.Tables.Add(ListToDataSet.newTable(lstCampaign));
                return(converted);
            }
            else
            {
                converted.Tables.Add(ListToDataSet.newTableColumnAlone(lstCampaign));
                return(converted);
            }
        }
예제 #18
0
        public int SelectUserContactsCountbasedonID(int FKid)
        {
            objEmailCampDataContext = new EmailCampDataContext();

            var Select = (from cde in objEmailCampDataContext.spUserContacts_AllActions(null, FKid, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "a")
                          select cde).ToList();
            int countrec = 0;

            if (Select.Count > 0)
            {
                countrec = Select.Count;
            }

            objEmailCampDataContext = null;
            return(countrec);
        }
예제 #19
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 7-4-2015
        /// Comments :: Select maximum primary key records for User Login details.
        /// </summary>
        #region Get_UserLogin_MAx_ID
        public int UserLoginMaxID()
        {
            objEmailCampDataContext = new EmailCampDataContext();

            var Select = (from cde in objEmailCampDataContext.spUserLogin_AllActions(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "a")
                          select cde).ToList();

            int lastUserLogin = 0;

            if (Select.Count > 0)
            {
                lastUserLogin = Convert.ToInt16(Select.LastOrDefault().PK_UserID);
            }
            objEmailCampDataContext = null;
            Select = null;
            return(lastUserLogin);
        }
예제 #20
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 6-4-2015
        /// Comments :: Select maximum primary key records for Company details.
        /// </summary>
        #region Get_Company_MAx_ID
        public int CompanyMaxID()
        {
            objEmailCampDataContext = new EmailCampDataContext();

            var Select = (from cde in objEmailCampDataContext.spCompany_AllActions(null, null, null, null, null, null, null, null, null, null, null, null, "a")
                          select cde).ToList();

            int lastCompany = 0;

            if (Select.Count > 0)
            {
                lastCompany = Convert.ToInt16(Select.LastOrDefault().PK_CompanyID);
            }
            objEmailCampDataContext = null;
            Select = null;
            return(lastCompany);
        }
        public int CompanyMaxID()
        {
            objEmailCampDataContext = new EmailCampDataContext();

            var Select = (from cde in objEmailCampDataContext.spCompany_AllActions(null, null, null, null, null, null, null, null, null, null, null, null, "a")
                          select cde).ToList();

            int lastCompany = 0;

            if (Select.Count > 0)
            {
                lastCompany = Convert.ToInt16(Select.LastOrDefault().PK_CompanyID);
            }
            objEmailCampDataContext = null;
            Select = null;
            return lastCompany;
        }
예제 #22
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 25-4-2015
        /// Comments :: Delete duplicate mail id from UserContacts.
        /// </summary>
        #region Delete_DuplicateEmailid_Uploading
        public void DeleteDuplicateEmailidUploading(int Contactlistid, int CreatedBy)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Delete = (from cde in objEmailCampDataContext.spUserContacts_AllActions(null, null, null, null, null, null, null, null, null, null, null, CreatedBy, null, null, null, null, "c")
                              select cde).ToList();

                Delete                  = null;
                objUserContacts         = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #23
0
        public void RoleDelete(int Roleid)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

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

                Delete = null;
                objRole = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
        public void CampaignInsert(Campaign objCampaign)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Insert = (from cde in objEmailCampDataContext.spCampaign_AllActions(objCampaign.PK_CampaignID, objCampaign.FK_UserID, objCampaign.CampaignName, objCampaign.Title, objCampaign.SchduleDateTime, objCampaign.CampTimezone, objCampaign.Utctime, objCampaign.FromName, objCampaign.Emailid, objCampaign.CreatedBy, objCampaign.CreatedOn, objCampaign.UpdatedBy, objCampaign.UpdatedOn, objCampaign.CampaignStatus, objCampaign.mailcontent, null, null, null, "i")
                              select cde).ToList();

                Insert = null;
                objCampaign = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
        public void CampaignDelete(int Campaignid)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Delete = (from cde in objEmailCampDataContext.spCampaign_AllActions(Campaignid, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "d")
                              select cde).ToList();

                Delete = null;
                objCampaign = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
        public void ScheduleMailDetailsDelete(int ScheduleMailDetailsid)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Delete = (from cde in objEmailCampDataContext.spScheduleMailDetails_AllActions(ScheduleMailDetailsid, null, null, null, null, null, null, null, null, null, "d")
                              select cde).ToList();

                Delete = null;
                objScheduleMailDetails = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
        public void ScheduleMailDetailsInsert(ScheduleMailDetails objScheduleMailDetails)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Insert = (from cde in objEmailCampDataContext.spScheduleMailDetails_AllActions(objScheduleMailDetails.PK_ScheduleID, objScheduleMailDetails.FK_ContactID, objScheduleMailDetails.Scheduledatetime, objScheduleMailDetails.FK_Scheduleby, objScheduleMailDetails.QueueStatus, objScheduleMailDetails.CreatedBy, objScheduleMailDetails.CreatedOn, objScheduleMailDetails.UpdatedBy, objScheduleMailDetails.UpdatedOn, objScheduleMailDetails.FK_CampaignID, "i")
                              select cde).ToList();

                Insert = null;
                objScheduleMailDetails = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #28
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 28-4-2015
        /// Comments :: Updation function of Role details.
        /// </summary>
        #region Delete_RoleCreation
        public void RoleDelete(int Roleid)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

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

                Delete  = null;
                objRole = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
        public void UserplantypeDelete(int Userplantypeid)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Delete = (from cde in objEmailCampDataContext.spPlanType_AllActions(Userplantypeid, null, null, null, null, null, null, null, null, null, null, null, "d")
                              select cde).ToList();

                Delete = null;
                objUserplantype = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
        public void CompanyInsert(Company objCompany)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Insert = (from cde in objEmailCampDataContext.spCompany_AllActions(objCompany.PK_CompanyID ,objCompany.Company_Name ,objCompany.Email_id ,objCompany.ContactNo ,objCompany.Addressline1 ,objCompany.City1 ,objCompany.State1 ,objCompany.Country1 ,objCompany.CreatedBy ,objCompany.CreatedOn ,objCompany.UpdatedBy ,objCompany.UpdatedOn, "i")
                              select cde).ToList();

                Insert = null;
                objCompany = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #31
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 30-3-2015
        /// Comments :: Updation function of UserContacts details.
        /// </summary>
        #region Update_UserContactsCreation
        public void UserContactsUpdate(UserContacts objUserContacts)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Update = (from cde in objEmailCampDataContext.spUserContacts_AllActions(objUserContacts.PK_ContactID, objUserContacts.FK_UserID, objUserContacts.ContactName, objUserContacts.Designation, objUserContacts.Addressline1, objUserContacts.City1, objUserContacts.State1, objUserContacts.Country1, objUserContacts.Email_id, objUserContacts.MailContent, objUserContacts.ContactNo, objUserContacts.CreatedBy, objUserContacts.CreatedOn, objUserContacts.UpdatedBy, objUserContacts.UpdatedOn, objUserContacts.DateofBirth, "u")
                              select cde).ToList();

                Update                  = null;
                objUserContacts         = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #32
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 2-6-2015
        /// Comments :: Updation function of ScheduleMailDetails details.
        /// </summary>
        #region Update_ScheduleMailDetailsCreation
        public void ScheduleMailDetailsUpdate(ScheduleMailDetails objScheduleMailDetails)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Update = (from cde in objEmailCampDataContext.spScheduleMailDetails_AllActions(objScheduleMailDetails.PK_ScheduleID, objScheduleMailDetails.FK_ContactID, objScheduleMailDetails.Scheduledatetime, objScheduleMailDetails.FK_Scheduleby, objScheduleMailDetails.QueueStatus, objScheduleMailDetails.CreatedBy, objScheduleMailDetails.CreatedOn, objScheduleMailDetails.UpdatedBy, objScheduleMailDetails.UpdatedOn, objScheduleMailDetails.FK_CampaignID, "u")
                              select cde).ToList();

                Update = null;
                objScheduleMailDetails  = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #33
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 30-3-2015
        /// Comments :: Updation function of UserDetails details.
        /// </summary>
        #region Delete_UserDetailsCreation
        public void UserDetailsDelete(int UserDetailsid)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Delete = (from cde in objEmailCampDataContext.spUserLogin_AllActions(UserDetailsid, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "d")
                              select cde).ToList();

                Delete                  = null;
                objUserDetails          = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #34
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 30-3-2015
        /// Comments :: Updation function of UserDetails details.
        /// </summary>
        #region Update_UserDetailsCreation
        public void UserDetailsUpdate(UserDetails objUserDetails)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Update = (from cde in objEmailCampDataContext.spUserLogin_AllActions(objUserDetails.PK_UserID, objUserDetails.FK_CompanyID, objUserDetails.LastName, objUserDetails.FirstName, objUserDetails.UserName, objUserDetails.UserType, objUserDetails.Addressline1, objUserDetails.City1, objUserDetails.State1, objUserDetails.Country1, objUserDetails.Designation, objUserDetails.DateOfBirth, objUserDetails.Email_id, objUserDetails.ContactNo, objUserDetails.AlternativeNo, objUserDetails.MemberSince, objUserDetails.MemberTill, objUserDetails.IsActive, objUserDetails.CreatedBy, objUserDetails.CreatedOn, objUserDetails.UpdatedBy, objUserDetails.UpdatedOn, objUserDetails.ReportID, objUserDetails.FK_RoleID, objUserDetails.TotalMailCount, objUserDetails.TotalContactsCount, objUserDetails.FK_UserPlanID, objUserDetails.UserPassword, objUserDetails.UserPhoto, objUserDetails.AccountActivated, objUserDetails.SendNewsLetter, "u")
                              select cde).ToList();

                Update                  = null;
                objUserDetails          = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #35
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 29-6-2015
        /// Comments :: Updation function of Userplantype details.
        /// </summary>
        #region Update_UserplantypeCreation
        public void UserplantypeUpdate(Userplantype objUserplantype)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Update = (from cde in objEmailCampDataContext.spPlanType_AllActions(objUserplantype.PK_PlanID, objUserplantype.PlanName, objUserplantype.IsSingleUser, objUserplantype.Planrate, objUserplantype.NOC, objUserplantype.AllowedMails, objUserplantype.IsActive, objUserplantype.CreatedBy, objUserplantype.CreatedOn, objUserplantype.UpdatedBy, objUserplantype.UpdatedOn, objUserplantype.Plandate, "u")
                              select cde).ToList();

                Update                  = null;
                objUserplantype         = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #36
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 2-6-2015
        /// Comments :: Delete function of ScheduleMailDetails details.
        /// </summary>
        #region Delete_ScheduleMailDetailsCreation
        public void ScheduleMailDetailsDelete(int ScheduleMailDetailsid)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Delete = (from cde in objEmailCampDataContext.spScheduleMailDetails_AllActions(ScheduleMailDetailsid, null, null, null, null, null, null, null, null, null, "d")
                              select cde).ToList();

                Delete = null;
                objScheduleMailDetails  = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #37
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 15-9-2015
        /// Comments :: Updation function of UserPlan details.
        /// </summary>
        #region Update_UserPlanCreation
        public void UserPlanUpdate(UserPlan objUserPlan)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Update = (from cde in objEmailCampDataContext.spUserPlan_AllActions(objUserPlan.PK_UserPlanID, objUserPlan.FK_UserID, objUserPlan.FK_PlanID, objUserPlan.ActiveFrom, objUserPlan.ActiveTo, objUserPlan.IsActive, objUserPlan.CreatedBy, objUserPlan.CreatedOn, objUserPlan.UpdatedBy, objUserPlan.UpdatedOn, "u")
                              select cde).ToList();

                Update                  = null;
                objUserPlan             = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #38
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 30-3-2015
        /// Comments :: Updation function of Campaign details.
        /// </summary>
        #region Update_CampaignCreation
        public void CampaignUpdate(Campaign objCampaign)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Update = (from cde in objEmailCampDataContext.spCampaign_AllActions(objCampaign.PK_CampaignID, objCampaign.FK_UserID, objCampaign.CampaignName, objCampaign.Title, objCampaign.SchduleDateTime, objCampaign.CampTimezone, objCampaign.Utctime, objCampaign.FromName, objCampaign.Emailid, objCampaign.CreatedBy, objCampaign.CreatedOn, objCampaign.UpdatedBy, objCampaign.UpdatedOn, objCampaign.CampaignStatus, objCampaign.mailcontent, null, null, null, "u")
                              select cde).ToList();

                Update                  = null;
                objCampaign             = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #39
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 29-6-2015
        /// Comments :: Updation function of Userplantype details.
        /// </summary>
        #region Delete_UserplantypeCreation
        public void UserplantypeDelete(int Userplantypeid)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Delete = (from cde in objEmailCampDataContext.spPlanType_AllActions(Userplantypeid, null, null, null, null, null, null, null, null, null, null, null, "d")
                              select cde).ToList();

                Delete                  = null;
                objUserplantype         = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
        public void ListContactsInsert(ListContacts objListContacts)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Insert = (from cde in objEmailCampDataContext.spListContacts_AllActions(objListContacts.PK_ContListID, objListContacts.ListName, objListContacts.Comments, objListContacts.CreatedBy, objListContacts.CreatedOn, objListContacts.UpdatedBy, objListContacts.UpdatedOn, objListContacts.FK_CompanyID, "i")
                              select cde).ToList();

                Insert = null;
                objListContacts = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #41
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 2-4-2015
        /// Comments :: Updation function of Company details.
        /// </summary>
        #region Update_CompanyCreation
        public void CompanyUpdate(Company objCompany)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Update = (from cde in objEmailCampDataContext.spCompany_AllActions(objCompany.PK_CompanyID, objCompany.Company_Name, objCompany.Email_id, objCompany.ContactNo, objCompany.Addressline1, objCompany.City1, objCompany.State1, objCompany.Country1, objCompany.CreatedBy, objCompany.CreatedOn, objCompany.UpdatedBy, objCompany.UpdatedOn, "u")
                              select cde).ToList();

                Update     = null;
                objCompany = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #42
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 10-4-2015
        /// Comments :: Verify User FileName Exist.
        /// </summary>
        #region Select_Records_VerifyUserFileNameExist

        public int VerifyUserFileNameExist(string FileName)
        {
            int status = 0;

            objEmailCampDataContext = new EmailCampDataContext();

            var Select = (from cde in objEmailCampDataContext.spUserLogin_AllActions(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, FileName, null, null, "t")
                          select cde).ToList();

            if (Select.Count > 0)
            {
                status = 1;
            }

            Select = null;
            objEmailCampDataContext = null;
            return(status);
        }
        public void ListContactsDelete(int ListContactsid)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Delete = (from cde in objEmailCampDataContext.spListContacts_AllActions(ListContactsid, null, null, null, null, null, null, null, "d")
                              select cde).ToList();

                Delete = null;
                objListContacts = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #44
0
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 30-3-2015
        /// Comments :: Updation function of Campaign details.
        /// </summary>
        #region Delete_CampaignCreation
        public void CampaignDelete(int Campaignid)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Delete = (from cde in objEmailCampDataContext.spCampaign_AllActions(Campaignid, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "d")
                              select cde).ToList();

                Delete                  = null;
                objCampaign             = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #45
0
        public List<Role> RoleSelect(int PK_RoleID)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstRole = new List<Role>();

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

            if (Select.Count > 0)
            {
                lstRole = new List<Role>();
                foreach (var item in Select)
                {
                    objRole = new Role();
                    objRole.PK_RoleID = item.PK_RoleID;

                    if (item.FK_CompanyID != null)
                        objRole.FK_CompanyID = Convert.ToInt32(item.FK_CompanyID);

                    objRole.RoleName = item.RoleName;
                    objRole.CampaignCreate = item.CampaignCreate;
                    objRole.MailSend = item.MailSend;
                    objRole.CreateUser = item.CreateUser;
                    objRole.CampaignDelete = item.CampaignDelete;
                    objRole.ViewingReports = item.ViewingReports;
                    objRole.TemplateView = item.TemplateView;
                    objRole.CreatedOn = item.CreatedOn;
                    objRole.CreatedBy = item.CreatedBy;
                    objRole.UpdatedBy = item.UpdatedBy;
                    objRole.UpdatedOn = item.UpdatedOn;
                    objRole.ListExports = item.ListExports;
                    lstRole.Add(objRole);
                }
            }
            objEmailCampDataContext = null;
            objRole = null;
            return lstRole;
        }
        public List<Campaign> CampaignBindDashboard(int CompanyID)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstCampaign = new List<Campaign>();

            var Select = (from cde in objEmailCampDataContext.spCampaign_AllActions(null, CompanyID, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "p")
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstCampaign = new List<Campaign>();
                foreach (var item in Select)
                {
                    objCampaign = new Campaign();
                    objCampaign.CampaignName = Convert.ToString(item.CampaignName);
                    objCampaign.PK_CampaignID = item.PK_CampaignID;
                    lstCampaign.Add(objCampaign);
                }
            }
            objEmailCampDataContext = null;
            objCampaign = null;
            return lstCampaign;
        }
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 30-3-2015
        /// Comments :: Select all records for ScheduleMailDetails details based on ScheduleMailDetailsid.
        /// </summary>
        public List<ScheduleMailDetails> ScheduleMailDetailsSelectbasedonid(int ScheduleMailDetailsid)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstScheduleMailDetails = new List<ScheduleMailDetails>();

            var Select = (from cde in objEmailCampDataContext.spScheduleMailDetails_AllActions(ScheduleMailDetailsid, null, null, null, null, null, null, null, null, null, "s")
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstScheduleMailDetails = new List<ScheduleMailDetails>();
                foreach (var item in Select)
                {
                    objScheduleMailDetails = new ScheduleMailDetails();
                    objScheduleMailDetails.PK_ScheduleID = item.PK_ScheduleID;

                    if (item.FK_CampaignID != null)
                        objScheduleMailDetails.FK_CampaignID = Convert.ToInt32(item.FK_CampaignID);
                    objScheduleMailDetails.Scheduledatetime = item.scheduledatetime;
                    if (item.FK_Scheduleby != null)
                        objScheduleMailDetails.FK_Scheduleby = Convert.ToInt32(item.FK_Scheduleby);
                    objScheduleMailDetails.QueueStatus = item.QueueStatus;
                    if (item.FK_ContactID != null)
                        objScheduleMailDetails.FK_ContactID = Convert.ToInt32(item.FK_ContactID);

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

                    lstScheduleMailDetails.Add(objScheduleMailDetails);
                }
            }
            objEmailCampDataContext = null;
            objScheduleMailDetails = null;
            return lstScheduleMailDetails;
        }
        public List<Userplantype> UserplantypeSelect(int PK_UserplantypeID)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstUserplantype = new List<Userplantype>();

            var Select = (from cde in objEmailCampDataContext.spPlanType_AllActions(PK_UserplantypeID, null, null, null, null, null, null, null, null, null, null, null, "s")
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstUserplantype = new List<Userplantype>();
                foreach (var item in Select)
                {
                    objUserplantype = new Userplantype();
                    objUserplantype.PK_PlanID = item.PK_PlanID;
                    objUserplantype.PlanName = item.PlanName;
                    objUserplantype.IsSingleUser = item.IsSingleUser;
                    objUserplantype.Planrate = item.Planrate;

                    if(item.NOC != null)
                        objUserplantype.NOC = Convert.ToInt32(item.NOC);

                    objUserplantype.AllowedMails = Convert.ToInt32(item.AllowedMails);
                    objUserplantype.IsActive = item.IsActive;
                    objUserplantype.Plandate = item.plandate;
                    objUserplantype.CreatedOn = item.CreatedOn;
                    objUserplantype.CreatedBy = item.CreatedBy;
                    objUserplantype.UpdatedBy = item.UpdatedBy;
                    objUserplantype.UpdatedOn = item.UpdatedOn;
                    lstUserplantype.Add(objUserplantype);
                }
            }
            objEmailCampDataContext = null;
            objUserplantype = null;
            return lstUserplantype;
        }
        public List<InviteUser> checkexpired(int PK_InviteUserID)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstInviteUser = new List<InviteUser>();

            var Select = (from cde in objEmailCampDataContext.spInviteUser_AllActions(PK_InviteUserID, null, null, null, null, null, true, null, null, null, null, null, null, ref val, "b")
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstInviteUser = new List<InviteUser>();
                foreach (var item in Select)
                {
                    objInviteUser = new InviteUser();
                    objInviteUser.PK_Inviteid = item.PK_Inviteid;
                    objInviteUser.Emailid = item.Emailid;
                    objInviteUser.Invitedate = item.invitedate;

                    if (item.FK_CompanyID != null)
                        objInviteUser.FK_CompanyID = Convert.ToInt32(item.FK_CompanyID);
                    objInviteUser.FK_RoleID = item.FK_RoleID;
                    objInviteUser.Message = item.Message;
                    objInviteUser.Mailsentstatus = item.mailsentstatus;
                    objInviteUser.Expired = item.expired;
                    objInviteUser.ApproveStatus = item.ApproveStatus;
                    objInviteUser.CreatedOn = item.CreatedOn;
                    objInviteUser.CreatedBy = item.CreatedBy;
                    objInviteUser.UpdatedBy = item.UpdatedBy;
                    objInviteUser.UpdatedOn = item.UpdatedOn;
                    lstInviteUser.Add(objInviteUser);
                }
            }
            objEmailCampDataContext = null;
            objInviteUser = null;
            return lstInviteUser;
        }
        public void InviteUserDelete(int InviteUserid)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

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

                Delete = null;
                objInviteUser = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
        public DataSet CampaignSelectforgridBasedonFilter(string uertype, int companyid, string CampName, string Title, Nullable<DateTime> CreatedOn, string all, string fromname)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstCampaign = new List<Campaign>();

            var Select = (from cde in objEmailCampDataContext.spCampaign_AllActions(null, companyid, CampName, Title, null, null, null, fromname, all, null, CreatedOn, null, null, null, null, null, null, null, uertype)
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstCampaign = new List<Campaign>();
                foreach (var item in Select)
                {
                    objCampaign = new Campaign();
                    objCampaign.CampaignName = Convert.ToString(item.CampaignName);
                    objCampaign.CampTimezone = Convert.ToString(item.CampTimezone);
                    objCampaign.CreatedBy = item.CreatedBy;
                    objCampaign.CreatedOn = item.CreatedOn;
                    objCampaign.UpdatedBy = item.UpdatedBy;
                    objCampaign.UpdatedOn = item.UpdatedOn;
                    objCampaign.Emailid = item.Emailid;
                    objCampaign.FK_UserID = item.FK_UserID;
                    objCampaign.FromName = item.FromName;
                    objCampaign.PK_CampaignID = item.PK_CampaignID;
                    objCampaign.SchduleDateTime = item.SchduleDateTime;
                    objCampaign.Title = item.Title;
                    objCampaign.Utctime = item.utctime;
                    objCampaign.CampaignStatus = item.CampaignStatus;
                    objCampaign.mailcontent = item.mailcontent;

                    lstCampaign.Add(objCampaign);
                }
            }

            objEmailCampDataContext = null;
            objCampaign = null;
            DataSet converted = new DataSet();

            if (lstCampaign.Count > 0)
            {
                converted.Tables.Add(ListToDataSet.newTable(lstCampaign));
                return converted;
            }
            else
            {
                converted.Tables.Add(ListToDataSet.newTableColumnAlone(lstCampaign));
                return converted;
            }
        }
        public void InviteUserUpdate(InviteUser objInviteUser)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Update = (from cde in objEmailCampDataContext.spInviteUser_AllActions(objInviteUser.PK_Inviteid, objInviteUser.Emailid, objInviteUser.Invitedate, objInviteUser.FK_RoleID, objInviteUser.Message, objInviteUser.Mailsentstatus, objInviteUser.Expired, objInviteUser.ApproveStatus, objInviteUser.CreatedBy, objInviteUser.CreatedOn, objInviteUser.UpdatedBy, objInviteUser.UpdatedOn, objInviteUser.FK_CompanyID, ref val, "u")
                              select cde).ToList();

                Update = null;
                objInviteUser = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
        public string InviteUserInsert(InviteUser objInviteUser)
        {
            objEmailCampDataContext = new EmailCampDataContext();
                int? totrow = 0;
                var Insert = (from cde in objEmailCampDataContext.spInviteUser_AllActions(objInviteUser.PK_Inviteid, objInviteUser.Emailid, objInviteUser.Invitedate, objInviteUser.FK_RoleID, objInviteUser.Message, objInviteUser.Mailsentstatus, objInviteUser.Expired, objInviteUser.ApproveStatus, objInviteUser.CreatedBy, objInviteUser.CreatedOn, objInviteUser.UpdatedBy, objInviteUser.UpdatedOn, objInviteUser.FK_CompanyID, ref totrow, "i")
                              select cde).ToList();

                Insert = null;

                objEmailCampDataContext = null;
                return totrow.ToString();
        }
        public void UserplantypeUpdate(Userplantype objUserplantype)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Update = (from cde in objEmailCampDataContext.spPlanType_AllActions(objUserplantype.PK_PlanID, objUserplantype.PlanName, objUserplantype.IsSingleUser, objUserplantype.Planrate, objUserplantype.NOC, objUserplantype.AllowedMails, objUserplantype.IsActive, objUserplantype.CreatedBy, objUserplantype.CreatedOn, objUserplantype.UpdatedBy, objUserplantype.UpdatedOn, objUserplantype.Plandate, "u")
                              select cde).ToList();

                Update = null;
                objUserplantype = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
예제 #55
0
        public void RoleUpdate(Role objRole)
        {
            try
            {
                objEmailCampDataContext = new EmailCampDataContext();

                var Update = (from cde in objEmailCampDataContext.spRole_AllActions(objRole.PK_RoleID, objRole.FK_CompanyID, objRole.RoleName, objRole.CampaignCreate, objRole.MailSend, objRole.CreateUser, objRole.CampaignDelete, objRole.ViewingReports, objRole.TemplateView, objRole.CreatedBy, objRole.CreatedOn, objRole.UpdatedBy, objRole.UpdatedOn, objRole.ListExports, ref val, "u")
                              select cde).ToList();

                Update = null;
                objRole = null;
                objEmailCampDataContext = null;
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
        }
        /// <summary>
        /// Created By :: Sakthivel.R
        /// Created On :: 30-3-2015
        /// Comments :: Select all records for Campaign details based on campaignid.
        /// </summary>
        public List<Campaign> CampaignSelectbasedonid(int Campaignid)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstCampaign = new List<Campaign>();

            var Select = (from cde in objEmailCampDataContext.spCampaign_AllActions(Campaignid, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "s")
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstCampaign = new List<Campaign>();
                foreach (var item in Select)
                {
                    objCampaign = new Campaign();
                    objCampaign.CampaignName = Convert.ToString(item.CampaignName);
                    objCampaign.CampTimezone = Convert.ToString(item.CampTimezone);
                    objCampaign.CreatedBy = item.CreatedBy;
                    objCampaign.CreatedOn = item.CreatedOn;
                    objCampaign.UpdatedBy = item.UpdatedBy;
                    objCampaign.UpdatedOn = item.UpdatedOn;
                    objCampaign.Emailid = item.Emailid;
                    objCampaign.FK_UserID = item.FK_UserID;
                    objCampaign.CampaignStatus = item.CampaignStatus;
                    objCampaign.CampTimezone = item.CampTimezone;
                    objCampaign.FromName = item.FromName;
                    objCampaign.PK_CampaignID = item.PK_CampaignID;
                    objCampaign.SchduleDateTime = item.SchduleDateTime;
                    objCampaign.Title = item.Title;
                    objCampaign.Utctime = item.utctime;
                    objCampaign.mailcontent = item.mailcontent;

                    lstCampaign.Add(objCampaign);
                }
            }
            objEmailCampDataContext = null;
            objCampaign = null;
            return lstCampaign;
        }
        public List<ListContacts> ListContactsSelect(int PK_ContListID)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstListContacts = new List<ListContacts>();

            var Select = (from cde in objEmailCampDataContext.spListContacts_AllActions(PK_ContListID, null, null, null, null, null, null, null, "a")
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstListContacts = new List<ListContacts>();
                foreach (var item in Select)
                {
                    objListContacts = new ListContacts();
                    objListContacts.ListName = item.ListName;
                    objListContacts.Comments = item.comments;
                    objListContacts.CreatedOn = item.CreatedOn;
                    objListContacts.CreatedBy = item.CreatedBy;
                    objListContacts.UpdatedBy = item.UpdatedBy;
                    objListContacts.UpdatedOn = item.UpdatedOn;
                    objListContacts.FK_CompanyID = item.FK_CompanyID;
                    lstListContacts.Add(objListContacts);
                }
            }
            objEmailCampDataContext = null;
            objListContacts = null;
            return lstListContacts;
        }
        public DataSet CampaignReportSelectforgrid(string uertype, int userid, string alpha)
        {
            objEmailCampDataContext = new EmailCampDataContext();
            lstCampaignreport = new List<campaignreport>();

            var Select = (from cde in objEmailCampDataContext.spCampaign_AllActions(null, userid, null, null, null, null, null, null, alpha, null, null, null, null, null, null, null, null, null, uertype)
                          select cde).ToList();

            if (Select.Count > 0)
            {
                lstCampaignreport = new List<campaignreport>();
                foreach (var item in Select)
                {
                    objcampaignreport = new campaignreport();
                    objcampaignreport.CampaignName = Convert.ToString(item.CampaignName);
                    objcampaignreport.CampTimezone = Convert.ToString(item.CampTimezone);
                    objcampaignreport.CreatedBy = item.CreatedBy;
                    objcampaignreport.CreatedOn = item.CreatedOn;
                    objcampaignreport.UpdatedBy = item.UpdatedBy;
                    objcampaignreport.UpdatedOn = item.UpdatedOn;
                    objcampaignreport.Emailid = item.Emailid;
                    objcampaignreport.FK_UserID = item.FK_UserID;
                    objcampaignreport.FromName = item.FromName;
                    objcampaignreport.PK_CampaignID = item.PK_CampaignID;
                    objcampaignreport.SchduleDateTime = item.SchduleDateTime;
                    objcampaignreport.Title = item.Title;
                    objcampaignreport.Utctime = item.utctime;
                    objcampaignreport.CampaignStatus = item.CampaignStatus;
                    objcampaignreport.mailcontent = item.mailcontent;
                    objcampaignreport.Subscribers = item.Subscribers;
                    objcampaignreport.mailsent = item.mailsent;
                     objcampaignreport.SentOn = item.SentOn;

                    lstCampaignreport.Add(objcampaignreport);
                }
            }
            objEmailCampDataContext = null;
            objcampaignreport = null;
            DataSet converted = new DataSet();

            if (lstCampaignreport.Count > 0)
            {
                converted.Tables.Add(ListToDataSet.newTable(lstCampaignreport));
                return converted;
            }
            else
            {
                converted.Tables.Add(ListToDataSet.newTableColumnAlone(lstCampaignreport));
                return converted;
            }
        }