示例#1
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);
            }
        }
示例#2
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);
            }
        }
        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);
            }
        }