private void txtSearch_TextChanged(object sender, EventArgs e) { Control send = (Control)sender; StoreProcedures sp = (StoreProcedures)Convert.ToInt32(send.Tag); info.Add("str", txtSearch.Text); init(info, sp.ToString()); info.Clear(); }
private void UpdateBDD(object sender, EventArgs e) { Control send = (Control)sender; StoreProcedures sp = (StoreProcedures)Convert.ToInt32(send.Tag); switch (sp) { case StoreProcedures.Select_Contact_Info: break; case StoreProcedures.SP___Guardar___Contact_Email_Direction_Number: for (int i = 0; i < listControllers.Count(); i++) { getValues(listControllers[i]); } break; case StoreProcedures.SP___Eliminar___Contact_Email_Direction_Number: info.Add("contactID", contacts[listBoxContacts.SelectedIndex].contactID); break; case StoreProcedures.SP___Modificar___Contact_Email_Direction_Number: info.Add("contactID", contacts[listBoxContacts.SelectedIndex].contactID); for (int i = 0; i < listControllers.Count(); i++) { getValues(listControllers[i]); } break; case StoreProcedures.__Filtrar__Contacto: info.Add("str", txtSearch.Text); break; default: break; } Conexion.Save(info, sp.ToString()); init(null, listBoxContacts.Tag.ToString()); info.Clear(); }