public List<string> searchByPhone(string phone) { DatabaseService ds = new DatabaseService(); if (ds.phoneExists(phone) == true) return ds.getContact(new string[] { phone }, "Phone"); return null; }
public List<string> searchByFullName(string firstName, string lastName) { DatabaseService ds = new DatabaseService(); if (ds.fullNameExists(firstName, lastName) == true) return ds.getContact(new string[]{firstName, lastName}, "Name"); return null; }
public bool addContact(List<string> content) { DatabaseService ds = new DatabaseService(); if (ds.fullNameExists(content[0], content[1]) == false && ds.phoneExists(content[4]) == false && ds.saveContact(content) != 0) return true; else return false; }
public bool updateContact(List<string> content) { DatabaseService ds = new DatabaseService(); //ds.fullNameExists(content[0], content[1]) == false && ds.phoneExists(content[3]) == false && if (ds.updateContact(content) != 0) { return true; } else return false; }
protected void Page_Load(object sender, EventArgs e) { DatabaseService ds = new DatabaseService(); List<List<string>> folks = ds.remindBirthday(); if (folks.Count != 0) { Response.Redirect("Reminder.aspx"); } else { Response.Redirect("Default.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { lblReminder.Text = ""; DatabaseService ds = new DatabaseService(); List<List<string>> folks = ds.remindBirthday(); if (folks.Count == 0) { lblReminder.Text = "No Birthdays for today"; } else { for (int i = 0; i < folks.Count; i++) { List<string> person = folks[i]; lblReminder.Text = lblReminder.Text + "<br/>First Name:" + person[0] + " LastName:" + person[1] + " Email:" + person[2]; } } }