/// <summary> /// 获取附件列表及单据列表 /// </summary> /// <returns></returns> public string GetAthsAndBills() { string sql = ""; string json = "{\"Aths\":"; if (FK_Node == 0) { sql = "SELECT fadb.*,wn.Name NodeName FROM Sys_FrmAttachmentDB fadb INNER JOIN WF_Node wn ON wn.NodeID = fadb.NodeID WHERE fadb.FK_FrmAttachment IN (SELECT MyPK FROM Sys_FrmAttachment WHERE " + BP.WF.Glo.MapDataLikeKey(this.FK_Flow, "FK_MapData") + " AND IsUpload=1) AND fadb.RefPKVal='" + this.WorkID + "' ORDER BY fadb.RDT"; } else { sql = "SELECT fadb.*,wn.Name NodeName FROM Sys_FrmAttachmentDB fadb INNER JOIN WF_Node wn ON wn.NodeID = fadb.NodeID WHERE fadb.FK_FrmAttachment IN (SELECT MyPK FROM Sys_FrmAttachment WHERE FK_MapData='ND" + FK_Node + "' ) AND fadb.RefPKVal='" + this.WorkID + "' ORDER BY fadb.RDT"; } DataTable dt = DBAccess.RunSQLReturnTable(sql); foreach (DataColumn col in dt.Columns) { col.ColumnName = col.ColumnName.ToUpper(); } json += BP.Tools.Json.ToJson(dt) + ",\"Bills\":"; Bills bills = new Bills(); bills.Retrieve(BillAttr.WorkID, this.WorkID); json += bills.ToJson() + ",\"AppPath\":\"" + BP.WF.Glo.CCFlowAppPath + "\"}"; return(json); }
protected void Page_Load(object sender, EventArgs e) { try { var workId = Request.QueryString["WorkID"]; var fk_flow = Request.QueryString["FK_Flow"]; var fid = Request.QueryString["FID"]; string url = string.Empty; url = "ChartTrack.htm?FID=" + fid + "&FK_Flow=" + fk_flow + "&WorkID=" + workId; //content.Attributes.Add("src", url); } catch (Exception ee) { Response.Write("轨迹图加载错误:" + ee.Message); } string isZhidu = this.Request.QueryString["isZhiDu"]; if (string.IsNullOrEmpty(isZhidu) == false) { string zhiduNo = this.Request.QueryString["ZhiDuNo"]; if (!string.IsNullOrEmpty(zhiduNo)) { try { //BP.MS.ZhiDu zhidu = new BP.MS.ZhiDu(); //zhidu.No = zhiduNo; //zhidu.Retrieve(); GenerWorkFlow workflow = new GenerWorkFlow(); workflow.WorkID = 0;// Int64.Parse(zhidu.OID); workflow.Retrieve(); this.Response.Redirect("Ath.aspx?FK_Flow=" + workflow.FK_Flow + "&WorkID=" + workflow.WorkID + "&FID=" + workflow.FID + "&FK_Node=" + workflow.FK_Node, true); return; } catch (Exception) { throw new Exception("该流程未完成或未找到对应的流程数据!"); } } } string flowID = int.Parse(this.FK_Flow).ToString(); string sql = ""; if (string.IsNullOrEmpty(FK_Node)) { sql = "SELECT * FROM Sys_FrmAttachmentDB WHERE FK_FrmAttachment IN (SELECT MyPK FROM Sys_FrmAttachment WHERE " + BP.WF.Glo.MapDataLikeKey(this.FK_Flow, "FK_MapData") + " AND IsUpload=1) AND RefPKVal='" + this.OID + "' ORDER BY RDT"; } else { sql = "SELECT * FROM Sys_FrmAttachmentDB WHERE FK_FrmAttachment IN (SELECT MyPK FROM Sys_FrmAttachment WHERE FK_MapData='ND" + FK_Node + "' ) AND RefPKVal='" + this.OID + "' ORDER BY RDT"; } //string sql = "SELECT * FROM Sys_FrmAttachmentDB WHERE FK_FrmAttachment IN (SELECT MyPK FROM Sys_FrmAttachment WHERE FK_MapData ='ND"+FK_Node+"' AND IsUpload=1) AND RefPKVal='" + this.OID + "' ORDER BY RDT"; DataTable dt = DBAccess.RunSQLReturnTable(sql); if (dt.Rows.Count > 0) { this.Pub1.AddTable("class='Table' cellpadding='0' cellspacing='0' border='0' style='width: 100%'"); this.Pub1.AddTR(); this.Pub1.AddTDGroupTitle("style='text-align:center'", "序"); this.Pub1.AddTDGroupTitle("附件编号"); this.Pub1.AddTDGroupTitle("节点"); this.Pub1.AddTDGroupTitle("名称"); this.Pub1.AddTDGroupTitle("大小(kb)"); this.Pub1.AddTDGroupTitle("上传人"); this.Pub1.AddTDGroupTitle("上传日期"); this.Pub1.AddTREnd(); int i = 0; foreach (DataRow dr in dt.Rows) { i++; this.Pub1.AddTR(); this.Pub1.AddTDIdx(i); this.Pub1.AddTD(dr["FK_FrmAttachment"].ToString()); string nodeName = ""; try { int nodeID = int.Parse(dr["NodeID"].ToString()); Node node = new Node(nodeID); nodeName = node.Name; } catch { } this.Pub1.AddTD(nodeName); this.Pub1.AddTD("<a href='/WF/CCForm/AttachmentUpload.aspx?DoType=Down&MyPK=" + dr["MyPK"] + "' target=_sd ><img src='/WF/Img/FileType/" + dr["FileExts"] + ".gif' onerror=\"this.src='/WF/Img/FileType/Undefined.gif'\" border=0/>" + dr["FileName"].ToString() + "</a>"); this.Pub1.AddTD(dr["FileSize"].ToString()); this.Pub1.AddTD(dr["RecName"].ToString()); this.Pub1.AddTD(dr["RDT"].ToString()); this.Pub1.AddTREnd(); } this.Pub1.AddTableEnd(); } Bills bills = new Bills(); bills.Retrieve(BillAttr.WorkID, this.OID); if (bills.Count > 0) { this.Pub1.AddTable("class='Table' cellpadding='0' cellspacing='0' border='0' style='width: 100%'"); this.Pub1.AddTR(); this.Pub1.AddTDGroupTitle("style='text-align:center'", "序"); this.Pub1.AddTDGroupTitle("名称"); this.Pub1.AddTDGroupTitle("节点"); this.Pub1.AddTDGroupTitle("打印人"); this.Pub1.AddTDGroupTitle("日期"); this.Pub1.AddTDGroupTitle("功能"); this.Pub1.AddTREnd(); int idx = 0; foreach (Bill bill in bills) { idx++; this.Pub1.AddTR(); this.Pub1.AddTDIdx(idx); this.Pub1.AddTD(bill.FK_BillTypeT); this.Pub1.AddTD(bill.FK_NodeT); this.Pub1.AddTD(bill.FK_EmpT); this.Pub1.AddTD(bill.RDT); this.Pub1.AddTD("<a class='easyui-linkbutton' data-options=\"iconCls:'icon-print'\" href='" + this.Request.ApplicationPath + "WF/Rpt/Bill.aspx?MyPK=" + bill.MyPK + "&DoType=Print' >打印</a>"); this.Pub1.AddTREnd(); } this.Pub1.AddTableEnd(); } int num = bills.Count + dt.Rows.Count; if (num == 0) { Pub1.AddEasyUiPanelInfo("提示", "<h3>当前流程没有数据,或者该流程没有附件或者单据。</h3>"); } }
protected void Page_Load(object sender, EventArgs e) { #region 处理风格 this.Page.RegisterClientScriptBlock("s", "<link href='/WF/Comm/Style/Table" + BP.Web.WebUser.Style + ".css' rel='stylesheet' type='text/css' />"); #endregion 处理风格 string flowID = int.Parse(this.FK_Flow).ToString(); string sql = "SELECT * FROM Sys_FrmAttachmentDB WHERE FK_FrmAttachment IN (SELECT MyPK FROM Sys_FrmAttachment WHERE FK_MapData LIKE 'ND" + flowID + "%' AND IsUpload=1) AND RefPKVal='" + this.OID + "' ORDER BY RDT"; DataTable dt = DBAccess.RunSQLReturnTable(sql); if (dt.Rows.Count > 0) { this.Pub1.AddTable(); // this.Pub1.AddCaptionLeft("流程附件"); this.Pub1.AddTR(); this.Pub1.AddTDTitle("IDX"); this.Pub1.AddTDTitle("附件编号"); this.Pub1.AddTDTitle("名称"); this.Pub1.AddTDTitle("大小(kb)"); this.Pub1.AddTDTitle("上传人"); this.Pub1.AddTDTitle("上传日期"); this.Pub1.AddTREnd(); int i = 0; foreach (DataRow dr in dt.Rows) { i++; this.Pub1.AddTR(); this.Pub1.AddTDIdx(i); this.Pub1.AddTD(dr["FK_FrmAttachment"].ToString()); this.Pub1.AddTD("<a href='" + this.Request.ApplicationPath + "WF/CCForm/AttachmentUpload.aspx?DoType=Down&MyPK=" + dr["MyPK"] + "' target=_sd ><img src='/WF/Img/FileType/" + dr["FileExts"] + ".gif' onerror=\"this.src='/WF/Img/FileType/Undefined.gif'\" border=0/>" + dr["FileName"].ToString() + "</a>"); this.Pub1.AddTD(dr["FileSize"].ToString()); this.Pub1.AddTD(dr["RecName"].ToString()); this.Pub1.AddTD(dr["RDT"].ToString()); this.Pub1.AddTREnd(); } this.Pub1.AddTableEnd(); } Bills bills = new Bills(); bills.Retrieve(BillAttr.WorkID, this.OID); if (bills.Count > 0) { this.Pub1.AddTable(); // this.Pub1.AddCaptionLeft("单据"); this.Pub1.AddTR(); this.Pub1.AddTDTitle("IDX"); this.Pub1.AddTDTitle("名称"); this.Pub1.AddTDTitle("节点"); this.Pub1.AddTDTitle("打印人"); this.Pub1.AddTDTitle("日期"); this.Pub1.AddTDTitle("功能"); this.Pub1.AddTREnd(); int idx = 0; foreach (Bill bill in bills) { idx++; this.Pub1.AddTR(); this.Pub1.AddTDIdx(idx); this.Pub1.AddTD(bill.FK_BillTypeT); this.Pub1.AddTD(bill.FK_NodeT); this.Pub1.AddTD(bill.FK_EmpT); this.Pub1.AddTD(bill.RDT); this.Pub1.AddTD("<a href='" + this.Request.ApplicationPath + "WF/Rpt/Bill.aspx?MyPK=" + bill.MyPK + "&DoType=Print' >打印</a>"); this.Pub1.AddTREnd(); } this.Pub1.AddTableEnd(); } int num = bills.Count + dt.Rows.Count; if (num == 0) { this.Pub1.AddMsgGreen("提示", "<h2>当前流程没有数据,或者该流程没有附件或者单据。</h2>"); } }