日期:2014-05-17 浏览次数:20495 次
<asp:Label ID="Label_0102" runat="server" Height="21px" Width="150px"></asp:Label>
<asp:SqlDataSource ID="SqlDataSource_LastContractNumber" runat="server"
ConnectionString="<%$ ConnectionStrings:长铁物业公司资产数据库ConnectionString %>" SelectCommand="select top(1) ContractNumber as LastContractNumber
from ContractTable
where ContractNumber like '%csdy-ctwy-%'
order by ContractNumber desc"></asp:SqlDataSource>
protected void SqlDataSource_LastContractNumber_Load(object sender, EventArgs e)
{
string count = e.Command.Parameters["LastContractNumber"].Value.ToString();
((Label)this.FormView1.FindControl("Label_0102")).Text = "共有:<span style='color:red;'>" + count + "</span> ";
}