foreach (RepeaterItem item in this.Rpt_Show.Items)
{
Label Lbl_HotelName = item.FindControl("Lbl_HotelName") as Label;
if (Lbl_HotelName != null)
{
string str_HotelName = Lbl_HotelName.Text.Trim();
if (str_HotelName == data.Trim())
{
WinCommon.MessageBox.Show(this.Page, "当前酒店已经添加过");
return true;
}
}
}
{
Label Lbl_HotelName = item.FindControl("Lbl_HotelName") as Label;
if (Lbl_HotelName != null)
{
string str_HotelName = Lbl_HotelName.Text.Trim();
if (str_HotelName == data.Trim())
{
WinCommon.MessageBox.Show(this.Page, "当前酒店已经添加过");
return true;
}
}
}