Example #1
0
        public static bool RegenerarDV()
        {
            bool    Regenerado = false;
            DataSet ds         = IntegridadDAL.ObtenerTablasAVerificar();

            foreach (DataTable dt in ds.Tables)
            {
                if (!dt.ToString().Equals("DVV"))
                {
                    GenerarDVHTabla(dt);
                    ds.Tables["DVV"].Select(string.Format("NOMBRE_TABLA ='{0}' ", dt.ToString()))[0]["DVV"] = GenerarDVV(dt);
                }
            }
            return(IntegridadDAL.ModificarTablasDV(ds));
        }
Example #2
0
        public static bool Verificar()
        {
            DataSet   ds  = IntegridadDAL.ObtenerTablasAVerificar();
            DataTable dvv = ds.Tables["DVV"];

            foreach (DataTable dt in ds.Tables)
            {
                if (!dt.TableName.Equals("DVV"))
                {
                    string verificador = dvv.Select(string.Format("NOMBRE_TABLA='{0}'", dt.TableName))[0]["DVV"].ToString();
                    if (!ValidarEntidad(dt, verificador))
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }