protected void GuardarButton_Click(object sender, EventArgs e) { Proyectos pro = new Proyectos(); Materiales mat = new Materiales(); ObtenerValores(pro); if (CamposBacios()) { Utilitarios.ShowToastr(this, "Error", "Mensaje", "error"); } else { if (BuscarIdTextBox.Text == "") { if (pro.Insertar()) { } } else { if (pro.Editar()) { } } Utilitarios.ShowToastr(this, "Guardado", "Mensaje", "success"); } }