当输入的href为空时,我会制作此系统,图标将被隐藏,但对我来说这不起作用,
我尝试了一些方法,但没有用。谁知道什么是错的?
我有这段代码:
public boolean hasProduct(ArrayList customerList, String p)
{
return customerList.contains(p);
}
答案 0 :(得分:0)
您的运营商不正确:[WebMethod]
public static string GetCustomers(int pageIndex)
{
return GetCustomersData(pageIndex).GetXml();
}
public static DataSet GetCustomersData(int pageIndex)
{
string query = "[sp_pro_MuroPosts_PageWise]";
SqlCommand cmd = new SqlCommand(query);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@PageIndex", pageIndex);
cmd.Parameters.AddWithValue("@PageSize", 10);
cmd.Parameters.Add("@PageCount", SqlDbType.Int, 4).Direction = ParameterDirection.Output;
return GetData(cmd);
}
private static DataSet GetData(SqlCommand cmd)
{
cmd.Connection = clsBaseDatos.sqlConexion;
using (cmd.Connection)
{
using (DataSet ds = new DataSet())
{
SqlConnection cnn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConexionBD"].ConnectionString);
SqlDataAdapter sda = new SqlDataAdapter();
cmd.Connection = cnn;
sda.SelectCommand = cmd;
sda.Fill(ds, "vw_Muro_Posts");
SqlDataAdapter cmd2 = new SqlDataAdapter("SELECT * FROM vw_Muro_Comments WHERE COMM_ESTATUS != '0' ORDER BY cast([COMM_FECHA] as datetime) DESC", cnn);
cmd2.Fill(ds, "vw_Muro_Comments");
//Aqui se hace el join de los dos repeaters
ds.Relations.Add("myrelation",
ds.Tables["vw_Muro_Posts"].Columns["POST_ID"],
ds.Tables["vw_Muro_Comments"].Columns["POST_ID"], false);
DataTable dt = new DataTable("PageCount");
dt.Columns.Add("PageCount");
dt.Rows.Add();
dt.Rows[0][0] = cmd.Parameters["@PageCount"].Value;
ds.Tables.Add(dt);
return ds;
}
}
}
试试这个:if (!get_theme_mod(('pocketcars_url2') == '' ))
if ( get_theme_mod(('pocketcars_url1') != '' ))
答案 1 :(得分:0)
<?php $text = esc_url(get_theme_mod( 'website_url1' )); if($text != '' ) : ?>
<a href="<?php echo esc_url( get_theme_mod( 'website_url2' ) );?>" class="social1">
<i class="fa fa-twitter" aria-hidden="true"></i></a>"
<?php endif; ?>