Forward.aspx.cs
资源名称:H3_OA.rar [点击查看]
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:3k
源码类别:
OA系统
开发平台:
C#
- using System;
- using System.Collections;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Web;
- using System.Web.SessionState;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.HtmlControls;
- namespace OThinker.H3.Portal
- {
- /// <summary>
- /// Summary description for Forward.
- /// </summary>
- public partial class Forward : PortalPage
- {
- private OThinker.H3.WorkItem.WorkItem WorkItem
- {
- get
- {
- // 获得被征询的任务ID
- string itemId = this.Request.QueryString[Param_WorkItemID];
- string sessionName = OThinker.H3.WorkSheet.Sessions.GetWorkItem(itemId);
- if (this.Session[sessionName] == null)
- {
- OThinker.H3.WorkItem.WorkItem job = OThinker.H3.Server.Engine.WorkItemManager.GetWorkItem(itemId);
- this.Session[sessionName] = job;
- }
- return (OThinker.H3.WorkItem.WorkItem)this.Session[sessionName];
- }
- }
- protected void Page_Load(object sender, System.EventArgs e)
- {
- this.UserSelector.SelectUserUrl = PageName_SelectUser;
- this.UserSelector.SelectUserImageUrl = PageName_SelectUserImage;
- if(!this.IsPostBack)
- {
- // 检查该任务是否可以进行征询意见
- if(!this.WorkItem.PermittedActions.Forward)
- {
- this.NotifyMessage("不能进行征询意见操作");
- }
- }
- }
- #region Web Form Designer generated code
- override protected void OnInit(EventArgs e)
- {
- //
- // CODEGEN: This call is required by the ASP.NET Web Form Designer.
- //
- InitializeComponent();
- base.OnInit(e);
- }
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- }
- #endregion
- protected void btnSubmit_Click(object sender, System.EventArgs e)
- {
- // 选中的用户
- string selectedUser = this.UserSelector.SelectedUser;
- if (selectedUser == null || selectedUser == "")
- {
- this.NotifyMessage("没有选中的一个用户");
- return;
- }
- else if (OThinker.H3.Server.Engine.WorkItemManager.ForwardWorkItem(this.WorkItem.WorkItemID, selectedUser) == OThinker.H3.ErrorCode.SUCCESS)
- {
- this.NotifyMessage("委托成功");
- }
- else
- {
- this.NotifyMessage("委托不成功,可能该工作项不存在或者该工作项不能委托");
- }
- }
- }
- }