public bool Insert(string empresaid, tb_usuariostablas BE)
        {
            using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid)))
            {
                using (SqlCommand cmd = new SqlCommand("gspTbUsuariostablas_INSERT", cnx))
                {
                    {
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Parameters.Add("@usuar", SqlDbType.Char, 15).Value = BE.usuar;
                        cmd.Parameters.Add("@idtab", SqlDbType.Char, 50).Value = BE.idtab;
                        cmd.Parameters.Add("@updat", SqlDbType.Bit).Value = BE.updat;
                        cmd.Parameters.Add("@delet", SqlDbType.Bit).Value = BE.delet;

                    }
                    try
                    {
                        cnx.Open();
                        if (cmd.ExecuteNonQuery() > 0)
                        {
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }
                }
            }
        }
 //trae listado de tablas de la base de datos
 public DataSet GetAll(string empresaid, tb_usuariostablas BE)
 {
     using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid))){
         using (SqlCommand cmd = new SqlCommand("gspGetPermisoTablas", cnx))
         {
             DataSet ds = new DataSet();
             {
                 cmd.CommandType = CommandType.StoredProcedure;
                 cmd.Parameters.Add("@usuar", SqlDbType.Char, 15).Value = BE.usuar;
             }
             try
             {
                 cnx.Open();
                 using (SqlDataAdapter da = new SqlDataAdapter(cmd))
                 {
                     da.Fill(ds);
                 }
                 return ds;
             }
             catch (Exception ex)
             {
                 throw new Exception(ex.Message);
             }
         }
     }
 }
 public DataSet GetAll(string empresaid, tb_usuariostablas BE)
 {
     return tablaDA.GetAll(empresaid, BE);
 }
 public bool Insert(string empresaid, tb_usuariostablas BE)
 {
     return tablaDA.Insert(empresaid, BE);
 }
 public bool Delete(string empresaid, tb_usuariostablas BE)
 {
     return tablaDA.Delete(empresaid, BE);
 }