62,046
社区成员
发帖
与我相关
我的任务
分享
<asp:DataGrid ID="dg_htqp" Font-Size="14px" Width="100%" AutoGenerateColumns="false" AllowPaging="true" AllowCustomPaging="true" DataKeyField="htqp_name" PageSize="50" OnPageIndexChanged="dg_htqp_page" PagerStyle-HorizontalAlign="Right" PagerStyle-Mode="NumericPages" runat="server">
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<img alt="~/img/green.jpg" src="~/img/green.jpg" runat="server" visible='<%# IIF(container.dataitem("hthqb_kz_sfpf")='否', True, False) %>' /><img src="~/img/green.jpg" alt="~/img/red.jpg" runat="server" visible='<%# IIF(container.dataitem("hthqb_kz_sfpf")='是', True, False) %>' />
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="项目名称">
<HeaderStyle Width="400px" />
<ItemTemplate>
<asp:HyperLink Text='<%# container.dataitem("lxsqs_sqsbt") %>' NavigateUrl='<%# "htqp_lxxst.aspx?htqp_name=" & container.dataitem("htqp_name") %>' ForeColor='<%# IIF(container.dataitem('hthqb_kz_sfpf')='否', green, red) %>' Target="_blank" runat="server" >
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn HeaderText="立项时间" DataField="lxsqs_date" DataFormatString="{0:d}">
<HeaderStyle Width="120px" />
</asp:BoundColumn>
<asp:BoundColumn HeaderText="立项单位" DataField="lxsqs_tbdw">
<HeaderStyle Width="120px" />
</asp:BoundColumn>
</Columns>
</asp:DataGrid>
<asp:TemplateColumn>
<ItemTemplate>
<img alt="~/img/green.jpg" runat="server" visible='<%#if(container.dataitem("hthqb_kz_sfpf")="否", True, False) %>'<img alt="~/img/red.jpg" runat="server" visible='<%#if(container.dataitem("hthqb_kz_sfpf")="是", True, False) %>' />
</ItemTemplate>
</asp:TemplateColumn>
protected void DataGrid01_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.Cells[3].Text == "已审核")
{
e.Row.BackColor = System.Drawing.Color.Red;
}
else
{
e.Row.BackColor = System.Drawing.Color.White;
}
}
Dim conn As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=" & Server.MapPath("../app_data/mydb.mdb"))
Dim strsql As String
Dim stryhm_dw, stryhm As String
'登陆用户名
stryhm = Session("yhm")
'登陆用户所属单位
stryhm_dw = Session("yhdw")
'取得登陆用户的级别
Dim stryhjb As String
stryhjb = Session("yhjb")
If stryhjb = "cjgly" Then
strsql = "select * from tab_htqp where lclx='合同签批'"
Else
strsql = "select * from tab_htqp where lclx='合同签批' and lxsqs_dw_yhm= '" & stryhm & "'"
End If
Dim cmd As New OleDbCommand(strsql, conn)
conn.Open()
Dim dr As OleDbDataReader = cmd.ExecuteReader()
Do While dr.Read()
If dr.Item("hthqb_kz_sfpf") = "否" Then
Else
End If
Loop