结束表单流程的代码:

   protected void btnSubmit_Click(object sender, EventArgs e){if(this.txtreceiveDate.Text!=""){SqlComm.UpdateTableByCondition("BioSendAppInfo", "receiveDate='" + Convert.ToDateTime(this.txtreceiveDate.Text) + "'", "SendId=" + taskid);}}

根据销售表单统计此表单总金额:

-- Description: 根据销售表单统计此表单总金额
-- =============================================
ALTER FUNCTION [dbo].[FN_getSendTotalMoneyBySendID]
(@SendID int
)
RETURNS money
AS
BEGINDECLARE @TotalMoney moneySELECT @TotalMoney=sum(ProPrice*ProCount) FROM dbo.BioSendGoodsPro
WHERE SendID=@SendIDRETURN @TotalMoneyEND

创建查询视图:

CREATE VIEW [dbo].[View_SendAppInfoShowList]
AS
SELECT *,AuditingSate=dbo.FN_CurrentAuditingSate(3,SendId),Transmitter=ISNULL(dbo.FN_CurrentTransmitter(3,SendId),'数据错误'),Listid= ISNULL(dbo.FN_GetDynamicId(3,SendId),0),
SendTotal=dbo.FN_getSendTotalMoneyBySendID(SendId) FROM dbo.View_BioSendAppInfo

