private void ShowTopicInfo(int topicId) { TopicBll tbll = new TopicBll(); TopicModel tmodel = tbll.GetModel(topicId); if (tmodel != null) { litTitle.Text = String.Format("话题:{0} by ({1}) <span>{2:yyyy-MM-dd HH:mm}</span>", tmodel.Title, tmodel.UserId, tmodel.InsertTime); hidTopicId.Value = tmodel.TopicId.ToString(); ShowProductInfo(tmodel.ContentId); } else { throw new ShopException("话题不存在", true); } }
private void ShowInfo(int topicId) { TopicBll qbll = new TopicBll(); TopicModel qmodel = qbll.GetModel(topicId); if (qmodel == null) { throw new Exception("没有找到相应的问题"); } else { this.lblTopicId.Text = qmodel.TopicId.ToString(); this.lblUserId.Text = qmodel.UserId; this.lblTContent.Text = qmodel.Content; this.lblTTitle.Text = qmodel.Title; BindAnswers(); } }