public ActionResult Index(FormCollection collection) { MyCreek.Platform.WorkFlowComment bworkFlowComment = new MyCreek.Platform.WorkFlowComment(); MyCreek.Platform.Organize borganize = new MyCreek.Platform.Organize(); IEnumerable <MyCreek.Data.Model.WorkFlowComment> workFlowCommentList; if (collection != null) { if (!Request.Form["DeleteBut"].IsNullOrEmpty()) { string ids = Request.Form["checkbox_app"]; foreach (string id in ids.Split(',')) { Guid bid; if (!id.IsGuid(out bid)) { continue; } var comment = bworkFlowComment.Get(bid); if (comment != null) { bworkFlowComment.Delete(bid); MyCreek.Platform.Log.Add("删除了流程意见", comment.Serialize(), MyCreek.Platform.Log.Types.流程相关); } } bworkFlowComment.RefreshCache(); } } workFlowCommentList = bworkFlowComment.GetAll(); bool isOneSelf = "1" == Request.QueryString["isoneself"]; if (isOneSelf) { workFlowCommentList = workFlowCommentList.Where(p => p.MemberID == MyCreek.Platform.Users.PREFIX + MyCreek.Platform.Users.CurrentUserID.ToString()); } return(View(workFlowCommentList)); }
protected void Page_Load(object sender, EventArgs e) { MyCreek.Platform.WorkFlowComment bworkFlowComment = new MyCreek.Platform.WorkFlowComment(); MyCreek.Platform.Organize borganize = new MyCreek.Platform.Organize(); query1 = string.Format("&appid={0}&tabid={1}&isoneself={2}", Request.QueryString["appid"], Request.QueryString["tabid"], Request.QueryString["isoneself"]); if (IsPostBack) { if (!Request.Form["DeleteBut"].IsNullOrEmpty()) { string ids = Request.Form["checkbox_app"]; foreach (string id in ids.Split(',')) { Guid bid; if (!id.IsGuid(out bid)) { continue; } var comment = bworkFlowComment.Get(bid); if (comment != null) { bworkFlowComment.Delete(bid); MyCreek.Platform.Log.Add("删除了流程意见", comment.Serialize(), MyCreek.Platform.Log.Types.流程相关); } } bworkFlowComment.RefreshCache(); } } workFlowCommentList = bworkFlowComment.GetAll(); isOneSelf = "1" == Request.QueryString["isoneself"]; if (isOneSelf) { workFlowCommentList = workFlowCommentList.Where(p => p.MemberID == MyCreek.Platform.Users.PREFIX + MyCreek.Platform.Users.CurrentUserID.ToString()); } }