产品销售发货列表查询:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SendGoodsListShow.aspx.cs" Inherits="BioErpWeb.SendGoods.SendGoodsListShow" %>
<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
<%@ Register src="../UserControl/SendProTop.ascx" tagname="SendProTop" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"><title></title><link href="../Styles/ERPBaseStyle.css" rel="stylesheet" type="text/css" /><link href="../Styles/AspNetPagerStyle.css" rel="stylesheet" type="text/css" /><link href="../Styles/InputStyle1.css" rel="stylesheet" type="text/css" /><script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script><link href="../Scripts/jquery-ui-1.7.custom.css" rel="stylesheet" type="text/css" /><script src="../Scripts/jquery-ui-1.7.custom.min.js" type="text/javascript"></script>  <script type="text/javascript">$().ready(function () {$("#txtOrderTime").datepicker({ dateFormat: 'yy-mm-dd' });});</script></head><body><form id="form1" runat="server">     <div><table class="Inupttable" style=" width:900px; margin:0px auto;"><tr><td colspan="5">               <uc1:SendProTop ID="SendProTop1" runat="server" />               </td></tr><tr><td class="tdsearch"><asp:Label ID="Label1" runat="server" Text="主题:"></asp:Label><asp:TextBox ID="txtName" runat="server" Width="100px"></asp:TextBox></td><td class="tdsearch"><asp:Label ID="Label2" runat="server" Text="申请申请人:"></asp:Label><asp:TextBox ID="txtUserName" runat="server"  Width="100px"></asp:TextBox></td><td class="tdsearch"><asp:Label ID="Label11" runat="server" Text="提交时间"></asp:Label><asp:TextBox ID="txtOrderTime" runat="server"  Width="100px"></asp:TextBox></td><td class="tdsearch"><asp:Label ID="Label3" runat="server" Text="是否删除"></asp:Label><asp:DropDownList ID="ddlState" runat="server"><asp:ListItem Value="0">否</asp:ListItem><asp:ListItem Value="1">是</asp:ListItem></asp:DropDownList></td><td class="tdsearch"><asp:ImageButton ID="imgbutnSearch" Width="60" Height="22" runat="server" ImageUrl="~/Web/images/Btnsearch.gif" οnclick="imgbutnSearch_Click" /> </td></tr><tr><td colspan="6" class="bottomtd"><asp:GridView ID="GridView1" Width="100%"  runat="server"  AutoGenerateColumns="False" DataKeyNames="SendID"><Columns>                   <asp:HyperLinkField DataNavigateUrlFields="SendID,Listid" DataNavigateUrlFormatString="ToOtherAspx.aspx?id={0}&listid={1}"DataTextField="Subject" Target="MainFrame" HeaderText="主题"> <ItemStyle  Width="150px" HorizontalAlign="Center" />  <HeaderStyle Width="150px"  HorizontalAlign="Center"/></asp:HyperLinkField><asp:BoundField  DataField="AuditingSate" HeaderText="状态" HeaderStyle-HorizontalAlign="Center"/><asp:TemplateField HeaderText="订货申请人" HeaderStyle-HorizontalAlign="Center"><ItemTemplate><asp:Label ID="Label8" runat="server" Text='<%#Eval("AppUserName") %>'></asp:Label></ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle><ItemStyle HorizontalAlign="Center" /></asp:TemplateField><asp:TemplateField HeaderText="申请发货部门" HeaderStyle-HorizontalAlign="Center"><ItemTemplate><asp:Label ID="Label9" runat="server" Text='<%# Eval("Departname") %>'></asp:Label></ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle><ItemStyle HorizontalAlign="Center" />                          </asp:TemplateField><asp:TemplateField HeaderText="发货公司" HeaderStyle-HorizontalAlign="Center"><ItemTemplate><asp:Label ID="Label9" runat="server" Text='<%# Eval("OurCom") %>'></asp:Label></ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle><ItemStyle HorizontalAlign="Center" />                          </asp:TemplateField><asp:TemplateField HeaderText="订货单位" HeaderStyle-HorizontalAlign="Center"><ItemTemplate><asp:Label ID="Label9" runat="server" Text='<%# Eval("ReceiveComName") %>'></asp:Label></ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle><ItemStyle HorizontalAlign="Center" />                          </asp:TemplateField><asp:TemplateField HeaderText="订货时间" HeaderStyle-HorizontalAlign="Center"><ItemTemplate><asp:Label ID="lbortime" runat="server" Text='<%#  Convert.ToDateTime(Eval("submitTime")).ToString("yyyy-MM-dd") %>'></asp:Label></ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle><ItemStyle HorizontalAlign="Center" />                          </asp:TemplateField><asp:TemplateField HeaderText="订货总额" HeaderStyle-HorizontalAlign="Center"><ItemTemplate><asp:Label ID="lbtotal" runat="server" Text='<%# Eval("SendTotal") %>'></asp:Label></ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle><ItemStyle HorizontalAlign="Center" />                          </asp:TemplateField><asp:TemplateField HeaderText="传达人" HeaderStyle-HorizontalAlign="Center"><ItemTemplate><asp:Label ID="Label10" runat="server" Text='<%#Eval("Transmitter").ToString()%>'></asp:Label></ItemTemplate>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle><ItemStyle HorizontalAlign="Center" /></asp:TemplateField> <asp:TemplateField HeaderText="" HeaderStyle-HorizontalAlign="Center"><ItemTemplate><a href="SendGoodsShow.aspx?taskid=<%#Eval("SendID") %>&listid=<%#Eval("Listid")%>">查看详细</a></ItemTemplate><HeaderStyle HorizontalAlign="Center"></HeaderStyle><ItemStyle HorizontalAlign="Center" /></asp:TemplateField>                </Columns></asp:GridView></td></tr><tr><td  colspan="5"><webdiyer:AspNetPager ID="AspNetPager1" runat="server"    CssClass="paginator" CurrentPageButtonClass="cpb"onpagechanged="AspNetPager1_PageChanged" FirstPageText="第一页" LastPageText="末页" NextPageText="下一页" PrevPageText="上一页"></webdiyer:AspNetPager></td></tr><tr><td  colspan="5"  style=" text-align:center;"><asp:Button ID="Button1" runat="server" Text="报表导出" οnclick="Button1_Click" Width="100px" CssClass="btnorange"/></td></tr></table></div></form>
</body>
</html>

后台代码:

public partial class SendGoodsListShow: BasePage{public static int pageindex = 0;public static int pagesize = 10;public static string condition = "";protected void Page_Load(object sender, EventArgs e){//Session["Userid"] = "29";if (Session["Userid"] == null){Response.Redirect("../../web/UserLogin.aspx");}if (!IsPostBack){getallBioCRMContractList();}}/// <summary>/// 查询所有员工信息/// </summary>private void getallBioCRMContractList(){//如果有发货管理权限(特许权限)的人员可以查看所有表单 if (SqlComm.getUserRightsByUserId(Session["Userid"].ToString()).Contains(",51,")){this.AspNetPager1.RecordCount = SqlComm.getDataCountByCondition("dbo.View_SendAppInfoShowList", condition);this.AspNetPager1.PageSize = pagesize;this.GridView1.DataSource = SqlComm.getDataByPageIndex("dbo.View_SendAppInfoShowList", "*", "SendId", condition, pageindex, pagesize);this.GridView1.DataBind();}else if (Web.UserLogin.user.RoleId == ((int)RoseEmun.DepartMentManager)){condition = condition + " and DepartMentID=" + Web.UserLogin.user.DepartmentId;this.AspNetPager1.RecordCount = SqlComm.getDataCountByCondition("dbo.View_SendAppInfoShowList", condition);this.AspNetPager1.PageSize = pagesize;this.GridView1.DataSource = SqlComm.getDataByPageIndex("dbo.View_SendAppInfoShowList", "*", "SendId", condition, pageindex, pagesize);this.GridView1.DataBind();}else //员工只能看自己的购进单{condition = condition + " and AppUserId=" + Session["Userid"].ToString();this.AspNetPager1.RecordCount = SqlComm.getDataCountByCondition("dbo.View_SendAppInfoShowList", condition);this.AspNetPager1.PageSize = pagesize;this.GridView1.DataSource = SqlComm.getDataByPageIndex("dbo.View_SendAppInfoShowList", "*", "SendId", condition, pageindex, pagesize);this.GridView1.DataBind();}for (int i = 0; i < GridView1.Rows.Count; i++){switch (GridView1.Rows[i].Cells[1].Text){case "0":GridView1.Rows[i].Cells[1].Text = "待审核";GridView1.Rows[i].Cells[1].ForeColor = System.Drawing.Color.Green;break;case "2":GridView1.Rows[i].Cells[1].Text = "执行中";GridView1.Rows[i].Cells[1].ForeColor = System.Drawing.Color.Orange;break;case "3":GridView1.Rows[i].Cells[1].Text = "已完成";GridView1.Rows[i].Cells[1].ForeColor = System.Drawing.Color.Green;break;default:GridView1.Rows[i].Cells[1].Text = "出现错误";break;}}}protected void AspNetPager1_PageChanged(object sender, EventArgs e){pageindex = this.AspNetPager1.CurrentPageIndex - 1;getallBioCRMContractList();}protected void imgbutnSearch_Click(object sender, ImageClickEventArgs e){pageindex = 0;condition = "";if (txtName.Text.Trim() != null && this.txtName.Text.Trim().Length != 0){condition = condition + " and Subject like '" + txtName.Text + "%'";}if (this.txtUserName.Text.Trim() != null && this.txtUserName.Text.Trim().Length != 0){condition = condition + " and AppUserName like '" + txtUserName.Text + "%'";}if (this.ddlState.SelectedValue == "1"){condition = condition + " and DeleteSate ='True'";}else{condition = condition + " and DeleteSate ='False'";}if (this.txtOrderTime.Text.Trim() != null && this.txtOrderTime.Text.Trim().Length != 0){condition = condition + " and (submitTime>= '" + Convert.ToDateTime(this.txtOrderTime.Text) + "' and  submitTime<'" + Convert.ToDateTime(this.txtOrderTime.Text).AddDays(1) + "')";}getallBioCRMContractList();}protected void Button1_Click(object sender, EventArgs e){Response.Redirect("../SendGoods/BaoBiao/SendProInfoOutput.aspx");}}

权限的判断:

public partial class ToOtherAspx :BasePage{protected void Page_Load(object sender, EventArgs e){if (Request.QueryString["id"] == null || Request.QueryString["listid"] == null){Response.Redirect("SendGoodsListShow.aspx");return;}string id = Request.QueryString["id"].ToString();string listid = Request.QueryString["listid"].ToString();System.Data.DataTable dt = CommTool.SqlComm.GetDataByCondition("dbo.TaskListRecord", "ListID,TaskID,TaskTableID,Accepter,AuditingSate", " ListID=" + listid).Tables[0];if (dt.Rows.Count == 0){Response.Redirect("SendGoodsListShow.aspx");return;}if (dt.Rows[0]["Accepter"].ToString() != Session["Userid"].ToString()){Response.Redirect("SendGoodsShow.aspx?taskid=" + id + "&listid=" + listid);return;}else{if (dt.Rows[0]["AuditingSate"].ToString() == "0"){Response.Redirect("SendGoodsEdit.aspx?taskid=" + id + "&listid=" + listid);return;}else if (dt.Rows[0]["AuditingSate"].ToString() == "2"){Response.Redirect("SendGoodsRun.aspx?taskid=" + id + "&listid=" + listid);return;}else if (dt.Rows[0]["AuditingSate"].ToString() == "3"){Response.Redirect("SendGoodsShow.aspx?taskid=" + id + "&listid=" + listid);return;}else{Response.Redirect("SendGoodsListShow.aspx");return;}}}}

水晶报表打印:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SendProInfoOutput.aspx.cs" Inherits="BioErpWeb.SendGoods.BaoBiao.SendProInfoOutput" %><%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"><title></title>
</head>
<body><form id="form1" runat="server"><div><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager></div><rsweb:ReportViewer ID="ReportViewer1" Width="100%" runat="server" Font-Names="Verdana" Font-Size="8pt" InteractiveDeviceInfos="(集合)" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt"><LocalReport ReportPath="SendGoods\BaoBiao\Report1.rdlc"><DataSources><rsweb:ReportDataSource DataSourceId="SqlDataSource1" Name="DataSet1" /></DataSources></LocalReport></rsweb:ReportViewer><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:BioErpDbConnectionString %>" SelectCommand="SELECT * FROM [View_SendAppInfoShowList]"></asp:SqlDataSource></form>
</body>
</html>

出库单打印:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChuKuPrint.aspx.cs" Inherits="BioErpWeb.Print.ChuKuPrint" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1"  runat="server"><title>产品出库(验收、通知)单打印</title><link href="../Styles/Print.css" rel="stylesheet" type="text/css" /><link href="../css/Printaround.css" rel="stylesheet" type="text/css" /><link href="../css/printbelow.css" rel="stylesheet" type="text/css" /><link href="../css/printleft.css" rel="stylesheet" type="text/css" /><link rel="stylesheet" type="text/css" href="../css/printright.css" /><link href="../css/printrightdan.css" rel="stylesheet" type="text/css" /></head><body><form id="form1" runat="server" style="margin:0; padding:0;" ><table><%//产品发货单基本信息(1条)System.Data.DataSet ds = GetDataSet();//产品批号信息(多条)System.Data.DataSet ds1 = this.GetProBatchsDataSet();int mypage = 0;if ((ds1.Tables[0].Rows.Count) % 5 == 0){mypage = (int)((ds1.Tables[0].Rows.Count) / 5);}else{mypage = ((int)((ds1.Tables[0].Rows.Count) / 5)) + 1;}decimal mon = 0;for (int n = 0; n < ds1.Tables[0].Rows.Count; n++){mon += Convert.ToDecimal(ds1.Tables[0].Rows[n]["ProBatchPriceTotal"].ToString().Trim());}//Convert.ToDecimal(mon);int x = ds1.Tables[0].Rows.Count;//绑定固定的联系人或者制单人名for (int i = 0; i < x;){%><tr><td><table style="height: 310px; width: 210mm;" align="left" border="0" cellpadding="0" cellspacing="0"><tr><td height="24mm" width="223mm">             <table  border="0" cellpadding="0" cellspacing="0" style="height: 20mm; width: 210mm;" align="left"><tr><td colspan="6" style="font-size: larger; font-weight: bold" align="center" class="style17"><font size="4"><%=ds.Tables[0].Rows[0]["OurCom"]%>产品出库(验收、通知)单</font></td></tr><tr><td align="right" width="75px" height="8mm" ><font style="font-family: 宋体; font-size:12px;">发货单位:</font></td><td align="left" width="254px"><font style="font-family: 宋体; font-size:12px;"><%=ds.Tables[0].Rows[0]["OurCom"]%></font></td><td align="right" width="75px" ><font style="font-family: 宋体; font-size:12px;">联系人:</font></td><td align="left" width="231px" ><font style="font-family: 宋体; font-size:12px;"><%=ds.Tables[0].Rows[0]["RealUser"]%></font></td><td align="right" width="75px" ><font style="font-family: 宋体; font-size:12px;">系统单号:</font></td><td align="left" ><font style="font-family: 宋体; font-size:12px;"><%=DateTime.Now.ToString("yyyyMMddhhmmss")+ds.Tables[0].Rows[0]["SendID"]%></font></td></tr><tr><td align="right" height="8mm" ><font style="font-family: 宋体; font-size:12px;">收货单位:</font></td><td align="left" width="254px" ><%=ds.Tables[0].Rows[0]["ReceiveComName"]%></td><td align="right" ><font style="font-family: 宋体; font-size:12px;">发货时间:</font></td><td align="left" width="231px"><font style="font-family: 宋体; font-size:12px;"><%=Convert.ToDateTime(ds.Tables[0].Rows[0]["sendDate"]).ToString("yyyy-MM-dd")%></font></td><td align="right"><font style="font-family: 宋体; font-size:12px;">自定义单号:</font></td><td align="left"></td></tr></table>                     </td></tr><tr><td align="left" valign="top" height="43mm"><table border="0" cellpadding="0" cellspacing="0"><tr><td align="left" valign="top" height="43mm" class="style8"><table align="left" border="0" cellpadding="0" cellspacing="0"  class="Prinaround"><tr align="center" valign="middle" style="height: 6mm"><td width="40px" class="Printright" height="6mm"><font style="font-family: 宋体; font-size:12px;">   </font></td><td class="style16"><font style="font-family: 宋体; font-size:12px;">商品名称</font></td><td class="style14"><font style="font-family: 宋体; font-size:12px;">规 格</font></td><td class="style22"><font style="font-family: 宋体; font-size:12px;">生产企业</font></td><td class="style23"><font style="font-family: 宋体; font-size:12px;">单位</font></td><td class="style10"><font style="font-family: 宋体; font-size:12px;">数量</font></td><td class="style28"><font style="font-family: 宋体; font-size:12px;">单价</font></td>   <td class="style18"><font style="font-family: 宋体; font-size:12px;">金额</font></td><td class="style29"><font style="font-family: 宋体; font-size:12px;">生产日期</font></td><td class="style26"><font style="font-family: 宋体; font-size:12px;">批号</font></td><td class="style27"><font style="font-family: 宋体; font-size:12px;">有效期</font></td>  </tr>         <%decimal currentmoney = 0;for (int j = 0; j < 5 && i < x; j++, i++){currentmoney += Convert.ToDecimal(ds1.Tables[0].Rows[i]["ProBatchPriceTotal"]);%>                      <tr align="center" valign="middle" style="height: 6mm"><td class="Printright" height="6mm"><table><tr><td> <font style="font-family: 宋体; font-size:12px;"> <%=i+1 %></font></td></tr></table></td><td class="style16"><font style="font-family: 宋体; font-size:12px;"><span><%=ds1.Tables[0].Rows[i]["ProName"]%> </span></font></td><td class="style14"><font style="font-family: 宋体; font-size:11px;"><span><%=ds1.Tables[0].Rows[i]["Spec"]%></span></font></td><td class="style22"><font style="font-family: 宋体; font-size:11px;"><span><%=ds1.Tables[0].Rows[i]["MadeEnterprise"]%></span></font></td> <td class="style23"><font style="font-family: 宋体; font-size:11px;"><span><%=ds1.Tables[0].Rows[i]["Unit"]%></span></font></td><td class="style10"><font style="font-family: 宋体; font-size:12px;"><span><%=ds1.Tables[0].Rows[i]["proCount"]%></span></font></td>    <td class="style28"><font style="font-family: 宋体; font-size:12px;"><span><%=Convert.ToDecimal(ds1.Tables[0].Rows[i]["ProPrice"]).ToString("0.00")%></span></font></td><td class="style18"><font style="font-family: 宋体; font-size:12px;"><span><%=Convert.ToDecimal(ds1.Tables[0].Rows[i]["ProBatchPriceTotal"]).ToString("0.00")%></span></font></td><td class="style29"><font style="font-family: 宋体; font-size:12px;"><span><%=Convert.ToDateTime(ds1.Tables[0].Rows[i]["makeDate"]).ToString("yyyy-MM-dd")%></span></font></td><td class="style26"><font style="font-family: 宋体; font-size:12px;"><span><%=ds1.Tables[0].Rows[i]["batchNum"]%></span></font></td><td class="style27"><font style="font-family: 宋体; font-size:12px;"><span><%=Convert.ToDateTime(ds1.Tables[0].Rows[i]["expirationDate"]).ToString("yyyy-MM-dd")%></span></font></td></tr><%}%></table></td></tr></table>                 </td></tr><tr><td height="18mm" valign="top">  <table  border="0" cellpadding="0" cellspacing="0" style="height: 21mm; width: 770px;"><tr><td colspan="2" class="style20"><font style="font-family:font-family: 宋体; font-size:12px;">本单入库金额小计:<%=CommTool.StringHandler.CmycurD(currentmoney)+"(¥"+currentmoney.ToString("0.00")+")" %></font></td><td colspan="5" class="style20" ><font style="font-family: 宋体; font-size:12px;">整单入库金额合计:<%=CommTool.StringHandler.CmycurD(mon)+"(¥"+mon.ToString("0.00")+")"%></font></td></tr>                          <tr><td class="style21" ><font style="font-family: 宋体; font-size:12px;">单位:合格</font></td><td class="style21"><font style="font-family: 宋体; font-size:12px;">发货人:<input id="Text3" maxlength="6" style="border-width:0px; border-color:Transparent ; width:50px; font-family:宋体 ; font-size:12px;" value='<%=ds.Tables[0].Rows[0]["StockUser"]%>' /></font></td><td class="style21"><font style="font-family: 宋体; font-size:12px;">质量审核人:<input id="senduser" maxlength="6" style="border-width:0px; border-color:Transparent ; width:50px; font-family:宋体 ; font-size:12px;"  value="" /></font></td><td class="style21"><font style="font-family: 宋体; font-size:12px;">送货人:<input id="stockuser" maxlength="6" style="border-width:0px; border-color:Transparent ; width:50px; font-family:宋体 ; font-size:12px;"  value='<%=ds.Tables[0].Rows[0]["PostUnit"]%>'/></font></td>                              <td colspan="2" class="style21"><font style="font-family: 宋体; font-size:12px;">收货人:<input id="appuser" name="username" maxlength="6" style="border-width:0px; border-color:Transparent ; width:50px; font-family:宋体 ; font-size:12px;"  value='' /></font>                              </td></tr><tr><td height="6mm"><font style="font-family: 宋体; font-size:12px;">白  联:存根联</font></td><td><font style="font-family: 宋体; font-size:12px;">红  联:财务联</font></td><td><font style="font-family: 宋体; font-size:12px;">绿  联:发货联</font></td><td><font style="font-family: 宋体; font-size:12px;">蓝  联:收货联</font></td><td><font style="font-family: 宋体; font-size:12px;">黄  联:随货</font></td><td><font style="font-family: 宋体; font-size:12px;">制单人:<input ID="Text4" maxlength="6" name="userman"  οnchange="setTbConSame2(this)" style="border-width:0px; border-color:Transparent ; width:50px; font-family:宋体 ; font-size:12px;"  value="<%=ds.Tables[0].Rows[0]["AppUserName"].ToString() %>" /></font></td><td><font style="font-family: 宋体; font-size:12px;">P.<%=((int)((i - 1) / 5)) + 1%>/<%=mypage%></font></td></tr></table></td></tr>
</table> <%}%></td></tr></table>
</form>
</body>
</html>

后台的代码:

