示例#1
0
        private void InitDosificacion( )
        {
            CommonUtils.ConexionBD.StringDeConexion = CommonUtils.ConexionBD.GetConnectionString( );
            string    sqlQuery  = "Select * FROM Caja WHERE (CajaId = (SELECT  MAX(CajaId)  FROM Caja))";
            DataTable tableTemp = CommonUtils.ConexionBD.EjecutarConsulta(sqlQuery);
            int       rows      = tableTemp.Rows.Count;

            if (rows == 0)
            {
                InitCajaForm cajaform = new InitCajaForm( );
                cajaform.ShowDialog( );
                cajaform.Refresh( );
            }

            CommonUtils.ConexionBD.CerrarConexion( );
        }
示例#2
0
        private void InitDosificacion( )
        {
            CommonUtils.ConexionBD.StringDeConexion = CommonUtils.ConexionBD.GetConnectionString( );
            string sqlQuery = "Select * FROM Caja WHERE (CajaId = (SELECT  MAX(CajaId)  FROM Caja))";
            DataTable tableTemp = CommonUtils.ConexionBD.EjecutarConsulta( sqlQuery );
            int rows = tableTemp.Rows.Count;
            if ( rows == 0 )
            {
                InitCajaForm cajaform = new InitCajaForm( );
                cajaform.ShowDialog( );
                cajaform.Refresh( );
            }

            CommonUtils.ConexionBD.CerrarConexion( );
        }