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;
        }
        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();
            }
        }
        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();
            }
        }
        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 void AccessUpdateContacts(ListContacts objListContacts1)
 {
     objDL_ListContacts.ListContactsUpdate(objListContacts1);
 }
 //public void AccessExcelDataStore()
 //{
 //    objDL_ListContacts.ListContactsExcelInsert();
 //}
 public void AccessInsertContacts(ListContacts objListContacts1)
 {
     objDL_ListContacts.ListContactsInsert(objListContacts1);
 }