 public partial class ChuKuPrint: System.Web.UI.Page{protected void Page_Load(object sender, EventArgs e){if (Request.QueryString["Sendid"] != null){}else{Response.Redirect("SendGoodsShow.aspx");return;}}/// <summary>/// 获取发货申请表单基本信息/// </summary>/// <returns></returns>public DataSet GetDataSet(){string id = Request.QueryString["Sendid"].ToString();DataSet ds = SqlComm.GetDataByCondition("dbo.View_SendAppInfoShowList", "*", "Sendid=" + id);return ds;}/// <summary>/// 发货产品批号信息/// </summary>/// <returns>DataSet</returns>public DataSet GetProBatchsDataSet(){string id = Request.QueryString["Sendid"].ToString();DataSet ds = SqlComm.GetDataByCondition("dbo.View_SendGoodsBatchInfoPrint", "*", "Sendid=" + id);return ds;}}

打印的视图:

CREATE VIEW [dbo].[View_SendGoodsBatchInfoPrint]
AS
SELECTProName,Spec=dbo.FN_getProSpecbyProID(ProID),MadeEnterprise=dbo.FN_getMadeEnterpriseByProID(ProID),Unit=dbo.FN_getProUnitbyProID(ProID),ProBatchID,SendProID,batchNum,boxNum,proCount,ProPrice,ProBatchPriceTotal=proCount*ProPrice,ProStockID,stockDate,stockID,expirationDate,makeDate,SendID,ProIDFROMdbo.View_SendGoodsProBatchInfo

发货的产品批号的视图:

CREATE VIEW [dbo].[View_SendGoodsProBatchInfo]
AS
SELECT a.*,
b.ProBatchID,
b.batchNum,
b.boxNum,
b.proCount AS BatchProCount,
b.ProStockID,
b.stockDate,b.expirationDate,
b.makeDate,
b.stockID,
b.isprinted,ProName=dbo.FN_getProNameByProID(a.ProID)FROM dbo.BioSendGoodsPro  AS a INNER JOIN dbo.BioSendProBatch AS b
ON b.SendProID = a.SendProID

转载于:https://www.cnblogs.com/sunliyuan/p/7706832.html

ERP出库审核业务(四十四)相关推荐

