public ActionResult Index(FormCollection collection) { RoadFlow.Platform.WorkFlowComment bworkFlowComment = new RoadFlow.Platform.WorkFlowComment(); RoadFlow.Platform.Organize borganize = new RoadFlow.Platform.Organize(); IEnumerable <RoadFlow.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); RoadFlow.Platform.Log.Add("删除了流程意见", comment.Serialize(), RoadFlow.Platform.Log.Types.流程相关); } } bworkFlowComment.RefreshCache(); } } workFlowCommentList = bworkFlowComment.GetAll(); bool isOneSelf = "1" == Request.QueryString["isoneself"]; if (isOneSelf) { workFlowCommentList = workFlowCommentList.Where(p => p.MemberID == RoadFlow.Platform.UsersBLL.PREFIX + RoadFlow.Platform.UsersBLL.CurrentUserID.ToString()); } return(View(workFlowCommentList)); }
protected void Page_Load(object sender, EventArgs e) { RoadFlow.Platform.WorkFlowComment bworkFlowComment = new RoadFlow.Platform.WorkFlowComment(); RoadFlow.Platform.Organize borganize = new RoadFlow.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); RoadFlow.Platform.Log.Add("删除了流程意见", comment.Serialize(), RoadFlow.Platform.Log.Types.流程相关); } } bworkFlowComment.RefreshCache(); } } workFlowCommentList = bworkFlowComment.GetAll(); isOneSelf = "1" == Request.QueryString["isoneself"]; if (isOneSelf) { workFlowCommentList = workFlowCommentList.Where(p => p.MemberID == RoadFlow.Platform.Users.PREFIX + RoadFlow.Platform.Users.CurrentUserID.ToString()); } }
public string Delete() { RoadFlow.Platform.WorkFlowComment workFlowComment1 = new RoadFlow.Platform.WorkFlowComment(); string str1 = this.Request.Form["ids"]; char[] chArray = new char[1] { ',' }; foreach (string str2 in str1.Split(chArray)) { Guid test; if (str2.IsGuid(out test)) { RoadFlow.Data.Model.WorkFlowComment workFlowComment2 = workFlowComment1.Get(test); if (workFlowComment2 != null) { workFlowComment1.Delete(test); RoadFlow.Platform.Log.Add("删除了流程意见", workFlowComment2.Serialize(), RoadFlow.Platform.Log.Types.流程相关, "", "", (RoadFlow.Data.Model.Users)null); } } } workFlowComment1.RefreshCache(); return("删除成功!"); }