/// <summary> /// History 基本設定 /// </summary> /// <param name="CommentName">Comment Laber nmae </param> /// <param name="fview">flow object </param> /// <param name="e">FlowFeedbackHistoryEvent</param> public void FlowViewer_History(string CommentName, FlowFeedbackViewer fview, SmoothEnterprise.Flowwork.UI.WebControl.FlowFeedbackHistoryEventArgs e) { //簽核備註顯示 Label Comment = (Label)fview.HistoryView.FindControl(CommentName); Comment.Text = (string)e["Flow_Comment"]; Comment.Style.Value = "FILTER: none; BACKGROUND-COLOR: #f0f0f0;border:2px inset #f0f0f0;"; Comment.Width = 400; Comment.Height = 23; Image autograph = (Image)fview.HistoryView.FindControl("Image1"); autograph.BorderColor = Utility.HexColor("#28ff28"); autograph.Visible = false; //default 簽名檔不顯示 //顯示簽名檔 string user_guid = e["Flow_loginID"].ToString(); User_Info us = new User_Info(); //us.GetUserByID(); if (!string.IsNullOrEmpty(user_guid)) { autograph.Visible = true; //顯示簽名檔 string img_name = string.Format(@"../../image/{0}.jpg", user_guid); //確定檔案存在 autograph.ImageUrl = img_name; autograph.Visible = true; } Image signature = (Image)fview.HistoryView.FindControl("Image2"); //e["IniReviewer"].ToString() 表示"代"字 signature.Visible = false; string AppDeputy = e["InputText3"].ToString(); if (!string.IsNullOrEmpty(AppDeputy)) { //判斷圖檔是否存在 autograph.Visible = true; //顯示簽名檔 string img_name = string.Format(@"../../image/{0}.jpg", AppDeputy); //確定檔案存在 autograph.ImageUrl = img_name; autograph.Visible = true; signature.Visible = true; } }
protected void FlowFeedbackViewer1_OnLoadHistory(object sender, SmoothEnterprise.Flowwork.UI.WebControl.FlowFeedbackHistoryEventArgs e) { try { SmoothEnterprise.Web.UI.HTMLControl.InputText it; object obj = this.FlowFeedbackViewer1.HistoryView.FindControl("S_Comment"); it = (SmoothEnterprise.Web.UI.HTMLControl.InputText)obj; it.Enabled = true; it.ReadOnly = true; it.Text = (string)e["Flow_Comment"]; System.Web.UI.WebControls.Image sin1; object obj5 = this.FlowFeedbackViewer1.HistoryView.FindControl("Image1"); sin1 = (System.Web.UI.WebControls.Image)obj5; System.Web.UI.WebControls.Image sin2; object obj6 = this.FlowFeedbackViewer1.HistoryView.FindControl("Image2"); sin2 = (System.Web.UI.WebControls.Image)obj6; sin1.Visible = false; //default image 為Visable=true; //e["IniReviewer"].ToString() 表示"代"字 if ((string)e["IniReviewer"].ToString().Length.ToString() == "0") { sin2.Visible = false; } else { sin2.Visible = true; //為代理人 } //Response.Write((string)e["InputText3"].ToString() + "--"); if ((string)e["InputText3"].ToString().Length.ToString() != "0") { //判斷圖檔是否存在 string strupp = ""; //接 歷史的審核人員 logonid DirectoryInfo di = new DirectoryInfo("C:\\Inetpub\\E_Portal1\\image"); FileInfo[] fi = di.GetFiles(); foreach (FileInfo fiTemp in fi) { strupp = (string)e["InputText3"] + ".jpg"; //簽核者帳號 //資料一律轉成大寫 // Response.Write(fiTemp.Name.ToUpper() + "--" + strupp.ToUpper()+"--"); if (fiTemp.Name.ToUpper() == strupp.ToUpper()) { sin1.Visible = true; break; } } sin1.ImageUrl = "~/image/" + (string)e["InputText3"] + ".JPG"; } if ((string)e["IniReviewer"].ToString().Length.ToString() == "0") { sin2.Visible = false; } } catch { } }