  1. c语言标准库详解(十四):时间函数time.h

    c语言标准库详解(十四):时间函数<time.h> 概述 头文件<time.h>中声明了一些处理日期与时间的类型和函数.其中的一些函数用于处理当地时间,因为时区等原因,当地时间 ...

  2. 【Visual C++】游戏开发笔记四十四 浅墨DirectX教程十二 网格模型和X文件使用面面观

    本系列文章由zhmxy555(毛星云)编写,转载请注明出处. 文章链接: http://blog.csdn.net/zhmxy555/article/details/8586540 作者:毛星云(浅墨 ...

  3. 【Visual C++】游戏开发笔记四十四 浅墨DirectX教程十二 网格模型和X文件使用面面观...

    本系列文章由zhmxy555(毛星云)编写,转载请注明出处. 文章链接:http://blog.csdn.net/zhmxy555/article/details/8586540 作者:毛星云(浅墨) ...

  4. NeHe OpenGL教程 第四十四课:3D光晕

    转自[翻译]NeHe OpenGL 教程 前言 声明,此 NeHe OpenGL教程系列文章由51博客yarin翻译(2010-08-19),本博客为转载并稍加整理与修改.对NeHe的OpenGL管线 ...

  5. NeHe OpenGL第四十四课:3D光晕

