//Obtener secuencia del usuario private void Secuencia() { PrestamoStruct.Secuencia(); int numeracion = PrestamoStruct.Secuencia(); numeracion += 1; secuenciatxt.Text = Convert.ToString(numeracion); }
private void guardarbtn_Click(object sender, EventArgs e) { try { string respuesta = "", respuestadetalle = ""; if (this.titulolibro.Text == string.Empty || this.nombretxt.Text == string.Empty) { MensajeError("Datos ingresados erroneamente, favor de revisar"); if (this.titulolibro.Text == string.Empty) { MessageBox.Show("Libro definido"); } if (this.nombretxt.Text == string.Empty) { MessageBox.Show("Usuario no identificado"); } } else { if (this.IsNuevo) { if (folioaux.Text != string.Empty) { respuesta = PrestamoStruct.Insertar(Convert.ToInt32(folioaux.Text), folioscb.Text); respuestadetalle = DetallePrestamoStruct.Insertar(datadetalle); } else { respuesta = PrestamoStruct.Insertar(Convert.ToInt32(secuenciatxt.Text), folioscb.Text); respuestadetalle = DetallePrestamoStruct.Insertar(datadetalle); } } if (respuesta.Equals("KK") && respuestadetalle.Equals("OK")) { if (this.IsNuevo) { this.MensajeOK("Registro guardado exitosamente"); } } else { this.MensajeError(respuesta); } this.IsNuevo = false; this.Botones(); this.Limpiar(); } } catch (Exception ex) { MessageBox.Show(ex.Message + ex.StackTrace); } }
//Saber si un pasillo esta repetido private string UsuarioRepetido() { usuario = PrestamoStruct.RepeticionUsuarios(folioscb.Text); folioaux.Text = usuario; return(usuario); }