private void Btn_modificar_Click(object sender, RoutedEventArgs e) { ProveedorBLL pb = new ProveedorBLL(); bool id = true; bool nombre = true; bool fono = true; bool email = true; bool direccion = true; bool descripcion = true; if (txt_id.Text.Trim() == "") { id = false; lbid.Content = "Debe ingresar una id"; } if (txt_nombre.Text.Trim() == "") { nombre = false; lb1.Content = "Debe ingresar un nombre"; } if (txt_fono.Text.Trim() == "") { email = false; lb2.Content = "Debe ingresar un numero"; } if (txt_mail.Text.Trim() == "") { email = false; lb3.Content = "Dbe ingresar un correo"; } if (txt_direccion.Text.Trim() == "") { direccion = false; lb4.Content = "Debe ingresar una dirección"; } if (txt_descripcion.Text.Trim() == "") { descripcion = false; lb5.Content = "Debe ingresar una descripcion "; } if (id && nombre && fono && email && direccion && descripcion) { bool existe = pb.GetProvIdEXISTE(Int32.Parse(txt_id.Text)); if (existe) { pb.id_proveedor = Int32.Parse(txt_id.Text); pb.nombre_proveedor = txt_nombre.Text; pb.fono_proveedor = Int32.Parse(txt_fono.Text); pb.mail_proveedor = txt_mail.Text; pb.direccion_proveedor = txt_direccion.Text; pb.descripcion = txt_descripcion.Text; pb.AlterProv(pb); PopupNotifier popup = new PopupNotifier(); popup.TitleText = "Aviso"; popup.Image = Properties.Resources.add; popup.ContentText = "Se ha Modificado al Proveedor: " + txt_nombre.Text; popup.AnimationDuration = 500; popup.Delay = 2500; popup.Popup(); txt_id.Text = ""; txt_nombre.Text = ""; txt_fono.Text = ""; txt_direccion.Text = ""; txt_mail.Text = ""; txt_descripcion.Text = ""; } else { lb1.Content = "Esta id no existe en el sistema"; } } }