    NeHe OpenGL第四十四课:3D光晕 3D 光晕 当镜头对准太阳的时候就会出现这种效果,模拟它非常的简单,一点数学和纹理贴图就够了.好好看看吧.   大家好,欢迎来到新的一课,在这一课中我们将扩 ...

  6. 【正点原子Linux连载】第四十四章 设备树下的LED驱动实验 -摘自【正点原子】I.MX6U嵌入式Linux驱动开发指南V1.0

    1)实验平台:正点原子阿尔法Linux开发板 2)平台购买地址:https://item.taobao.com/item.htm?id=603672744434 2)全套实验源码+手册+视频下载地址: ...

  7. 1977-2021 高考四十四年,哪一张照片是属于你的记忆(珍贵!)

    1977-2019 四十四年高考 一个国家命运的拐点 千百万个人生的转折 1977 四十四年     四十四图 1977年12月10日的高考, 是中国历史上唯一的一次冬季高考. 这一天,570多万从农 ...

  8. 如何选择适合你的兴趣爱好(四十四),武当

    围城网的摇摇今天给大家带来了"如何选择适合你的兴趣爱好"系列专辑的第四十四讲--武当.武当功夫由张三丰祖师始创,集百家之长,融道家养身为一体,以阐功夫真理,扬长道教文化为宗旨.武当 ...

  9. 数据库管理-第四十四期 数据库的物理隔离(20221118)

    数据库管理 2022-11-18 第四十四期 数据库的物理隔离 1 背景 2 Oracle 3 分布式 4 终极大招 总结 第四十四期 数据库的物理隔离 这周干了些啥?除了正常日常工作和协调部署各种新 ...

