Ejemplo n.º 1
0
 protected void DeluxeGridPost_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     //删除岗位
     if (e.CommandName == "DeletePost")
     {
         WfPostCollection postCollection = WfPostAdapter.Instance.Load(builder => builder.AppendItem("POST_ID", e.CommandArgument.ToString()));
         if (postCollection.Count > 0)
         {
             WfPostAdapter.Instance.Delete(postCollection[0]);
             RefreshButton_Click(sender, new EventArgs());
         }
     }
 }
Ejemplo n.º 2
0
 protected void EditPostRequest(string postId)
 {
     if (string.IsNullOrEmpty(postId))
     {
         NewPostRequest();
     }
     else
     {
         WfPostCollection posts = WfPostAdapter.Instance.Load(builder => builder.AppendItem("POST_ID", postId));
         ExceptionHelper.FalseThrow(posts.Count > 0, "没有找到对应的岗位定义");
         Data = posts[0];
         ExecQuery();
     }
 }