Exemplo n.º 1
0
        //Obtener secuencia del usuario
        private void Secuencia()
        {
            PrestamoStruct.Secuencia();
            int numeracion = PrestamoStruct.Secuencia();

            numeracion       += 1;
            secuenciatxt.Text = Convert.ToString(numeracion);
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
 //Saber si un pasillo esta repetido
 private string UsuarioRepetido()
 {
     usuario       = PrestamoStruct.RepeticionUsuarios(folioscb.Text);
     folioaux.Text = usuario;
     return(usuario);
 }