使用SQL Server不同的ID来填充同一.net页上的多个表单将不会填充所有表单 [英] using sql server different id's to populate several forms on same .net page will not fill all forms
问题描述
我无法解决或找到问题的解决方案,因此我设计了页面的简化模型来演示我所面临的问题.该表格使工作人员可以打印表格以带到远程工作站点,以获取有关已执行工作的信息,并写出他们尚未完成的工作.
在此模型中,我有四个表用于填充表单. p,pp,b和i.我从后面的代码中填充了一个gridview,以便选择行ID来选择表行以填充我的表单. p主键与pp外键有关(p是一个a到pp多关系)pp主键与b外键有关,而i foregn键(pp一到b和i一关系).
这是我的问题开始的地方.当我在grigview中选择一行时,会填充pp,b和i表,但不会填充p表.这是我的模型代码:
I have not been able to solve or find a solution to my problem so I designed a simplified mock-up of my page to demonstrate the issue that I am facing. This form is so that workers can print a form to take to a remote work site to have info on work already performed and to write in work they are performing not yet completed.
In this mock-up I have four tables that I am using to populate my forms. p, pp, b, and i. I populate a gridview from the code behind in order select the row id''s to pick the table rows to populate my forms. p primary key is related to pp foreign key (p being a one a to pp many relationship) pp primary key is related to b foreign key and i foregn key (pp one to b and i one relationships).
This is where my problem begins. When I select a row in grigview the pp, b and i tables populate but the p table does not. Here is my mock-up code:
<br />
form id="form1" runat="server" ><br />
<br />
<div id="noPrint" class="noPrint"><br />
<br />
<br />
<asp:SqlDataSource ID="SqlDataSource1" runat="server"<br />
<br />
<br />
ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT [es] FROM [es]"><br />
<br />
</asp:SqlDataSource><br />
<br />
<asp:Panel ID="Panel1" runat="server" Height="130px" Width="900px"><br />
<br />
<h2 id="H1" runat="server" style ="font-family : Verdana;">JWSP</h2><br />
<br />
<h3 id="H2" runat="server" style ="font-family : Verdana;">Select E Stage to review jobs then Select Job from grid to display</h3><br />
<br />
<br />
<br />
<br />
<asp:CheckBoxList ID="CheckBoxList" OnSelectedIndexChanged="CheckBoxes" runat="server" DataSourceID="SqlDataSource1" DataTextField="es" DataValueField="es" AutoPostBack="True" Font-Size="Smaller" RepeatColumns="5" RepeatDirection="Vertical" Height="41px" Width="900px"><br />
<br />
<br />
</asp:CheckBoxList> <h4 style="font-family: Verdana;">Select Job to display and print</h4><br />
<br />
</asp:Panel><br />
<br />
<br /><br />
<br />
<br />
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" > </asp:SqlDataSource><br />
<br />
<br /><br />
<br />
<asp:Panel ID="Panel2" runat="server" HorizontalAlign="Left" ScrollBars="Auto" Width="900px" Height="152px" ><br />
<br />
<br />
<br />
<br />
<asp:GridView ID="GridView1" runat="server" Width="900px" Height="152px" AllowSorting="True" AutoGenerateColumns="False" CellPadding="0" DataKeyNames="pid,cbid" DataSourceID="SqlDataSource2" ForeColor="#333333" GridLines="None" Visible="True" onselectedindexchanged="GridView1_SelectedIndexChanged"><br />
<br />
<Columns><br />
<br />
<asp:CommandField ShowSelectButton="True" /><br />
<br />
<br />
<asp:BoundField DataField="cba" HeaderText="CB Addr" SortExpression="cba" /><br />
<br />
<br />
<asp:BoundField DataField="pa" HeaderText="P Addr" SortExpression="pa" /><br />
<br />
<br />
<asp:BoundField DataField="jn" HeaderText="J Number" SortExpression="jn" /><br />
<br />
<br />
<asp:BoundField DataField="es" HeaderText="E Stage" SortExpression="es" /><br />
<br />
<br />
<asp:BoundField DataField="s" HeaderText="Status" SortExpression="st" /><br />
<br />
<br />
<asp:BoundField DataField="cbid" HeaderText="CB ID" SortExpression="cbid" /><br />
<br />
<br />
<asp:BoundField DataField="pid" HeaderText="P ID" SortExpression="pid" /><br />
<br />
</Columns><br />
<br />
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" /><br />
<br />
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" /><br />
<br />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" /><br />
<br />
<EmptyDataTemplate><br />
<br />
<table><br />
<br />
<tr><br />
<br />
<td><br />
<br />
<br />
<textarea id="Textarea1" runat="server" rows="3" cols="0" style="width: 900px;font-family: Verdana; font-weight: bold;">Select an Electrical Stage above to display this grid. You can then select a job to display from the grid rows.</textarea> </td><br />
<br />
</tr><br />
<br />
</table><br />
<br />
</EmptyDataTemplate><br />
<br />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" /><br />
<br />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="Red" /><br />
<br />
<AlternatingRowStyle BackColor="White" /><br />
<br />
</asp:GridView><br />
<br />
</asp:Panel><br />
<br />
<br />
<asp:Panel ID="Button1" runat="server" Width="900px" Height="28px" Direction="LeftToRight" HorizontalAlign="Left"><br />
<br />
<br />
<br />
<input runat="server" type="button" id="btnPrintpt" onclick="window.print()" value="Print" />&nbsp;&nbsp; <asp:Button ID="ViewReports" runat="server" onclick="ViewReports_Click" Text="Return To Reports Menu" Width="174px" style="background-color: #99CCFF;" /><br />
<br />
</asp:Panel><br />
<br />
</div><br />
<br />
<br /><br />
<br />
<br />
<div id="Page1" style="page-break-inside: avoid; height: 1300px; width: 900px;"><br />
<br />
<br />
<asp:Panel ID="Panel3" runat="server" Width="900px" Height="118px" Direction="LeftToRight" HorizontalAlign="Center"><br />
<br />
<br />
<br />
<asp:FormView ID="FormView3" runat="server" Width="900px" Height="118px" DataKeyNames="cbid" DataSourceID="SqlDataSource11" SelectedValue="True" HorizontalAlign="Left"><br />
<br />
<ItemTemplate><br />
<br />
<table class="style33w"><br />
<br />
<tr class="style45rpt"><br />
<br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 540px;" colspan="3" align="left"><br />
Name(s):<br />
&nbsp;<br />
<br />
</td><br />
<br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;" align="left"><br />
Date:<br />
&nbsp;<br />
<br />
</td><br />
<br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;" align="left"><br />
Day:<br />
&nbsp;<br />
<br />
</td><br />
<br />
</tr><br />
<br />
<tr class="style45rpt"><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;"<br />
<br />
align="left"><br />
Time Start:<br />
&nbsp;<br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;"<br />
<br />
align="left"><br />
Time End:<br />
&nbsp;<br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;"<br />
<br />
align="left"><br />
Hours:<br />
&nbsp;<br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;"<br />
<br />
align="left"><br />
# Employees:<br />
&nbsp;<br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;"<br />
<br />
align="left"><br />
Total Hours:<br />
&nbsp;<br />
<br />
</td><br />
<br />
</tr><br />
<br />
<tr class="style45rpt"><br />
<br />
<td style="border-bottom: thin solid #000000;"<br />
<br />
colspan="3" align="left" class="style52"><br />
CB Addr<br />
<br />
<span class="style1s">(pa)</span>:</td><br />
<br />
<td style="border-bottom: thin solid #000000;"<br />
<br />
align="left" class="style53"><br />
<br />
</td><br />
<br />
<td style="border-bottom: thin solid #000000;"<br />
<br />
align="left" class="style53"><br />
W Cntr<br />
<br />
<span class="style1s">(pa)</span>:</td><br />
<br />
</tr><br />
<br />
<tr class="style45rpt"><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 540px;"<br />
<br />
colspan="3" align="left"><br />
P Addr<br />
<br />
<span class="style1s">(pa)</span>:</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;"<br />
<br />
align="left"><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 150px;"<br />
<br />
align="left"><br />
Juris<br />
<br />
<br />
<span class="style1s">(pa)</span>:</tr><br />
<br />
</table><br />
<br />
</ItemTemplate><br />
<br />
<EmptyDataTemplate><br />
<br />
</tr><br />
<br />
<br />
</EmptyDataTemplate><br />
<br />
</asp:FormView><br />
<br />
<br />
<br />
<br />
<br />
<asp:SqlDataSource ID="SqlDataSource11" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT [cbid], [cba], [pa], [cj], [wc] FROM [p] WHERE ([cbid] = @cbid)"><br />
<br />
<SelectParameters><br />
<br />
<br />
<asp:ControlParameter ControlID="GridView1" Name="cbid" PropertyName="SelectedValue" Type="Int32" /><br />
<br />
</SelectParameters><br />
<br />
</asp:SqlDataSource><br />
<br />
</asp:Panel><br />
<br />
<br />
<asp:Panel ID="Panel10" runat="server" Width="900px" Height="210px" Direction="LeftToRight" HorizontalAlign="Center"><br />
<br />
<br />
<asp:FormView ID="FormView1" runat="server" Width="900px" Height="159px" DataKeyNames="pid" HorizontalAlign="Left" DataSourceID="SqlDataSource10"><br />
<br />
<ItemTemplate><br />
<br />
<table class="style33w"><br />
<br />
<tr class="style45rpt"><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br />
<br />
align="left"><br />
J Number<br />
<br />
<span class="style1s">(pw)</span>:&nbsp;<asp:Label ID="JNumberLabel" runat="server" Text=''<%# Bind("jn") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br />
<br />
align="left"><br />
M Page<br />
<br />
<span class="style1s">(pw)</span>:&nbsp;<asp:Label ID="MPageLabel" runat="server" Text=''<%# Bind("mp") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br />
<br />
align="left"><br />
Pw Source<br />
<br />
<span class="style1s">(pw)</span>:&nbsp;<asp:Label ID="PSourceLabel" runat="server" Text=''<%# Bind("ps") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br />
<br />
align="left"><br />
Pw Comp<br />
<br />
<span class="style1s">(pw)</span>:&nbsp;<asp:Label ID="PCompLabel" runat="server" Text=''<%# Bind("pcmp") %>'' /><br />
<br />
</td><br />
<br />
</tr><br />
<br />
<tr><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:900px; height:87px;"<br />
<br />
colspan="4" align="left" ><br />
Pw L Notes<br />
<br />
<span class="style1s">(pw)</span>:&nbsp;<asp:Label ID="PwLocationLabel" runat="server" Text=''<%# Bind("pl") %>'' /><br />
<br />
</td><br />
<br />
</tr><br />
<br />
<tr><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:900px; height:87px"<br />
<br />
colspan="4" align="left"><br />
E Pw Notes<br />
<br />
<span class="style1s">(pw)</span>:&nbsp;<asp:Label ID="EPwNotesLabel" runat="server" Text=''<%# Bind("epn") %>'' /><br />
<br />
</td><br />
<br />
</tr><br />
<br />
</table><br />
<br />
</ItemTemplate><br />
<br />
<EmptyDataTemplate><br />
<br />
<table class="style33w"><br />
<br />
<tr class="style45rpt"><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br />
<br />
align="left"><br />
J Number<br />
<br />
<span class="style1s">(pw)</span>:</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br />
<br />
align="left"><br />
M Page<br />
<br />
<span class="style1s">(pw)</span>:</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br />
<br />
align="left"><br />
Pw Source<br />
<br />
<span class="style1s">(pw)</span>:</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br />
<br />
align="left"><br />
Pw Comp<br />
<br />
<span class="style1s">(pw)</span>:</td><br />
<br />
</tr><br />
<br />
<tr><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:900px; height:87px;"<br />
<br />
colspan="4" align="left" ><br />
Pw L Notes<br />
<br />
<span class="style1s">(pw)</span>:</td><br />
<br />
</tr><br />
<br />
<tr><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:900px; height:87px"<br />
<br />
colspan="4" align="left"><br />
E Pw Notes<br />
<br />
<span class="style1s">(pw)</span>:</td><br />
<br />
</tr><br />
<br />
</table><br />
<br />
</EmptyDataTemplate><br />
<br />
</asp:FormView><br />
<br />
<br />
<br />
<br />
<asp:SqlDataSource ID="SqlDataSource10" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT pid, mp, ps, pcmp, pl, epn, jn FROM pp WHERE (pid = @pid)"><br />
<br />
<SelectParameters><br />
<br />
<br />
<asp:ControlParameter ControlID="GridView1" Name="pid" PropertyName="SelectedValue" Type="Int32" /><br />
<br />
</SelectParameters><br />
<br />
</asp:SqlDataSource><br />
<br />
<br />
</asp:Panel> <br /><br />
<br />
<br />
<asp:Panel ID="Panel4" runat="server" Width="900px" Height="238px" HorizontalAlign="Left" Wrap="False"><br />
<br />
<br />
<asp:FormView ID="FormView4" runat="server" Width="900px" Height="185px" DataSourceID="SqlDataSource6" HorizontalAlign="Right"><br />
<br />
<ItemTemplate><br />
<br />
<table class="style33w"><br />
<br />
<tr class="style45rpt"><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:900px; color:black;"<br />
<br />
colspan="4" align="left" ><br />
C Contr<br />
<br />
<span class="style1s">(bd)</span>:&nbsp;<asp:Label ID="CContrLabel" runat="server" Text=''<%# Bind("cc") %>'' /><br />
<br />
</td><br />
<br />
</tr><br />
<br />
<br />
<tr class="style45rpt"> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
SD Trans<br />
<br />
<span class="style1s">(bd)</span>:&nbsp;<asp:Label ID="SDTransLabel" runat="server" Text=''<%# Bind("st") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
D JB<br />
<br />
<span class="style1s">(bd)</span>:&nbsp;<asp:Label ID="DJBLabel" runat="server" Text=''<%# Bind("djb") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
B L Rcvd<br />
<br />
<span class="style1s">(bd)</span>:&nbsp;<asp:Label ID="BLRcvdLabel" runat="server" Text=''<%# Bind("blr","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
<br />
<br />
<span class="style1s">(bd)</span>:</td><br />
<br />
</tr><br />
<br />
<tr class="style45rpt"><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
P Num<br />
<br />
<span class="style1s">(bd)</span>:&nbsp;<asp:Label ID="PNumLabel" runat="server" Text=''<%# Bind("epn") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
P Post<br />
<br />
<span class="style1s">(bd)</span>:&nbsp;<asp:Label ID="PPostLabel" runat="server" Text=''<%# Bind("epp","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left" ><br />
C Type<br />
<br />
<span class="style1s">(bd)</span>:&nbsp;<asp:Label ID="CTypeLabel" runat="server" Text=''<%# Bind("ct") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
CB Grded<br />
<br />
<span class="style1s">(bd)</span>:&nbsp;<asp:Label ID="CBGrdedLabel" runat="server" Text=''<%# Bind("cbg","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
</tr><br />
<br />
<br />
<tr class="style45rpt"> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
C Set<br />
<br />
<span class="style1s">(bd)</span>:&nbsp;<asp:Label ID="CSetLabel" runat="server" Text=''<%# Bind("cs","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px"<br />
<br />
align="left"><br />
C Wi<br />
<br />
<span class="style1s">(bd)</span>:&nbsp;<asp:Label ID="CWiLabel" runat="server" Text=''<%# Bind("cw","{0:M/d/yy}") %>'' /><br />
<br />
<br />
</td> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
JB Set<br />
<br />
<span class="style1s">(bd)</span>:&nbsp;<asp:Label ID="JBSetLabel" runat="server" Text=''<%# Bind("jbs","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
S Wi<br />
<br />
<span class="style1s">(bd)</span>:&nbsp;<asp:Label ID="SWiLabel" runat="server" Text=''<%# Bind("sw","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
</tr><br />
<br />
<tr><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:900px; height:87px"<br />
<br />
colspan="4" align="left"><br />
B Notes<br />
<br />
<span class="style1s">(bd)</span>:&nbsp;<asp:Label ID="BNotesLabel" runat="server" Text=''<%# Bind("bn") %>'' /><br />
<br />
</td><br />
<br />
</tr><br />
<br />
</table><br />
<br />
</ItemTemplate><br />
<br />
<EmptyDataTemplate><br />
<br />
<table class="style33w"><br />
<br />
<tr class="style45rpt"><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:900px; color:black;"<br />
<br />
colspan="4" align="left" ><br />
C Contr<br />
<br />
<span class="style1s">(bd)</span>:&nbsp;<asp:Label ID="ContrLabel" runat="server" Text=''<%# Bind("cc") %>'' /><br />
<br />
</td><br />
<br />
</tr><br />
<br />
<br />
<tr class="style45rpt"> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
SD Trans<br />
<br />
<span class="style1s">(bd)</span>:</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
D JB<br />
<br />
<span class="style1s">(bd)</span>:</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
B L Rcvd<br />
<br />
<span class="style1s">(bd)</span>:</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
<br />
<br />
<span class="style1s">(bd)</span>:</td><br />
<br />
</tr><br />
<br />
<tr class="style45rpt"><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
P Num<br />
<br />
<span class="style1s">(bd)</span>:</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
P Post<br />
<br />
<span class="style1s">(bd)</span>:</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left" ><br />
C Type<br />
<br />
<span class="style1s">(bd)</span>:<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
CB Grded<br />
<br />
<span class="style1s">(bd)</span>:</tr><br />
<br />
<br />
<tr class="style45rpt"> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
C Set<br />
<br />
<span class="style1s">(bd)</span>:</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px"<br />
<br />
align="left"><br />
C Wi<br />
<br />
<br />
<span class="style1s">(bd)</span>:</td> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
JB Set<br />
<br />
<span class="style1s">(bd)</span>:</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:225px;"<br />
<br />
align="left"><br />
S Wi<br />
<br />
<span class="style1s">(bd)</span>:</td><br />
<br />
</tr><br />
<br />
<tr><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:900px; height:87px"<br />
<br />
colspan="4" align="left"><br />
B Notes<br />
<br />
<span class="style1s">(bd)</span>:</td><br />
<br />
</tr><br />
<br />
</table><br />
<br />
</EmptyDataTemplate><br />
<br />
</asp:FormView><br />
<br />
<br />
<br />
<br />
<br />
<asp:SqlDataSource ID="SqlDataSource6" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT bid, st, blr, epn, epp, ct, cbg, cs, cw, jbs, sw, cc, djb, bn FROM b WHERE (pid = @pid)"><br />
<br />
<SelectParameters><br />
<br />
<br />
<asp:ControlParameter ControlID="GridView1" Name="pid" PropertyName="SelectedValue" Type="Int32" /><br />
<br />
</SelectParameters><br />
<br />
</asp:SqlDataSource><br />
<br />
</asp:Panel><br />
<br />
<br />
<asp:Panel ID="Panel11" runat="server" Width="900px" Height="221px" HorizontalAlign="Left" Wrap="False"><br />
<br />
<br />
<asp:FormView ID="FormView2" runat="server" Width="900px" Height="181px" DataSourceID="SqlDataSource5" HorizontalAlign="Right"><br />
<br />
<ItemTemplate><br />
<br />
<table class="style33w"><br />
<br />
<tr class="style45rpt"><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
1st G Tst<br />
<br />
<span class="style1s">(in)</span>&nbsp;<asp:Label ID="GTstLabel" runat="server" Text=''<%# Bind("gt1","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
UI Cd<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="UICdLabel" runat="server" Text=''<%# Bind("uic","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
U Pd<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="UPdLabel" runat="server" Text=''<%# Bind("up","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
SI Cd<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="SICdLabel" runat="server" Text=''<%# Bind("sic","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
SI Pd<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="ServiceInspPassedLabel" runat="server" Text=''<%# Bind("sip","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
</tr><br />
<br />
<tr class="style45rpt"><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
F G Tst<br />
<br />
<span class="style1s">(in)</span>&nbsp;<asp:Label ID="FGTstLabel" runat="server" Text=''<%# Bind("gtf","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
F I Cd<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="FICdLabel" runat="server" Text=''<%# Bind("fic","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
F Pd<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="FPdLabel" runat="server" Text=''<%# Bind("fip","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
M Set<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="MSetLabel" runat="server" Text=''<%# Bind("ms","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
M Num<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="MNumLabel" runat="server" Text=''<%# Bind("mn") %>'' /><br />
<br />
</td><br />
<br />
</tr><br />
<br />
<tr><br />
<br />
<td style="border-bottom: thin solid #000000;"<br />
<br />
colspan="5" align="left" class="style54"><br />
Is Notes<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="IsNotesLabel" runat="server" Text=''<% Bind("isn") %>'' /><br />
<br />
</td><br />
<br />
</tr><br />
<br />
</table><br />
<br />
</ItemTemplate><br />
<br />
<EmptyDataTemplate><br />
<br />
<table class="style33w"><br />
<br />
<tr class="style45rpt"><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
1st G Tst<br />
<br />
<span class="style1s">(in)</span>&nbsp;<asp:Label ID="GTstLabel" runat="server" Text=''<%# Bind("gt1","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
UI Cd<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="UICdLabel" runat="server" Text=''<%# Bind("uic","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
U Pd<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="UPdLabel" runat="server" Text=''<%# Bind("up","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
SI Cd<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="SICdLabel" runat="server" Text=''<%# Bind("sic","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
SI Pd<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="ServiceInspPassedLabel" runat="server" Text=''<%# Bind("sip","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
</tr><br />
<br />
<tr class="style45rpt"><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
F G Tst<br />
<br />
<span class="style1s">(in)</span>&nbsp;<asp:Label ID="FGTstLabel" runat="server" Text=''<%# Bind("gtf","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
F I Cd<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="FICdLabel" runat="server" Text=''<%# Bind("fic","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
F Pd<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="FPdLabel" runat="server" Text=''<%# Bind("FinalInspPassed","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
M Set<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="MSetLabel" runat="server" Text=''<%# Bind("ms","{0:M/d/yy}") %>'' /><br />
<br />
</td><br />
<br />
<td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:180px;"<br />
<br />
align="left"><br />
M Num<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="MNumLabel" runat="server" Text=''<%# Bind("mn") %>'' /><br />
<br />
</td><br />
<br />
</tr><br />
<br />
<tr><br />
<br />
<td style="border-bottom: thin solid #000000;"<br />
<br />
colspan="5" align="left" class="style54"><br />
Is Notes<br />
<br />
<span class="style1s">(in)</span>:&nbsp;<asp:Label ID="IsNotesLabel" runat="server" Text=''<% Bind("Isn") %>'' /><br />
<br />
</td><br />
<br />
</tr><br />
<br />
</table><br />
<br />
</EmptyDataTemplate><br />
<br />
</asp:FormView><br />
<br />
<br />
<br />
<br />
<asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT [iid], [pid], [gt1], [uic], [up], [sic], [sip], [gtf], [fic], [fip], [ms], [mn], [insn] FROM [i] WHERE ([pid] = @pid)"><br />
<br />
<SelectParameters><br />
<br />
<br />
<asp:ControlParameter ControlID="GridView1" Name="pid" PropertyName="SelectedValue" Type="Int32" /><br />
<br />
</SelectParameters><br />
<br />
</asp:SqlDataSource><br />
<br />
</asp:Panel><br />
<br />
</div><br />
<br />
</form><br />
<br />
and the code behind:<br />
<br />
using<br />
System;<br />
using<br />
System.Collections.Generic;<br />
using<br />
System.Linq;<br />
using<br />
System.Net;<br />
using<br />
System.Net.Mail;<br />
using<br />
System.Web;<br />
using<br />
System.Web.UI;<br />
using<br />
System.Web.UI.WebControls;<br />
public<br />
partial class jwsp : System.Web.UI.Page<br />
{<br />
<br />
{<br />
}<br />
<br />
{<br />
<br />
<br />
<br />
{<br />
<br />
{<br />
str +=<br />
flag = 1;<br />
}<br />
}<br />
<br />
{<br />
str = str.Substring(0, str.Length - 1) +<br />
SqlDataSource2.SelectCommand = str;<br />
GridView1.DataBind();<br />
}<br />
<br />
{<br />
GridView1.Sort(<br />
}<br />
}<br />
<br />
{<br />
}<br />
<br />
protected void Page_Load(object sender, EventArgs e)protected void CheckBoxes(object sender, EventArgs e)string str = "SELECT pp.cbid, pp.pid, pp.es,pp.s, pp.jn, p.cba, p.pa FROM pp INNER JOIN p ON pp.cbid = p.cbid WHERE pp.es IN (";int flag = 0;foreach (ListItem li in CheckBoxList.Items)if (li.Selected)"''" + li.Text + "'',";if (flag == 1)")";if (IsPostBack)"pa", System.Web.UI.WebControls.SortDirection.Ascending);protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)<br />
我希望有人可以帮助我在这里解决问题.
I hope someone can help me figure out the issue here. Thanks.
推荐答案
ConnectionStrings:ConnectionString%& gt;" SelectCommand =&从[es]& gt;< br/>中选择[es] < br/> & lt;/asp:SqlDataSource& gt;< br/> < br/> < asp:Panel ID =&"Panel1& quot; runat =&服务器"高度=&"130px&"宽度=&"900px&"< br/> < br/> < h2 id =&"H1&" runat =&服务器"样式=& quot;字体家族:Verdana;" JWSP</h2& gt;< br/> < br/> < h3 id =&"H2&" runat =&服务器" style =" font-family:Verdana;"& gt;选择E Stage来审查作业,然后从网格中选择Job来显示/h3& lt; br/> < br/> < br/> < br/> < br/> & lt; asp:CheckBoxList ID =& quot; CheckBoxList& quot; OnSelectedIndexChanged =& quot; CheckBoxes& quot; runat =&服务器" DataSourceID =& quot; SqlDataSource1& quot; DataTextField =& quot; es& quot; DataValueField =& quot; es& quot; AutoPostBack =&"True&"字体大小=&小& amp;". RepeatColumns =&"5& amp;". RepeatDirection =&垂直&"高度=&"41px&"宽度=&"900px&"< br/> < br/> < br/> & lt;/asp:CheckBoxList& gt; < h4样式="字体家族:Verdana;& quot;选择作业以显示和打印</h4& gt;< br/> < br/> & lt//asp:Panel& gt;< br/> < br/> & lt; br/& gt;< br/> < br/> < br/> & lt; asp:SqlDataSource ID =& quot; SqlDataSource2& quot; runat =&服务器" ConnectionString =&<%
ConnectionStrings:ConnectionString %>" SelectCommand="SELECT [es] FROM [es]"><br /> <br /> </asp:SqlDataSource><br /> <br /> <asp:Panel ID="Panel1" runat="server" Height="130px" Width="900px"><br /> <br /> <h2 id="H1" runat="server" style ="font-family : Verdana;">JWSP</h2><br /> <br /> <h3 id="H2" runat="server" style ="font-family : Verdana;">Select E Stage to review jobs then Select Job from grid to display</h3><br /> <br /> <br /> <br /> <br /> <asp:CheckBoxList ID="CheckBoxList" OnSelectedIndexChanged="CheckBoxes" runat="server" DataSourceID="SqlDataSource1" DataTextField="es" DataValueField="es" AutoPostBack="True" Font-Size="Smaller" RepeatColumns="5" RepeatDirection="Vertical" Height="41px" Width="900px"><br /> <br /> <br /> </asp:CheckBoxList> <h4 style="font-family: Verdana;">Select Job to display and print</h4><br /> <br /> </asp:Panel><br /> <br /> <br /><br /> <br /> <br /> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%
ConnectionStrings:ConnectionString%&" & gt; & lt;/asp:SqlDataSource& gt;< br/> < br/> & lt; br/& gt;< br/> < br/> < asp:面板ID =& quot; Panel2& quot; runat =&服务器" HorizontalAlign =&"Left&" ScrollBars =&自动"宽度=&"900px&"高度=&"152px&" & gt; br/> < br/> < br/> < br/> < br/> & lt; asp:GridView ID =& quot; GridView1& quot; runat =&服务器"宽度=&"900px&"高度=&"152px&" AllowSorting =&"True&" AutoGenerateColumns =&假& amp;". CellPadding =&"0" DataKeyNames =& quot; pid,cbid& quot; DataSourceID =& quot; SqlDataSource2& quot; ForeColor =& quot;#333333& quot; GridLines =&无" Visible =&"True&" onselectedindexchanged =& quot; GridView1_SelectedIndexChanged& gt;< br/> < br/> & lt;列& gt;< br/> < br/> & lt; asp:CommandField ShowSelectButton =& quot; True& quot; /& gt;< br/> < br/> < br/> & lt; asp:BoundField DataField =&"cba&" HeaderText =&"CB地址". SortExpression =&"cba&" /& gt;< br/> < br/> < br/> & lt; asp:BoundField DataField =&"pa& quot; HeaderText =& quot; P Addr& quot; SortExpression =&"pa&" /& gt;< br/> < br/> < br/> & lt; asp:BoundField DataField =&"jn&" HeaderText =&"J编号&"; SortExpression =&"jn&" /& gt;< br/> < br/> < br/> & lt; asp:BoundField DataField =& quot; es& quot; HeaderText =&"E Stage&" SortExpression =& quot; es& quot; /& gt;< br/> < br/> < br/> & lt; asp:BoundField DataField =& quot; s& quot; HeaderText =&状态&" SortExpression =&"st&" /& gt;< br/> < br/> < br/> & lt; asp:BoundField DataField =&"cbid&" HeaderText =&"CB ID&" SortExpression =&"cbid&" /& gt;< br/> < br/> < br/> & lt; asp:BoundField DataField =&"pid& quot; HeaderText =&"P ID&". SortExpression =&"pid& amp;" /& gt;< br/> < br/> & lt;/Columns& gt;< br/> < br/> & lt; RowStyle BackColor =& quot;#FFFBD6& quot; ForeColor =& quot;#333333& quot; /& gt;< br/> < br/> & lt; FooterStyle BackColor =& quot;#990000& quot; Font-Bold =& quot; True& quot; ForeColor =&白色". /& gt;< br/> < br/> & lt; PagerStyle BackColor =& quot;#FFCC66& quot; ForeColor =& quot;#333333& quot; HorizontalAlign =&"Center&" /& gt;< br/> < br/> & lt; EmptyDataTemplate& gt;< br/> < br/> & lt; table& gt;< br/> < br/> & lt; tr& gt;< br/> < br/> & lt; td& gt;< br/> < br/> < br/> & lt; textarea id =& quot; Textarea1& quot; runat =&服务器"行="3". cols =&"0" style =& quot;宽度:900px;字体系列:Verdana; font-weight:粗体"& gt;在上面选择一个电子平台以显示此网格.然后,您可以从网格行中选择要显示的作业. & lt//td& gt;< br/> < br/> & lt//tr& gt;< br/> < br/> & lt//table& gt;< br/> < br/> & lt;/EmptyDataTemplate& gt;< br/> < br/> & lt; SelectedRowStyle BackColor =& quot;#FFCC66& quot; Font-Bold =& quot; True& quot; ForeColor =&海军"& /& gt;< br/> < br/> & lt; HeaderStyle BackColor =& quot;#990000& quot; Font-Bold =& quot; True& quot; ForeColor =&红色". /& gt;< br/> < br/> & lt; AlternatingRowStyle BackColor =&"White& quot; /& gt;< br/> < br/> & lt;/asp:GridView& gt;< br/> < br/> & lt//asp:Panel& gt;< br/> < br/> < br/> & lt; asp:Panel ID =& quot; Button1& quot; runat =&服务器"宽度=&"900px&"高度=&"28px&" Direction =&"LeftToRight&" HorizontalAlign =&"Left& gt;< br/> < br/> < br/> < br/> < input runat =&服务器&" type =& quot;按钮& quot; id =& quot; btnPrintpt& quot; onclick =& quot; window.print()& quot;值=&打印&" /& amp; amp; nbsp;& amp; amp; nbsp; & lt; asp:Button ID =& quot; ViewReports& quot; runat =&服务器" onclick =& quot; ViewReports_Click& quot;文字="返回报告菜单"宽度=&"174px&" style =& quot; background-color:#99CCFF;" /& gt;< br/> < br/> & lt//asp:Panel& gt;< br/> < br/> & lt//div& gt;< br/> < br/> & lt; br/& gt;< br/> < br/> < br/> & lt; div id =& quot; Page1& quot; style =&"page-break-inside:避免;高度:1300px;宽度:900px;& quot;< br/> < br/> < br/> < asp:面板ID =& quot; Panel3& quot; runat =&服务器"宽度=&"900px&"高度=&"118px&" Direction =&"LeftToRight&" HorizontalAlign =&"Center& gt;< br/> < br/> < br/> < br/> & lt; asp:FormView ID =& quot; FormView3& quot; runat =&服务器"宽度=&"900px&"高度=&"118px&" DataKeyNames =& quot; cbid& quot; DataSourceID =& quot; SqlDataSource11& quot; SelectedValue =& quot;真实& quot; HorizontalAlign =&"Left& gt;< br/> < br/> & lt; ItemTemplate& gt;< br/> < br/> & lt; table class =& quot; style33w& quot;< br/> < br/> & lt; tr class =& quot; style45rpt& quot;& gt;< br/> < br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:540px;" colspan =&"3" align =& quot; left& gt;< br/> 名称:< br/> & amp; nbsp;< br/> < br/> & lt//td& gt;< br/> < br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:180px;" align =& quot; left& gt;< br/> 日期:< br/> & amp; nbsp;< br/> < br/> & lt//td& gt;< br/> < br/> < br/> < td样式=&边框底样式:实心; border-bottom-width:薄;边框底色:#000000;宽度:180px;" align =& quot; left& gt;< br/> 日:< br/> & amp; nbsp;< br/> < br/> & lt//td& gt;< br/> < br/> & lt//tr& gt;< br/> < br/> & lt; tr class =& quot; style45rpt& quot;& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:180px;&< br/> < br/> align =& quot; left& gt;< br/> 时间开始:< br/> & amp; nbsp;< br/> < br/> & lt//td& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:180px;&< br/> < br/> align =& quot; left& gt;< br/> 时间结束:< br/> & amp; nbsp;< br/> < br/> & lt//td& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:180px;&< br/> < br/> align =&"left& gt;< br/> 时间:< br/> & amp; nbsp;< br/> < br/> & lt//td& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:180px;&< br/> < br/> align =& quot; left& gt;< br/> #员工:< br/> & amp; nbsp;< br/> < br/> & lt//td& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:180px;&< br/> < br/> align =& quot; left& gt;< br/> 总时数:< br/> & amp; nbsp;< br/> < br/> & lt//td& gt;< br/> < br/> & lt//tr& gt;< br/> < br/> & lt; tr class =& quot; style45rpt& quot;& gt;< br/> < br/> < td style =&边界底部:薄实心#000000;< br/> < br/> colspan =&"3" align =&"left&" class =& quot; style52& gt;< br/> CB地址
< br/> < span class =& quot; style1s& gt;(pa)</span& gt ::</td& gt;< br/> < br/> < td style =&边框底部:薄实心#000000;< br/> < br/> align =&"left&" class =& quot; style53& gt;< br/> < br/> & lt//td& gt;< br/> < br/> < td style =&边界底部:薄实心#000000;< br/> < br/> align =&"left&" class =& quot; style53& gt;< br/> W Cntr< br/> < br/> < span class =& quot; style1s& gt;(pa)</span& gt ::</td& gt;< br/> < br/> & lt//tr& gt;< br/> < br/> & lt; tr class =& quot; style45rpt& quot;& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:540px;< br/> < br/> colspan =&"3" align =& quot; left& gt;< br/> P Addr< br/> < br/> < span class =& quot; style1s& gt;(pa)</span& gt ::</td& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:180px;&< br/> < br/> align =& quot; left& gt;< br/> < br/> & lt//td& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:150px;&< br/> < br/> align =& quot; left& gt;< br/> 朱丽斯< br/> < br/> < br/> < span class =& quot; style1s& gt;(pa)</span& gt;:</tr& gt;< br/> < br/> & lt//table& gt;< br/> < br/> & lt;/ItemTemplate& gt;< br/> < br/> & lt; EmptyDataTemplate& gt;< br/> < br/> & lt//tr& gt;< br/> < br/> < br/> & lt;/EmptyDataTemplate& gt;< br/> < br/> & lt;/asp:FormView& gt;< br/> < br/> < br/> < br/> < br/> < br/> & lt; asp:SqlDataSource ID =& quot; SqlDataSource11& quot; runat =&服务器" ConnectionString =&<%
ConnectionStrings:ConnectionString %>" > </asp:SqlDataSource><br /> <br /> <br /><br /> <br /> <asp:Panel ID="Panel2" runat="server" HorizontalAlign="Left" ScrollBars="Auto" Width="900px" Height="152px" ><br /> <br /> <br /> <br /> <br /> <asp:GridView ID="GridView1" runat="server" Width="900px" Height="152px" AllowSorting="True" AutoGenerateColumns="False" CellPadding="0" DataKeyNames="pid,cbid" DataSourceID="SqlDataSource2" ForeColor="#333333" GridLines="None" Visible="True" onselectedindexchanged="GridView1_SelectedIndexChanged"><br /> <br /> <Columns><br /> <br /> <asp:CommandField ShowSelectButton="True" /><br /> <br /> <br /> <asp:BoundField DataField="cba" HeaderText="CB Addr" SortExpression="cba" /><br /> <br /> <br /> <asp:BoundField DataField="pa" HeaderText="P Addr" SortExpression="pa" /><br /> <br /> <br /> <asp:BoundField DataField="jn" HeaderText="J Number" SortExpression="jn" /><br /> <br /> <br /> <asp:BoundField DataField="es" HeaderText="E Stage" SortExpression="es" /><br /> <br /> <br /> <asp:BoundField DataField="s" HeaderText="Status" SortExpression="st" /><br /> <br /> <br /> <asp:BoundField DataField="cbid" HeaderText="CB ID" SortExpression="cbid" /><br /> <br /> <br /> <asp:BoundField DataField="pid" HeaderText="P ID" SortExpression="pid" /><br /> <br /> </Columns><br /> <br /> <RowStyle BackColor="#FFFBD6" ForeColor="#333333" /><br /> <br /> <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" /><br /> <br /> <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" /><br /> <br /> <EmptyDataTemplate><br /> <br /> <table><br /> <br /> <tr><br /> <br /> <td><br /> <br /> <br /> <textarea id="Textarea1" runat="server" rows="3" cols="0" style="width: 900px;font-family: Verdana; font-weight: bold;">Select an Electrical Stage above to display this grid. You can then select a job to display from the grid rows.</textarea> </td><br /> <br /> </tr><br /> <br /> </table><br /> <br /> </EmptyDataTemplate><br /> <br /> <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" /><br /> <br /> <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="Red" /><br /> <br /> <AlternatingRowStyle BackColor="White" /><br /> <br /> </asp:GridView><br /> <br /> </asp:Panel><br /> <br /> <br /> <asp:Panel ID="Button1" runat="server" Width="900px" Height="28px" Direction="LeftToRight" HorizontalAlign="Left"><br /> <br /> <br /> <br /> <input runat="server" type="button" id="btnPrintpt" onclick="window.print()" value="Print" />&nbsp;&nbsp; <asp:Button ID="ViewReports" runat="server" onclick="ViewReports_Click" Text="Return To Reports Menu" Width="174px" style="background-color: #99CCFF;" /><br /> <br /> </asp:Panel><br /> <br /> </div><br /> <br /> <br /><br /> <br /> <br /> <div id="Page1" style="page-break-inside: avoid; height: 1300px; width: 900px;"><br /> <br /> <br /> <asp:Panel ID="Panel3" runat="server" Width="900px" Height="118px" Direction="LeftToRight" HorizontalAlign="Center"><br /> <br /> <br /> <br /> <asp:FormView ID="FormView3" runat="server" Width="900px" Height="118px" DataKeyNames="cbid" DataSourceID="SqlDataSource11" SelectedValue="True" HorizontalAlign="Left"><br /> <br /> <ItemTemplate><br /> <br /> <table class="style33w"><br /> <br /> <tr class="style45rpt"><br /> <br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 540px;" colspan="3" align="left"><br /> Name(s):<br /> &nbsp;<br /> <br /> </td><br /> <br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;" align="left"><br /> Date:<br /> &nbsp;<br /> <br /> </td><br /> <br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;" align="left"><br /> Day:<br /> &nbsp;<br /> <br /> </td><br /> <br /> </tr><br /> <br /> <tr class="style45rpt"><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;"<br /> <br /> align="left"><br /> Time Start:<br /> &nbsp;<br /> <br /> </td><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;"<br /> <br /> align="left"><br /> Time End:<br /> &nbsp;<br /> <br /> </td><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;"<br /> <br /> align="left"><br /> Hours:<br /> &nbsp;<br /> <br /> </td><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;"<br /> <br /> align="left"><br /> # Employees:<br /> &nbsp;<br /> <br /> </td><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;"<br /> <br /> align="left"><br /> Total Hours:<br /> &nbsp;<br /> <br /> </td><br /> <br /> </tr><br /> <br /> <tr class="style45rpt"><br /> <br /> <td style="border-bottom: thin solid #000000;"<br /> <br /> colspan="3" align="left" class="style52"><br /> CB Addr<br /> <br /> <span class="style1s">(pa)</span>:</td><br /> <br /> <td style="border-bottom: thin solid #000000;"<br /> <br /> align="left" class="style53"><br /> <br /> </td><br /> <br /> <td style="border-bottom: thin solid #000000;"<br /> <br /> align="left" class="style53"><br /> W Cntr<br /> <br /> <span class="style1s">(pa)</span>:</td><br /> <br /> </tr><br /> <br /> <tr class="style45rpt"><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 540px;"<br /> <br /> colspan="3" align="left"><br /> P Addr<br /> <br /> <span class="style1s">(pa)</span>:</td><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 180px;"<br /> <br /> align="left"><br /> <br /> </td><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 150px;"<br /> <br /> align="left"><br /> Juris<br /> <br /> <br /> <span class="style1s">(pa)</span>:</tr><br /> <br /> </table><br /> <br /> </ItemTemplate><br /> <br /> <EmptyDataTemplate><br /> <br /> </tr><br /> <br /> <br /> </EmptyDataTemplate><br /> <br /> </asp:FormView><br /> <br /> <br /> <br /> <br /> <br /> <asp:SqlDataSource ID="SqlDataSource11" runat="server" ConnectionString="<%
ConnectionStrings:ConnectionString%&" SelectCommand =" SELECT [cbid],[cba],[pa],[cj],[wc] FROM [p] WHERE([cbid] = @cbid)& lt; br /> < br/> & lt; SelectParameters& gt;< br/> < br/> < br/> < asp:ControlParameter ControlID =& quot; GridView1& quot;名称=" cbid&" PropertyName =& quot; SelectedValue& quot;类型=&"Int32&". /& gt;< br/> < br/> & lt//SelectParameters& gt;< br/> < br/> & lt;/asp:SqlDataSource& gt;< br/> < br/> & lt//asp:Panel& gt;< br/> < br/> < br/> < asp:Panel ID =& quot; Panel10& amp; quot; runat =&服务器"宽度=&"900px&"高度=&"210px&" Direction =&"LeftToRight&" HorizontalAlign =&"Center& gt;< br/> < br/> < br/> & lt; asp:FormView ID =& quot; FormView1& quot; runat =&服务器"宽度=&"900px&"高度=&"159px&" DataKeyNames =& quot; pid& quot; HorizontalAlign =&"Left&" DataSourceID =&"SqlDataSource10&"& gt;< br/> < br/> & lt; ItemTemplate& gt;< br/> < br/> & lt; table class =& quot; style33w& quot;< br/> < br/> & lt; tr class =& quot; style45rpt& quot;& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:225px;< br/> < br/> align =&"left& gt;< br/> J号< br/> < br/> < span class =& quot; style1s& gt;(pw)</span& gt ::& amp; lt; asp:标签ID =& quot; ; JNumberLabel& quot; runat =&服务器" Text =''& lt;%#Bind(&"jn&))%& gt;''/&< br/> < br/> & lt//td& gt;< br/> < br/> < td样式=&边框底样式:实心; border-bottom-width:薄;边框底色:#000000;宽度:225px;< br/> < br/> align =& quot; left& gt;< br/> M页面< br/> < br/> < span class =& quot; style1s& gt;(pw)</span& gt ::& amp; lt; asp:标签ID =& quot; ; MPageLabel& quot; runat =&服务器" Text =''& lt;%#Bind(& amp; mp; amp; quot;)%& gt;''/& gt;< br/> < br/> & lt//td& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:225px;< br/> < br/> align =& quot; left& gt;< br/> Pw来源< br/> < br/> < span class =& quot; style1s& gt;(pw)</span& gt ::& amp; lt; asp:标签ID =& quot; ; PSourceLabel& quot; runat =&服务器" Text =''& lt;%#Bind(& ps& quot;)%& gt;''/&< br/> < br/> & lt//td& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:225px;< br/> < br/> align =& quot; left& gt;< br/> Pw Comp< br/> < br/> < span class =& quot; style1s& gt;(pw)</span& gt ::& amp; lt; asp:标签ID =& quot; ; PCompLabel& quot; runat =&服务器" Text =''& lt;%#Bind(& quot; pcmp& quot;)%& gt;''/& gt;< br/> < br/> & lt//td& gt;< br/> < br/> & lt//tr& gt;< br/> < br/> & lt; tr& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:900像素;高度:87px;& quot;< br/> < br/> colspan =&"4" align =&"left&" & gt; br/> Pw L笔记< br/> < br/> < span class =& quot; style1s& gt;(pw)</span& gt ::& amp; lt; asp:标签ID =& quot; ; PwLocationLabel& quot; runat =&服务器" Text =''& lt;%#Bind(& quot; pl& quot;)%& gt;''/&< br/> < br/> & lt//td& gt;< br/> < br/> & lt//tr& gt;< br/> < br/> & lt; tr& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:900px;高度:87px& quot;< br/> < br/> colspan =&"4" align =& quot; left& gt;< br/> E Pw注释< br/> < br/> < span class =& quot; style1s& gt;(pw)</span& gt ::& amp; lt; asp:标签ID =& quot; ; EPwNotesLabel& quot; runat =&服务器" Text =''& lt;%#Bind(& quot; epn& quot;)%& gt;''/&< br/> < br/> & lt//td& gt;< br/> < br/> & lt//tr& gt;< br/> < br/> & lt//table& gt;< br/> < br/> & lt;/ItemTemplate& gt;< br/> < br/> & lt; EmptyDataTemplate& gt;< br/> < br/> & lt; table class =& quot; style33w& quot;< br/> < br/> & lt; tr class =& quot; style45rpt& quot;& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:225px;< br/> < br/> align =&"left& gt;< br/> J号< br/> < br/> < span class =& quot; style1s& gt;(pw)</span& gt;:</td& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:225px;< br/> < br/> align =& quot; left& gt;< br/> M页面< br/> < br/> < span class =& quot; style1s& gt;(pw)</span& gt;:</td& gt;< br/> < br/> < td样式=&边框底样式:实心; border-bottom-width:薄;边框底色:#000000;宽度:225px;< br/> < br/> align =& quot; left& gt;< br/> Pw来源< br/> < br/> < span class =& quot; style1s& gt;(pw)</span& gt;:</td& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:225px;< br/> < br/> align =& quot; left& gt;< br/> Pw Comp< br/> < br/> < span class =& quot; style1s& gt;(pw)</span& gt;:</td& gt;< br/> < br/> & lt//tr& gt;< br/> < br/> & lt; tr& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:900像素;高度:87px;& quot;< br/> < br/> colspan =&"4" align =&"left&" & gt; br/> Pw L笔记< br/> < br/> < span class =& quot; style1s& gt;(pw)</span& gt;:</td& gt;< br/> < br/> & lt//tr& gt;< br/> < br/> & lt; tr& gt;< br/> < br/> < td style =&"border-bottom-style:实心; border-bottom-width:薄;边框底色:#000000;宽度:900像素;高度:87px& quot;< br/> < br/> colspan =&"4" align =&"left& gt;< br/> E Pw注释< br/> < br/> < span class =& quot; style1s& gt;(pw)</span& gt;:</td& gt;< br/> < br/> & lt//tr& gt;< br/> < br/> & lt//table& gt;< br/> < br/> & lt;/EmptyDataTemplate& gt;< br/> < br/> & lt;/asp:FormView& gt;< br/> < br/> < br/> < br/> < br/> & lt; asp:SqlDataSource ID =& quot; SqlDataSource10& quot; runat =&服务器" ConnectionString =&& lt;%
ConnectionStrings:ConnectionString %>" SelectCommand="SELECT [cbid], [cba], [pa], [cj], [wc] FROM [p] WHERE ([cbid] = @cbid)"><br /> <br /> <SelectParameters><br /> <br /> <br /> <asp:ControlParameter ControlID="GridView1" Name="cbid" PropertyName="SelectedValue" Type="Int32" /><br /> <br /> </SelectParameters><br /> <br /> </asp:SqlDataSource><br /> <br /> </asp:Panel><br /> <br /> <br /> <asp:Panel ID="Panel10" runat="server" Width="900px" Height="210px" Direction="LeftToRight" HorizontalAlign="Center"><br /> <br /> <br /> <asp:FormView ID="FormView1" runat="server" Width="900px" Height="159px" DataKeyNames="pid" HorizontalAlign="Left" DataSourceID="SqlDataSource10"><br /> <br /> <ItemTemplate><br /> <br /> <table class="style33w"><br /> <br /> <tr class="style45rpt"><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br /> <br /> align="left"><br /> J Number<br /> <br /> <span class="style1s">(pw)</span>:&nbsp;<asp:Label ID="JNumberLabel" runat="server" Text=''<%# Bind("jn") %>'' /><br /> <br /> </td><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br /> <br /> align="left"><br /> M Page<br /> <br /> <span class="style1s">(pw)</span>:&nbsp;<asp:Label ID="MPageLabel" runat="server" Text=''<%# Bind("mp") %>'' /><br /> <br /> </td><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br /> <br /> align="left"><br /> Pw Source<br /> <br /> <span class="style1s">(pw)</span>:&nbsp;<asp:Label ID="PSourceLabel" runat="server" Text=''<%# Bind("ps") %>'' /><br /> <br /> </td><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br /> <br /> align="left"><br /> Pw Comp<br /> <br /> <span class="style1s">(pw)</span>:&nbsp;<asp:Label ID="PCompLabel" runat="server" Text=''<%# Bind("pcmp") %>'' /><br /> <br /> </td><br /> <br /> </tr><br /> <br /> <tr><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:900px; height:87px;"<br /> <br /> colspan="4" align="left" ><br /> Pw L Notes<br /> <br /> <span class="style1s">(pw)</span>:&nbsp;<asp:Label ID="PwLocationLabel" runat="server" Text=''<%# Bind("pl") %>'' /><br /> <br /> </td><br /> <br /> </tr><br /> <br /> <tr><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:900px; height:87px"<br /> <br /> colspan="4" align="left"><br /> E Pw Notes<br /> <br /> <span class="style1s">(pw)</span>:&nbsp;<asp:Label ID="EPwNotesLabel" runat="server" Text=''<%# Bind("epn") %>'' /><br /> <br /> </td><br /> <br /> </tr><br /> <br /> </table><br /> <br /> </ItemTemplate><br /> <br /> <EmptyDataTemplate><br /> <br /> <table class="style33w"><br /> <br /> <tr class="style45rpt"><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br /> <br /> align="left"><br /> J Number<br /> <br /> <span class="style1s">(pw)</span>:</td><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br /> <br /> align="left"><br /> M Page<br /> <br /> <span class="style1s">(pw)</span>:</td><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br /> <br /> align="left"><br /> Pw Source<br /> <br /> <span class="style1s">(pw)</span>:</td><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width: 225px;"<br /> <br /> align="left"><br /> Pw Comp<br /> <br /> <span class="style1s">(pw)</span>:</td><br /> <br /> </tr><br /> <br /> <tr><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:900px; height:87px;"<br /> <br /> colspan="4" align="left" ><br /> Pw L Notes<br /> <br /> <span class="style1s">(pw)</span>:</td><br /> <br /> </tr><br /> <br /> <tr><br /> <br /> <td style="border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #000000; width:900px; height:87px"<br /> <br /> colspan="4" align="left"><br /> E Pw Notes<br /> <br /> <span class="style1s">(pw)</span>:</td><br /> <br /> </tr><br /> <br /> </table><br /> <br /> </EmptyDataTemplate><br /> <br /> </asp:FormView><br /> <br /> <br /> <br /> <br /> <asp:SqlDataSource ID="SqlDataSource10" runat="server" ConnectionString="<%
这篇关于使用SQL Server不同的ID来填充同一.net页上的多个表单将不会填充所有表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!