最新文章

  1. .NET中的IO操作基础介绍
  2. python学习-类(global、nonlocal、继承、多态)
  3. 中文电子病例命名实体识别项目
  4. 一个含n个顶点和e条弧的有向图以邻接矩阵表示法为存储结构,则计算该有向图中某个顶点出度的时间复杂度为
  5. Java成神之路[转]
  6. 简单粗暴 我再送一波教程资料,Vue、大数据、AI都有
  7. Android NDK调试出错Unknown Application ABI, Unable to detect application ABI#39;s的解决方式...
  8. (94)Verilog HDL系统函数和任务:$ferror
  9. apache 的http代理出错 502 Proxy Error
  10. 学习总结-《父与子的编程之旅》chapter 17
  11. c#html表格样式大全,漂亮的表格样式(使用CSS样式表控制表格样式)
  12. matlab直方图匹配,直方图匹配 histogram match
  13. 电压跟随器的特点、作用和应用举例
  14. WebSocket 双端实践(iOS/ Golang)
  15. 二层、三层、四层交换机的区别
  16. sparse coding
  17. 一叶知秋,一个 LED 就能入门 Linux 内核
  18. 使用数据库进行用户身份认证
  19. 白菜个人导航页2.0
  20. 基于激光雷达增强的三维重建

热门文章

  1. Redis实战 - 11 Redis GEO 实现附近的人功能
  2. JavaScript里面的“类”
  3. ssh mysql jsp码头船只出行及配套货柜码放管理系统的设计与实现
  4. CSS清除浮动的方法
  5. [附源码]java毕业设计小说网站的设计与实现1
  6. 搜狗输入法导入本地txt为个人词库
  7. Android Intents Kotlin 教程
  8. Ubuntu虚拟机重启发现用时过长 stop job is running for Unattended Upgrades Shutdown (10s / 30 min)
  9. 牛客网SQL 进阶篇刷题
  10. layui 带按钮的搜索框_layui table可输入关键字搜索下拉框(select)