Ejemplo n.º 1
0
        public void SecuenciaPrestamo()
        {
            PrestamosCL oPrestamos = new PrestamosCL();

            int secuencia;

            try
            {
                secuencia = Convert.ToInt32(SecuenciasCL.TraerSecuenciaPrestamo().Tables[0].Rows[0].ItemArray[0]) + 1;
            }
            catch (System.IndexOutOfRangeException e)
            {
                secuencia = 1;
            }

            lblNumeroPrestamo.Text = Convert.ToString("00000" + secuencia);
            numeroPrestamo         = secuencia;
        }
Ejemplo n.º 2
0
        // LLAMA A LA VENTANA CREAR PLANILLA PARA SU RESPECTIVA CREACION
        private void btnCrear_Click(object sender, EventArgs e)
        {
            DataSet oDatos = SecuenciasCL.TraerSecuenciaPlanilla();

            DataTable oTable = oDatos.Tables[0];

            int pSecuencia;

            if (oTable.Rows.Count > 0)
            {
                pSecuencia = Convert.ToInt32(oTable.Rows[0].ItemArray.GetValue(0)) + 1;
            }
            else
            {
                pSecuencia = 1;
            }

            frmCrearPlanilla oCrearPlanilla = new frmCrearPlanilla(pSecuencia, this, dtFecha.Value.ToShortDateString());

            oCrearPlanilla.Show();
        }