public void ToItemModifyTextBox(int id) { BBSItemViewData ItemViewData = new BBSItemViewData(); try { // 获取BBSItem的信息 ItemViewData.BBSItem = (from bbsitem in CQGJ.BBSItem where bbsitem.ItemID == id select bbsitem).First(); RenderView("EditorForItem", ItemViewData); } catch (InvalidOperationException) { } catch (ArgumentNullException) { Response.Write("该帖子已被删除!"); } }
/// <summary> /// 根据BBSItem的ID来获取该Item的信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public BBSItemViewData GetBBSItemInfoByID(int id) { BBSItemViewData ItemViewData = new BBSItemViewData(); try { // 获取BBSItem的信息 ItemViewData.BBSItem = (from bbsitem in CQGJ.BBSItem where bbsitem.ItemID == id select bbsitem).First(); ItemViewData.BBSID = (int)ItemViewData.BBSItem.BBSReference.EntityKey.EntityKeyValues[0].Value; //ItemViewData.BBSID = ItemViewData.BBSItem.BBS.BBSID; } catch (InvalidOperationException) { } catch (ArgumentNullException) { Response.Write("该帖子已被删除!"); } return ItemViewData; }
/// <summary> /// 跳转到新建BBS Item页面 /// </summary> public void ToCreateTopicItem(int id) { BBSItemViewData BBSItemViewData = new BBSItemViewData(); BBSItemViewData.BBSID = id; RenderView("CreateTopic", BBSItemViewData); //RenderView("CreateTopic"); }
public void toCreateReplyItem() { BBSItemViewData item = new BBSItemViewData(); item.BBSID = GetInt("bbsId"); item.BBSItem = new BBSItem(); item.BBSItem.ItemID = GetInt("itemId"); RenderView("CreateReply", item); }
/// <summary> /// 根据BBSItem 的 ID 对其进行修改 /// </summary> /// <param name="id">BBSItem的ID</param> public void ShowEditBBSItem(int id) { BBSItemViewData ItemViewData = new BBSItemViewData(); try { // 获取BBSItem的信息 ItemViewData.BBSItem = (from bbsitem in CQGJ.BBSItem where bbsitem.ItemID == id select bbsitem).First(); ItemViewData.BBSID = (int)ItemViewData.BBSItem.BBSReference.EntityKey.EntityKeyValues[0].Value; //ItemViewData.BBSID = ItemViewData.BBSItem.BBS.BBSID; RenderView("ShowEditBBSItem", ItemViewData); } catch (InvalidOperationException) { } catch (ArgumentNullException) { Response.Write("该帖子已被删除!"); } }
/// <summary> /// 跳转到新建BBS Item页面 /// </summary> public ActionResult ToCreateTopicItem(int id) { BBSItemViewData BBSItemViewData = new BBSItemViewData(); BBSItemViewData.BBSID = id; return View("CreateTopic", BBSItemViewData); }
public ActionResult toCreateReplyItem() { BBSItemViewData item = new BBSItemViewData(); item.BBSID = GetInt("bbsId"); item.BBSItem = new BBSItem(); item.BBSItem.ItemID = GetInt("itemId"); return View("CreateReply", item); }