public IQueryable<ContactInformation> searchByPhone(string phone, int userID)
 {
     LINQDatabaseService ds = new LINQDatabaseService();
     if (ds.phoneExists(phone, userID) == true)
         return ds.getContact(new string[] { phone }, "Phone", userID);
     return null;
 }
 public IQueryable<ContactInformation> searchByFullName(string firstName, string lastName, int userID) 
 {
     LINQDatabaseService ds = new LINQDatabaseService();
     if (ds.fullNameExists(firstName, lastName, userID) == true)
         return ds.getContact(new string[] {firstName, lastName}, "Name", userID);
     return null;
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {    
                if ((int)this.Session["login"] < 0)
                    Response.Redirect("Login.aspx");
            }
            catch (Exception)
            {
                Response.Redirect("Login.aspx");
            }

            int count = 0;
            lblReminder.Text = "";
            LINQDatabaseService ds = new LINQDatabaseService();
            IQueryable<ContactInformation> folks = ds.remindBirthday();
            foreach (ContactInformation person in folks) {
                lblReminder.Text += "<br/>First Name:" + person.FirstName + "                LastName:" + person.LastName + "              Email:" + person.Email;
                count++;
            }
            if (count == 0)
            {
                lblReminder.Text = "No Birthdays for today";
            }
        }
 public bool addContact(string txtFirstName, string txtLastname, string ddlTitle, 
                        string ddlAreaCode, string txtPhoneNumber, string txtAddress, 
                        string ddlState, string txtEmail, string txtComment,
                        bool chkRemember, DateTime dob, int userID)
 {
     LINQDatabaseService ds = new LINQDatabaseService();
     if (ds.fullNameExists(txtFirstName, txtLastname, userID) == false && ds.phoneExists(txtPhoneNumber, userID) == false && 
         ds.saveContact( txtFirstName,  txtLastname,  ddlTitle, 
                         ddlAreaCode,  txtPhoneNumber,  txtAddress, 
                         ddlState,  txtEmail,  txtComment,
                         chkRemember, dob, userID))
         return true;            
     else
         return false;
     
 }
 public bool updateContact(string txtFirstName, string txtLastname, string ddlAreaCode, string txtPhoneNumber, string txtAddress, string ddlState, string txtEmail, DateTime dob, int lblID)
 {
     LINQDatabaseService ds = new LINQDatabaseService();            
     return ds.updateContact(txtFirstName, txtLastname, ddlAreaCode, txtPhoneNumber, txtAddress, ddlState, txtEmail, dob, lblID);                
 }