public static string GetWFName(string businesscode, string instancecode) { DataTable table = SqlHelper.ExecuteQuery(CommandType.Text, " select * from WF_BusinessCode where BusinessCode='" + businesscode + "' ", new SqlParameter[0]); string str = string.Empty; try { DataTable table2 = SqlHelper.ExecuteQuery(CommandType.Text, " select " + table.Rows[0]["NameField"].ToString() + " from " + table.Rows[0]["LinkTable"].ToString() + " where " + table.Rows[0]["PrimaryField"].ToString() + " ='" + instancecode + "' ", new SqlParameter[0]); if (businesscode == "089") { if (!string.IsNullOrEmpty(table2.Rows[0][0].ToString())) { str = str + "—" + TenderInfo.GetProjectName(table2.Rows[0][0].ToString()); } return(str); } if ((businesscode == "100") || (businesscode == "106")) { if (!string.IsNullOrEmpty(table2.Rows[0][0].ToString())) { str = str + "—" + cn.justwin.PrjManager.ProjectInfo.GetProjectName(table2.Rows[0][0].ToString()); } return(str); } if (!string.IsNullOrEmpty(table2.Rows[0][0].ToString())) { str = str + "—" + table2.Rows[0][0].ToString(); } } catch { } return(str); }
protected void gvAuditingList_RowDataBoundWX(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[0].Text = System.Convert.ToString(e.Row.RowIndex + 1 + this.gvAuditingList.PageIndex * this.gvAuditingList.PageSize); e.Row.Attributes["id"] = System.Convert.ToString(e.Row.RowIndex + 1); DataRowView dataRowView = (DataRowView)e.Row.DataItem; string text = dataRowView["InstanceCode"].ToString(); string text2 = dataRowView["NoteID"].ToString(); string text3 = dataRowView["IsAllPass"].ToString(); string text4 = dataRowView["NodeID"].ToString(); string text5 = dataRowView["BusinessCode"].ToString(); string text6 = dataRowView["BusinessClass"].ToString(); System.Convert.ToInt32(dataRowView["During"]); e.Row.Cells[2].Text = FlowAuditAction.OrganigerName(new System.Guid(dataRowView["instanceCode"].ToString()), text5, text6); DataTable dataTable = FlowAuditAction.QueryAuditStatus(new System.Guid(dataRowView["instanceCode"].ToString()), dataRowView["BusinessCode"].ToString(), dataRowView["businessclass"].ToString()); for (int i = 0; i < dataTable.Rows.Count; i++) { if (i < dataTable.Rows.Count - 1) { TableCell expr_19E = e.Row.Cells[3]; expr_19E.Text = expr_19E.Text + dataTable.Rows[i]["auditor"].ToString() + ","; } else { TableCell expr_1E3 = e.Row.Cells[3]; expr_1E3.Text += dataTable.Rows[i]["auditor"].ToString(); } } decimal d = 0m; try { d = System.Convert.ToDecimal(dataRowView["cs"]); } catch { } LinkButton linkButton = (LinkButton)e.Row.Cells[1].Controls[0]; DataTable dataTable2 = publicDbOpClass.DataTableQuary(" select * from WF_BusinessCode where BusinessCode='" + dataRowView["BusinessCode"].ToString() + "' "); try { DataTable dataTable3 = publicDbOpClass.DataTableQuary(string.Concat(new string[] { " select ", dataTable2.Rows[0]["NameField"].ToString(), " from ", dataTable2.Rows[0]["LinkTable"].ToString(), " where ", dataTable2.Rows[0]["PrimaryField"].ToString(), " ='", dataRowView["instanceCode"].ToString(), "' " })); if (dataRowView["BusinessCode"].ToString() == "089") { if (!string.IsNullOrEmpty(dataTable3.Rows[0][0].ToString())) { LinkButton expr_389 = linkButton; expr_389.Text = expr_389.Text + "—" + TenderInfo.GetProjectName(dataTable3.Rows[0][0].ToString()); } } else { if (dataRowView["BusinessCode"].ToString() == "100" || dataRowView["BusinessCode"].ToString() == "106") { if (!string.IsNullOrEmpty(dataTable3.Rows[0][0].ToString())) { LinkButton expr_41C = linkButton; expr_41C.Text = expr_41C.Text + "—" + ProjectInfo.GetProjectName(dataTable3.Rows[0][0].ToString()); } } else { if (!string.IsNullOrEmpty(dataTable3.Rows[0][0].ToString())) { LinkButton expr_471 = linkButton; expr_471.Text = expr_471.Text + "—" + dataTable3.Rows[0][0].ToString(); } } } } catch { } linkButton.Attributes["class"] = "firstpage"; linkButton.Attributes["style"] = " color:blue;"; if (d > 0m) { string str = "超时"; linkButton.Text = "[<font color=\"red\">" + str + "</font>]" + linkButton.Text; } string str2 = string.Concat(new string[] { "/EPC/Workflow/AuditFrameWX.aspx?ic=", text, "&id=", text2, "&pass="******"&nid=", text4, "&bc=", text5, "&bcl=", text6 }); linkButton.Attributes["onclick"] = "view('" + str2 + "','审核内容查看')"; } }
protected void Page_Load(object sender, System.EventArgs e) { base.Response.Cache.SetNoStore(); this.InstanceCode = new System.Guid(base.Request["ic"]); this.BusinessCode = base.Request["bc"].ToString(); this.BusinessClass = base.Request["bcl"].ToString(); this.AddNewTr(FlowAuditAction.QueryAuditStatus(this.InstanceCode, this.BusinessCode, this.BusinessClass)); this.btnPrint.Attributes["onclick"] = "PrintPage();return false;"; this.divTemplateName.InnerText = FlowAuditAction.TemplateName(this.InstanceCode, this.BusinessCode, this.BusinessClass); this.LbUserName.Text = FlowAuditAction.OrganigerName(this.InstanceCode, this.BusinessCode, this.BusinessClass); if (this.divTemplateName.InnerText.Length > 10) { this.divTemplateName.Style.Add("word-wrap", "break-word"); } this.LbStartTime.Text = FlowAuditAction.StartTime(this.InstanceCode, this.BusinessCode, this.BusinessClass); DataTable dataTable = publicDbOpClass.DataTableQuary(string.Concat(new string[] { " select * from WF_Business_Class where BusinessCode= '", this.BusinessCode, "' and BusinessClass='", this.BusinessClass, "' " })); this.LbConter.Text = dataTable.Rows[0]["BusinessClassName"].ToString() + ":"; DataTable dataTable2 = publicDbOpClass.DataTableQuary(" select * from WF_BusinessCode where BusinessCode='" + this.BusinessCode + "' "); try { DataTable dataTable3 = publicDbOpClass.DataTableQuary(string.Concat(new object[] { " select ", dataTable2.Rows[0]["NameField"].ToString(), " from ", dataTable2.Rows[0]["LinkTable"].ToString(), " where ", dataTable2.Rows[0]["PrimaryField"].ToString(), " ='", this.InstanceCode, "' " })); if (this.BusinessCode == "089") { this.LinkButton1.Text = TenderInfo.GetProjectName(dataTable3.Rows[0][0].ToString()); } else { if (this.BusinessCode == "100" || this.BusinessCode == "106") { this.LinkButton1.Text = ProjectInfo.GetProjectName(dataTable3.Rows[0][0].ToString()); } else { this.LinkButton1.Text = dataTable3.Rows[0][0].ToString(); } } } catch { this.LinkButton1.Text = "查看"; } this.LinkButton1.Attributes["onclick"] = string.Concat(new object[] { " viewopen ('", FlowAuditAction.DoWithUrl(this.BusinessCode), "ic=", this.InstanceCode, "')" }); this.LbAuditCode.Text = FlowAuditAction.GetTemplateCode(this.InstanceCode, this.BusinessCode, this.BusinessClass); }
private void tblData_Draw() { DataTable userModelInfo = this.deskTop.GetUserModelInfo(base.UserCode); this.tblData.Attributes["width"] = Unit.Pixel(this._ColCount * (this._GridWidth + this._GridColSpaceWidth)).ToString(); DataRow[] source = userModelInfo.Select("ModelID=780501"); if (source.Count <DataRow>() > 0) { userModelInfo.Rows.Remove(source[0]); int num = (this._ColCount * this._GridWidth) + ((this._ColCount - 1) * this._GridColSpaceWidth); this.divProject.Style.Add("display", ""); this.divProject.Style.Add("margin-top", (this._GridRowSpaceWidth / 2) + "px"); int num13 = this._ColCount * (this._GridWidth + this._GridColSpaceWidth); this.divProject.Style.Add(" width", num13.ToString() + "px"); this.tabProject.Style.Add(" width", num.ToString() + "px"); this.ShowColumn(num - 40); this.UpdateAttrib(); } else { this.divProject.Style.Add("display", "none"); } int num3 = (int)Math.Ceiling((decimal)(userModelInfo.Rows.Count / this._ColCount)); for (int i = 0; i < num3; i++) { HtmlTableRow row = new HtmlTableRow(); HtmlTableCell cell = new HtmlTableCell(); for (int j = 0; j < this._ColCount; j++) { cell = new HtmlTableCell(); cell.Attributes["align"] = "center"; cell.Attributes["width"] = this._GridWidth.ToString(); cell.Attributes["height"] = this._GridHeight.ToString(); cell.Attributes["wrap"] = "true"; int num6 = (i * this._ColCount) + j; cell.Attributes["tag"] = num6.ToString(); string text = ""; if (num6 >= userModelInfo.Rows.Count) { goto Label_1208; } string str2 = "更多"; string str3 = userModelInfo.Rows[num6][0].ToString(); string tbName = userModelInfo.Rows[num6][1].ToString(); string colName = userModelInfo.Rows[num6][2].ToString(); string colTime = userModelInfo.Rows[num6][3].ToString(); string selWhere = userModelInfo.Rows[num6][4].ToString(); string str8 = userModelInfo.Rows[num6][8].ToString(); string str9 = userModelInfo.Rows[num6][5].ToString(); string str10 = userModelInfo.Rows[num6][6].ToString(); string coldId = userModelInfo.Rows[num6][7].ToString(); DataTable wFInfo = new DataTable(); switch (str3) { case "283818": wFInfo = this.deskTop.GetWFInfo(base.UserCode, this._FixRowCount); goto Label_063E; case "2842": wFInfo = this.deskTop.GetWarningInfo(base.UserCode, this._FixRowCount); goto Label_063E; case "2801": wFInfo = this.deskTop.GetDBInfo(base.UserCode, this._FixRowCount); goto Label_063E; case "381705": wFInfo = this.deskTop.GetWebLinkInfo(base.UserCode, this._FixRowCount); str2 = "设置"; goto Label_063E; default: if (((!(str3 == "381703") && !(str3 == "381707")) && (!(str3 == "381708") && !(str3 == "381709"))) && (!(str3 == "381710") && !(str3 == "381711"))) { goto Label_05F9; } switch (str3) { case "381703": wFInfo = this.deskTop.GetMenuLinkInfo(base.UserCode, this._FixRowCount, "1"); goto Label_05F0; case "381707": wFInfo = this.deskTop.GetMenuLinkInfo(base.UserCode, this._FixRowCount, "2"); goto Label_05F0; case "381708": wFInfo = this.deskTop.GetMenuLinkInfo(base.UserCode, this._FixRowCount, "3"); goto Label_05F0; case "381709": wFInfo = this.deskTop.GetMenuLinkInfo(base.UserCode, this._FixRowCount, "4"); goto Label_05F0; case "381710": wFInfo = this.deskTop.GetMenuLinkInfo(base.UserCode, this._FixRowCount, "5"); goto Label_05F0; case "381711": wFInfo = this.deskTop.GetMenuLinkInfo(base.UserCode, this._FixRowCount, "6"); goto Label_05F0; } wFInfo = this.deskTop.GetMenuLinkInfo(base.UserCode, this._FixRowCount, "1"); break; } Label_05F0: str2 = "设置"; goto Label_063E; Label_05F9: if (str3 == "280305") { new BulletionAction(); wFInfo = BulletionAction.ReturnTable(base.UserCode, " and dtm_expriesdate>getdate()-1 and auditstate=1"); } else { wFInfo = this.deskTop.GetShowInfo(colName, colTime, tbName, selWhere, coldId, this._FixRowCount); } Label_063E: if (wFInfo.Rows.Count != 0) { string str24 = string.Concat(new object[] { "<table modelId=\"", str3, "\" width=\"", this._GridWidth, "\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" }); text = (str24 + "<tr onmousemove='showDel(\"Img_del" + str3 + "\")' onmouseout='showDelT(\"Img_del" + str3 + "\")'><td><img src=\"image/bg_01.gif\" style=\"float:left; width:12px;height:25px\" /></td><td background=\"image/bg_02.gif\" class=\"header-b\" style=\"text-align:left;\" > " + str8 + "</td><td><img src=\"image/bg_03.gif\" title=\"隐藏此栏目\" id=\"Img_del" + str3 + "\" onclick=\"grid_del(" + str3 + ")\" style=\"float:right;width:12px;height:25px\" /></td></tr>") + "<tr><td background=\"image/bg_11.gif\" width=\"12px\"></td><td valign=\"top\"><div class=\"pagebody\"><table>"; int count = wFInfo.Rows.Count; if (this._FixRowCount < wFInfo.Rows.Count) { count = this._FixRowCount; } for (int k = 0; k < count; k++) { string str12 = str10 + wFInfo.Rows[k][2]; string str13 = ""; string str14 = wFInfo.Rows[k][0].ToString(); string str15 = string.Empty; switch (str3) { case "283818": { if ((wFInfo.Rows[k]["cs"].ToString() != "") && (Convert.ToInt32(wFInfo.Rows[k]["cs"].ToString()) > 0)) { str13 = "<font color=\"red\">【超时】</font>"; } string str16 = wFInfo.Rows[k]["InstanceCode"].ToString(); string str17 = wFInfo.Rows[k]["NoteID"].ToString(); string str18 = wFInfo.Rows[k]["IsAllPass"].ToString(); string str19 = wFInfo.Rows[k]["NodeID"].ToString(); string str20 = wFInfo.Rows[k]["BusinessCode"].ToString(); string str21 = wFInfo.Rows[k]["BusinessClass"].ToString(); str12 = "../EPC/Workflow/AuditFrame.aspx?ic=" + str16 + "&id=" + str17 + "&nid=" + str19 + "&pass="******"&bc=" + str20 + "&bcl=" + str21; DataTable table3 = publicDbOpClass.DataTableQuary(" select * from WF_BusinessCode where BusinessCode='" + str20 + "' "); try { DataTable table4 = publicDbOpClass.DataTableQuary(" select " + table3.Rows[0]["NameField"].ToString() + " from " + table3.Rows[0]["LinkTable"].ToString() + " where " + table3.Rows[0]["PrimaryField"].ToString() + " ='" + str16 + "' "); if (str20 == "089") { if (!string.IsNullOrEmpty(table4.Rows[0][0].ToString())) { str14 = str14 + "—" + TenderInfo.GetProjectName(table4.Rows[0][0].ToString()); } } else if ((str20 == "100") || (str20 == "106")) { if (!string.IsNullOrEmpty(table4.Rows[0][0].ToString())) { str14 = str14 + "—" + ProjectInfo.GetProjectName(table4.Rows[0][0].ToString()); } } else if (!string.IsNullOrEmpty(table4.Rows[0][0].ToString())) { str14 = str14 + "—" + table4.Rows[0][0].ToString(); } } catch { } break; } case "2801": str12 = "/" + wFInfo.Rows[k]["V_DBLJ"].ToString(); str15 = wFInfo.Rows[k]["I_DBSJ_ID"].ToString(); break; case "2842": str12 = StringUtility.DealUrl(wFInfo.Rows[k]["URI"].ToString()) + "id=" + wFInfo.Rows[k]["WarningId"].ToString(); str15 = wFInfo.Rows[k]["WarningId"].ToString(); str14 = wFInfo.Rows[k]["WarningTitle"].ToString(); break; case "381705": str12 = wFInfo.Rows[k]["WebAddr"].ToString(); break; case "381703": case "381707": case "381708": case "381709": case "381710": case "381711": if (wFInfo.Rows[k]["v_cdlj"].ToString().Substring(0, 1) == "/") { str12 = ".." + wFInfo.Rows[k]["v_cdlj"].ToString(); } else { str12 = "../" + wFInfo.Rows[k]["v_cdlj"].ToString(); } str14 = wFInfo.Rows[k]["MNewName"].ToString(); break; default: if (str3 == "280305") { str9 = "../oa/Bulletin/BulletinManage.aspx?type=see"; str12 = "../oa/bulletin/BulletinLock.aspx?ic=" + wFInfo.Rows[k][0].ToString(); str14 = wFInfo.Rows[k][4].ToString(); } break; } int length = (this._GridWidth - 200) / 10; str13 = str13 + ((str14.Length > length) ? (str14.Substring(0, length).ToString() + "...") : str14.ToString()); string str22 = ""; if (str3 != "280305") { if ((wFInfo.Rows[k][1].ToString().ToString() != "") && (wFInfo.Rows[k][1].ToString() != null)) { str22 = wFInfo.Rows[k][1].ToString(); } } else if ((wFInfo.Rows[k][7].ToString().ToString() != "") && (wFInfo.Rows[k][7].ToString() != null)) { str22 = Convert.ToDateTime(wFInfo.Rows[k][7].ToString()).ToString("yyyy-MM-dd"); } if (str3 == "381705") { string str25 = text; text = str25 + "<tr class=\"border-a\"><td align =\"left\" title=\"" + wFInfo.Rows[k][0].ToString() + "\" ><img src=\"image/dian.jpg\" style=\"float:left; width:2px;height:2px;margin:5px 5px 5px 0px; \" /><a target=\"_new\" onclick='OpenWeb(\"" + str12 + "\")'>" + str13 + "</a></td><td width=\"70px\" align =\"left\">" + str22 + "</td></tr>"; } else { string str26 = text; text = str26 + "<tr id=\"" + str15 + "\" class=\"border-a\"><td align =\"left\" title=\"" + str14 + "\" ><img src=\"image/dian.jpg\" style=\"float:left; width:2px;height:2px;margin:5px 5px 5px 0px;\" /><a href='javascript:openTab(\"" + str12 + "\",\"" + ((str14.Length > 10) ? (str14.Substring(0, 10).ToString() + "...") : str14.ToString()) + "\")'>" + str13 + "</a></td><td width=\"70px\" align =\"left\">" + str22 + "</td></tr>"; } } if (wFInfo.Rows.Count < this._FixRowCount) { for (int m = 0; m < (this._FixRowCount - wFInfo.Rows.Count); m++) { text = text + "<tr class=\"border-b\"><td> </td><td> </td></tr>"; } } string str27 = text + "</table></div></td><td background=\"image/bg_13.gif\" wdith=\"12px\"> </td></tr>"; text = (str27 + "<tr valign=\"top\"> <td background=\"image/bg_11.gif\" width=\"12px\"> </td><td width=\"100%\"><span class=\"readmore\"><a href='javascript:openTab(\"" + str9 + "\",\"" + str8 + "\")'>" + str2 + ">></a></td><td background=\"image/bg_13.gif\" width=\"11px\"> </td></tr>") + "<tr><td height=\"10px\" valign=\"top\"><img src=\"image/bg_21.gif\" style=\"float:left;width:12px; height:10px;\"/></td><td height=\"10px\" valign=\"top\" background=\"image/bg_22.gif\"></td> <td valign=\"top\"><img src=\"image/bg_23.gif\" style=\"float:left;width:12px; height:10px;\"/></td></tr>" + "</table>"; } else { if (str3 == "280305") { str9 = "../oa/Bulletin/BulletinManage.aspx?type=see"; } string str28 = "<table width=\"" + this._GridWidth + "\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"; text = (str28 + "<tr onmousemove='showDel(\"Img_del" + str3 + "\")' onmouseout='showDelT(\"Img_del" + str3 + "\")'><td><img src=\"image/bg_01.gif\" style=\"float:left; width:12px;height:25px\" /></td><td background=\"image/bg_02.gif\" class=\"header-b\" style=\"text-align:left;\" > " + str8 + "</td><td><img src=\"image/bg_03.gif\" title=\"隐藏此栏目\" id=\"Img_del" + str3 + "\" onclick=\"grid_del(" + str3 + ")\" style=\"float:right;width:12px;height:25px\" /></td></tr>") + "<tr><td background=\"image/bg_11.gif\" width=\"12px\"></td><td valign=\"top\"><div class=\"pagebody\"><table>"; for (int n = 0; n < this._FixRowCount; n++) { text = text + "<tr class=\"border-b\"><td> </td><td> </td></tr>"; } string str23 = text + "</table></div></td><td background=\"image/bg_13.gif\" wdith=\"12px\"> </td></tr>"; text = (str23 + "<tr valign=\"top\"> <td background=\"image/bg_11.gif\" width=\"12px\"> </td><td width=\"100%\"><span class=\"readmore\"><a href='javascript:openTab(\"" + str9 + "\",\"" + str8 + "\")'>" + str2 + ">></a></td><td background=\"image/bg_13.gif\" width=\"11px\"> </td></tr>") + "<tr><td height=\"10px\" valign=\"top\"><img src=\"image/bg_21.gif\" style=\"float:left;width:12px; height:10px;\"/></td><td height=\"10px\" valign=\"top\" background=\"image/bg_22.gif\"></td> <td valign=\"top\"><img src=\"image/bg_23.gif\" style=\"float:left;width:12px; height:10px;\"/></td></tr>" + "</table>"; } Label_1208: cell.Controls.Add(new LiteralControl(text)); row.Cells.Add(cell); } row.Attributes["height"] = ((this._GridHeight + this._GridRowSpaceWidth) + 15).ToString(); this.tblData.Rows.Add(row); } }