/// <summary>
        /// Get Specific Contact
        /// </summary>
        /// <param name="id"></param>
        /// <param name="name"></param>
        /// <param name="email"></param>
        /// <param name="phoneNumber"></param>
        public Contact GetContact(int id)
        {
            Contact contact = new Contact();
            try
            {
                StoredProcedure sproc = new StoredProcedure();
                MySqlDataReader rdr = null;
                var list = new List<KeyValuePair<string, string>>();
                //Add Parameters
                list.Add(new KeyValuePair<string, string>("@contactID", id.ToString()));
                MySqlCommand cmd = sproc.Command("NMS_UpdateContact", list, null, false);
                // execute the command
                rdr = cmd.ExecuteReader();

                // iterate through results, printing each to console
                while (rdr.Read())
                {
                    contact.Id = Convert.ToInt32(rdr["id"]);
                    contact.Email = rdr["email"].ToString();
                    contact.Mobile = rdr["phone_number"].ToString();
                    contact.Name = rdr["name"].ToString();
                }
            }
            catch (Exception ex)
            {
                log.Error("Error Editing Contacts : " + ex);
            }
            return contact;
        }
 public void EditContact(Contact contact)
 {
     ContactSprocs sproc = new ContactSprocs();
     sproc.EditContacts(contact.Id.ToString(), contact.Name, contact.Email, contact.Mobile);
 }
        /// <summary>
        /// Returns all the Contacts in the system
        /// </summary>
        /// <returns></returns>
        public List<Contact> GetContacts()
        {
            StoredProcedure sproc = new StoredProcedure();
            MySqlCommand cmd = sproc.Command("NMS_GetContacts", null, null,false);
            MySqlDataReader rdr = null;

            rdr = cmd.ExecuteReader();
            List<Contact> results = new List<Contact>();

            // iterate through results, printing each to console
            while (rdr.Read())
            {
                Contact contact = new Contact();
                contact.Id = Convert.ToInt32(rdr["id"]);
                contact.Email = rdr["email"].ToString();
                contact.Mobile = rdr["phone_number"].ToString();
                contact.Name = rdr["name"].ToString();
                results.Add(contact);
            }
            return results;
        }
 public int AddContact(Contact contact)
 {
     ContactSprocs sproc = new ContactSprocs();
     return sproc.AddContact(contact.Name, contact.Email, contact.Mobile);
 }