//Bind Basic Info private void BindData() { EWF_TaskBLL task = new EWF_TaskBLL((int)ViewState["TaskID"]); //绑定流程信息 lbl_Applyer.Text = new Org_StaffBLL(task.Model.Initiator).Model.RealName; lbl_AppName.Text = new EWF_Flow_AppBLL(task.Model.App).Model.Name; tbx_Topic.Text = task.Model.Title; lb_StartTime.Text = task.Model.StartTime.ToString(); if (task.Model.EndTime != new DateTime(1900, 1, 1)) { lb_EndTime.Text = task.Model.EndTime.ToString(); } else { lb_EndTime.Text = "未结束"; } if (task.Model.RelateURL != "") { hyl_RelateURL.NavigateUrl = task.Model.RelateURL; hyl_RelateURL.Visible = true; } else { hyl_RelateURL.Visible = false; } //Bind the dataobject info NameValueCollection dataobjects = task.GetDataObjectValue(); pl_dataobjectinfo.BindData(dataobjects); }
public string GetDataObjectValue(Guid DataObjectID) { EWF_TaskBLL task = new EWF_TaskBLL((int)ViewState["TaskID"]); if (DataObjectID != Guid.Empty) return task.GetDataObjectValue()[new EWF_Flow_DataObjectBLL(DataObjectID).Model.Name]; else return ""; }
public string GetDataObjectValue(Guid DataObjectID) { EWF_TaskBLL task = new EWF_TaskBLL((int)ViewState["TaskID"]); if (DataObjectID != Guid.Empty) { return(task.GetDataObjectValue()[new EWF_Flow_DataObjectBLL(DataObjectID).Model.Name]); } else { return(""); } }
//绑定条件判断环节详细信息 private void BindConditionProcessInfo(int JobID) { EWF_Task_JobBLL job = new EWF_Task_JobBLL(JobID); EWF_TaskBLL task = new EWF_TaskBLL(job.Model.Task); EWF_Flow_ProcessConditionBLL process = new EWF_Flow_ProcessConditionBLL(job.Model.CurrentProcess); EWF_Flow_DataObjectBLL dataobject = new EWF_Flow_DataObjectBLL(process.Model.DataObject); this.lbl_DataObjectName.Text = dataobject.Model.Name; this.lbl_DataObjectDisPlayName.Text = dataobject.Model.DisplayName; this.lbl_DataObjectValue.Text = task.GetDataObjectValue()[dataobject.Model.Name];; this.lbl_OperatorTypeName.Text = DictionaryBLL.GetDicCollections("EWF_Flow_OperatorType")[process.Model.OperatorType.ToString()].Name; this.lbl_Value1.Text = process.Model.Value1; this.lbl_Value2.Text = process.Model.Value2; }
//绑定基本信息 private void BindTaskData() { #region 绑定当前工作项 EWF_Task_JobCCBLL JobCCBLL = new EWF_Task_JobCCBLL((int)ViewState["JobCCID"]); if (JobCCBLL.Model == null || JobCCBLL.Model.RecipientStaff != (int)Session["UserID"]) { Response.Redirect("~/SubModule/DeskTop.aspx"); return; } if (JobCCBLL.Model.ReadFlag != "Y") { JobCCBLL.SetReadFlag("Y"); } //绑定当前抄送相关信息 lb_MessageSubject.Text = JobCCBLL.Model.MessageSubject; lb_Comment.Text = JobCCBLL.Model.Comment; EWF_Task_JobBLL JobBLL = new EWF_Task_JobBLL(JobCCBLL.Model.Job); lbl_CurrentJobName.Text = new EWF_Flow_ProcessBLL(JobBLL.Model.CurrentProcess).Model.Name; #endregion #region 绑定流程信息 EWF_TaskBLL task = new EWF_TaskBLL((int)ViewState["TaskID"]); ViewState["Initiator"] = task.Model.Initiator; //绑定流程信息 lbl_Applyer.Text = new Org_StaffBLL(task.Model.Initiator).Model.RealName; lbl_AppName.Text = new EWF_Flow_AppBLL(task.Model.App).Model.Name; lbl_Title.Text = task.Model.Title; hyl_RelateURL.NavigateUrl = task.Model.RelateURL; lb_Status.Text = DictionaryBLL.GetDicCollections("EWF_Task_TaskStatus")[task.Model.Status.ToString()].Name; lb_StartTime.Text = task.Model.StartTime.ToString(); if (task.Model.EndTime != new DateTime(1900, 1, 1)) { lb_EndTime.Text = task.Model.EndTime.ToString(); cbx_NotifyInitiator.Visible = false; bt_SaveComment.Visible = false; tbx_Comment.Visible = false; } else { lb_EndTime.Text = "未结束"; } lt_Remark.Text = task.Model.Remark; //显示申请详细信息IFrame if (!string.IsNullOrEmpty(task.Model.RelateURL)) { tr_RelateUrl.Visible = true; string url = this.ResolveClientUrl(task.Model.RelateURL); if (url.IndexOf('?') >= 0) { url += "&ViewFramework=false&Decision=Y"; } else { url += "?ViewFramework=false&Decision=Y"; } frame_relateurl.Attributes.Add("src", url); } else { tr_RelateUrl.Visible = false; } //Bind the dataobject info NameValueCollection dataobjects = task.GetDataObjectValue(); pl_dataobjectinfo.BindData(dataobjects); pl_dataobjectinfo.SetPanelEnable(false); TextBox tbx_ReMark = pl_dataobjectinfo.FindControl("C_Remark") != null ? (TextBox)pl_dataobjectinfo.FindControl("C_Remark") : null; if (tbx_ReMark != null) { tbx_ReMark.Enabled = true; tbx_ReMark.ReadOnly = true; } //绑定审批历史 this.gv_List_DecisionHistory.DataSource = task.GetDecisionHistory(); this.gv_List_DecisionHistory.DataBind(); //绑定附件 gv_List_Attachment.BindGrid <EWF_Task_Attachment>(task.GetAttachmentsList()); #endregion }
//绑定条件判断环节详细信息 private void BindConditionProcessInfo(int JobID) { EWF_Task_JobBLL job = new EWF_Task_JobBLL(JobID); EWF_TaskBLL task = new EWF_TaskBLL(job.Model.Task); EWF_Flow_ProcessConditionBLL process = new EWF_Flow_ProcessConditionBLL(job.Model.CurrentProcess); EWF_Flow_DataObjectBLL dataobject = new EWF_Flow_DataObjectBLL(process.Model.DataObject); this.lbl_DataObjectName.Text = dataobject.Model.Name; this.lbl_DataObjectDisPlayName.Text = dataobject.Model.DisplayName; this.lbl_DataObjectValue.Text = task.GetDataObjectValue()[dataobject.Model.Name]; ; this.lbl_OperatorTypeName.Text = DictionaryBLL.GetDicCollections("EWF_Flow_OperatorType")[process.Model.OperatorType.ToString()].Name; this.lbl_Value1.Text = process.Model.Value1; this.lbl_Value2.Text = process.Model.Value2; }
//Bind Basic Info private void BindData() { EWF_TaskBLL task = new EWF_TaskBLL((int)ViewState["TaskID"]); //绑定流程信息 lbl_Applyer.Text = new Org_StaffBLL(task.Model.Initiator).Model.RealName; lbl_AppName.Text = new EWF_Flow_AppBLL(task.Model.App).Model.Name; tbx_Topic.Text = task.Model.Title; lb_StartTime.Text = task.Model.StartTime.ToString(); if (task.Model.EndTime != new DateTime(1900, 1, 1)) lb_EndTime.Text = task.Model.EndTime.ToString(); else lb_EndTime.Text = "未结束"; if (task.Model.RelateURL != "") { hyl_RelateURL.NavigateUrl = task.Model.RelateURL; hyl_RelateURL.Visible = true; } else hyl_RelateURL.Visible = false; //Bind the dataobject info NameValueCollection dataobjects = task.GetDataObjectValue(); pl_dataobjectinfo.BindData(dataobjects); }
//绑定基本信息 private void BindTaskData() { #region 绑定当前工作项 EWF_Task_InviteConsultBLL InviteConsultBLL = new EWF_Task_InviteConsultBLL((int)ViewState["InviteConsult"]); if (InviteConsultBLL.Model == null || InviteConsultBLL.Model.RecipientStaff != (int)Session["UserID"]) { Response.Redirect("~/SubModule/DeskTop.aspx"); return; } if (InviteConsultBLL.Model.ReadFlag != "Y") { InviteConsultBLL.SetReadFlag("Y"); } EWF_Task_JobBLL JobBLL = new EWF_Task_JobBLL(InviteConsultBLL.Model.Job); if (JobBLL.Model.Status != 3) { MessageBox.Show(this, "该流程已不在等待邀请协助审批状态!"); bt_SaveDecisionComment.Visible = false; tbx_DecisionComment.Visible = false; } //绑定当前邀审相关信息 lbl_CurrentJobName.Text = new EWF_Flow_ProcessBLL(JobBLL.Model.CurrentProcess).Model.Name; lbl_InvitedStaff.Text = new Org_StaffBLL(InviteConsultBLL.Model.InvitedStaff).Model.RealName; lbl_InvitedTime.Text = InviteConsultBLL.Model.InvitedTime.ToString("yyyy-MM-dd HH:mm"); lb_DecisionComment.Text = InviteConsultBLL.Model.ConsultComment; #endregion #region 绑定流程信息 EWF_TaskBLL task = new EWF_TaskBLL((int)ViewState["TaskID"]); ViewState["Initiator"] = task.Model.Initiator; //绑定流程信息 lbl_Applyer.Text = new Org_StaffBLL(task.Model.Initiator).Model.RealName; lbl_AppName.Text = new EWF_Flow_AppBLL(task.Model.App).Model.Name; lbl_Title.Text = task.Model.Title; hyl_RelateURL.NavigateUrl = task.Model.RelateURL; lb_Status.Text = DictionaryBLL.GetDicCollections("EWF_Task_TaskStatus")[task.Model.Status.ToString()].Name; lb_StartTime.Text = task.Model.StartTime.ToString(); if (task.Model.EndTime != new DateTime(1900, 1, 1)) lb_EndTime.Text = task.Model.EndTime.ToString(); else lb_EndTime.Text = "未结束"; lt_Remark.Text = task.Model.Remark; //显示申请详细信息IFrame if (!string.IsNullOrEmpty(task.Model.RelateURL)) { tr_RelateUrl.Visible = true; string url = this.ResolveClientUrl(task.Model.RelateURL); if (url.IndexOf('?') >= 0) url += "&ViewFramework=false&Decision=Y"; else url += "?ViewFramework=false&Decision=Y"; frame_relateurl.Attributes.Add("src", url); } else { tr_RelateUrl.Visible = false; } //Bind the dataobject info NameValueCollection dataobjects = task.GetDataObjectValue(); pl_dataobjectinfo.BindData(dataobjects); pl_dataobjectinfo.SetPanelEnable(false); TextBox tbx_ReMark = pl_dataobjectinfo.FindControl("C_Remark") != null ? (TextBox)pl_dataobjectinfo.FindControl("C_Remark") : null; if (tbx_ReMark != null) { tbx_ReMark.Enabled = true; tbx_ReMark.ReadOnly = true; } //绑定审批历史 this.gv_List_DecisionHistory.DataSource = task.GetDecisionHistory(); this.gv_List_DecisionHistory.DataBind(); //绑定附件 gv_List_Attachment.BindGrid<EWF_Task_Attachment>(task.GetAttachmentsList()); #endregion }
//绑定基本信息 private void BindTaskData() { #region 绑定当前工作项 EWF_Task_JobBLL job = new EWF_Task_JobBLL((int)ViewState["CurrentJobID"]); int decisionid = job.StaffCanDecide((int)Session["UserID"]); if (decisionid <= 0) { MessageBox.ShowAndRedirect(this, "对不起,你无权审批当前工作流申请!", "../desktop.aspx"); return; } ViewState["DecisionID"] = decisionid; ViewState["TaskID"] = job.Model.Task; //绑定当前审批人相关信息 EWF_Flow_Process _CurrentProcess = new EWF_Flow_ProcessBLL(job.Model.CurrentProcess).Model; lbl_CurrentJobName.Text = _CurrentProcess.Name; if (_CurrentProcess.Type == 10) { //人员会审环节 无待处理选项 btn_WaitProcess.Visible = false; } EWF_Task_JobDecisionBLL decision = new EWF_Task_JobDecisionBLL(decisionid); if (decision.Model.ReadFlag != "Y") { decision.SetReadFlag("Y"); } lb_DecisionComment.Text = decision.Model.DecisionComment; this.lbl_RecipientStaff.Text = new Org_StaffBLL(decision.Model.RecipientStaff).Model.RealName; this.lbl_RecipientTime.Text = DateTime.Now.ToString(); if (decision.Model.RecipientStaff != (int)Session["UserID"]) { ViewState["PrincipalStaff"] = lbl_RecipientStaff.Text; MessageBox.Show(this, "请注意,当前申请是由【" + lbl_RecipientStaff.Text + "】授权您来批复!"); } #endregion #region 绑定流程信息 EWF_TaskBLL task = new EWF_TaskBLL((int)ViewState["TaskID"]); if (task.Model.Status == 5) { Response.Redirect("TaskDetail.aspx?TaskID=" + task.Model.ID.ToString()); return; } ViewState["Initiator"] = task.Model.Initiator; //绑定流程信息 lbl_Applyer.Text = new Org_StaffBLL(task.Model.Initiator).Model.RealName; lbl_AppName.Text = new EWF_Flow_AppBLL(task.Model.App).Model.Name; lbl_Title.Text = task.Model.Title; hyl_RelateURL.NavigateUrl = task.Model.RelateURL; lb_Status.Text = DictionaryBLL.GetDicCollections("EWF_Task_TaskStatus")[task.Model.Status.ToString()].Name; lb_StartTime.Text = task.Model.StartTime.ToString(); if (task.Model.EndTime != new DateTime(1900, 1, 1)) { lb_EndTime.Text = task.Model.EndTime.ToString(); } else { lb_EndTime.Text = "未结束"; } lt_Remark.Text = task.Model.Remark; //显示申请详细信息IFrame if (!string.IsNullOrEmpty(task.Model.RelateURL)) { tr_RelateUrl.Visible = true; string url = this.ResolveClientUrl(task.Model.RelateURL); if (url.IndexOf('?') >= 0) { url += "&ViewFramework=false&Decision=Y"; } else { url += "?ViewFramework=false&Decision=Y"; } frame_relateurl.Attributes.Add("src", url); } else { tr_RelateUrl.Visible = false; } //Bind the dataobject info NameValueCollection dataobjects = task.GetDataObjectValue(); pl_dataobjectinfo.BindData(dataobjects); pl_dataobjectinfo.SetPanelEnable(false); TextBox tbx_ReMark = pl_dataobjectinfo.FindControl("C_Remark") != null ? (TextBox)pl_dataobjectinfo.FindControl("C_Remark") : null; if (tbx_ReMark != null) { tbx_ReMark.Enabled = true; tbx_ReMark.ReadOnly = true; } //绑定审批历史 this.gv_List_DecisionHistory.DataSource = task.GetDecisionHistory(); this.gv_List_DecisionHistory.DataBind(); //绑定附件 gv_List_Attachment.BindGrid <EWF_Task_Attachment>(task.GetAttachmentsList()); #endregion ddl_App.SelectedValue = task.Model.App.ToString(); ViewState["PageIndex"] = 0; BindGrid_OtherTask(); BindGrid_InviteConsult(); }