Пример #1
0
 public ActionResult DeleteOneMessage(int id)
 {
     int count;
     bizUserMsg um = new bizUserMsg();
     List<UserMsgDetail> list = um.ListDetail(UserID, 0, 0, 50, out count);
     um.DeleteOneMessage(UserID, id);
     int index = 0;
     for (int i = 0; i < list.Count; i++)
     {
         if (list[i].UserMsgID == id)
         {
             index = i;
             break;
         }
     }
     int msgID=0;
     if (list.Count > (index + 1))
         msgID = list[index + 1].UserMsgID;
     else if (index > 1)
         msgID = list[index - 1].UserMsgID;
     else
         msgID = 0;
     return Redirect("/bbsbar/UserMsg/" + msgID + ".html");
 }
Пример #2
0
 public ActionResult DeleteOneMessage(int id)
 {
     bizUserMsg um = new bizUserMsg();
     um.DeleteOneMessage(UserID, id);
     return Redirect("/User/SelfMessage/0-1.html");
 }