审批时进行判断

      it["审批意见"] = li["审批意见"];

                if (li["审批意见"] == null)
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), string.Format("<script>alert('请填写审批意见,点编辑!')</script>"));
                  
                }
                else
                {
                    it["审批人"] = SPContext.Current.Web.CurrentUser.Name;
                    it["审批时间"] = DateTime.Now.ToString("yyyy-MM-dd");
                  
                  
                   

                    it.Update();
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), string.Format("<script>alert('成功!')</script>"));
               
                }

posted @ 2014-03-06 15:44  914556495  阅读(136)  评论(0编辑  收藏  举报