public string getHost(string str) { host.ModuleID = str; if (HostManager.FindHostByModuleID(host) != null) { string hostname = HostManager.FindHostByModuleID(host).HostName; return(hostname); } else { return(null); } }
public void cardBind(string str) { try { card.CardID = str; card = CardManager.FindCardByCardID(card); Label1.Text = card.CardTime.ToString(); Label2.Text = card.CardPeople; Label4.Text = card.CardName; Label8.Text = card.CardContent; string strPop = card.Pop.Trim(); string strPhoto = ""; if (strPop == "游客") { strPhoto = "../Images/Visiter.jpg"; } if (strPop == "用户") { user.UserName = card.CardPeople; user = UserManager.findUserByUserName(user); strPhoto = user.Photo; Label2.Text = user.TName; } if (strPop == "版主") { host.ModuleID = card.ModuleID; host = HostManager.FindHostByModuleID(host); strPhoto = host.Photo; Label2.Text = host.TName; } if (strPop == "管理员") { strPhoto = "../Images/Admin.jpg"; } Image2.ImageUrl = strPhoto; } catch (Exception exp) { Response.Write(exp); } }