结束表单流程的代码:

   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
BEGIN
DECLARE @TotalMoney money SELECT @TotalMoney=sum(ProPrice*ProCount) FROM dbo.BioSendGoodsPro
WHERE SendID=@SendID
RETURN @TotalMoney END

创建查询视图:

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" onclick="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="报表导出"
onclick="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" onchange="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
SELECT
ProName,
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,
ProID FROM
dbo.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

ERP出库审核业务(四十四)的更多相关文章

  1. 孤荷凌寒自学python第四十四天Python操作 数据库之准备工作

     孤荷凌寒自学python第四十四天Python操作数据库之准备工作 (完整学习过程屏幕记录视频地址在文末,手写笔记在文末) 今天非常激动地开始接触Python的数据库操作的学习了,数据库是系统化设计 ...

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

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

  3. 网站开发进阶(四十四)input type="submit" 和"button"的区别

    网站开发进阶(四十四)input type="submit" 和"button"的区别   在一个页面上画一个按钮,有四种办法: 这就是一个按钮.如果你不写ja ...

  4. Gradle 1.12用户指南翻译——第四十四章. 分发插件

    本文由CSDN博客貌似掉线翻译,其他章节的翻译请参见: http://blog.csdn.net/column/details/gradle-translation.html 翻译项目请关注Githu ...

  5. SQL注入之Sqli-labs系列第四十一关(基于堆叠注入的盲注)和四十二关四十三关四十四关四十五关

    0x1普通测试方式 (1)输入and1=1和and1=2测试,返回错误,证明存在注入 (2)union select联合查询 (3)查询表名 (4)其他 payload: ,( ,( 0x2 堆叠注入 ...

  6. “全栈2019”Java第四十四章:继承

    难度 初级 学习时间 10分钟 适合人群 零基础 开发语言 Java 开发环境 JDK v11 IntelliJ IDEA v2018.3 文章原文链接 "全栈2019"Java第 ...

  7. Android项目实战(四十四):Zxing二维码切换横屏扫描

    原文:Android项目实战(四十四):Zxing二维码切换横屏扫描 Demo链接 默认是竖屏扫描,但是当我们在清单文件中配置横屏显示的时候: <activity android:name=&q ...

  8. 第四十四个知识点:在ECC密码学方案中,描述一些基本的防御方法

    第四十四个知识点:在ECC密码学方案中,描述一些基本的防御方法 原文地址:http://bristolcrypto.blogspot.com/2015/08/52-things-number-44-d ...

  9. Spark(四十四):使用Java调用spark-submit.sh(支持 --deploy-mode client和cluster两种方式)并获取applicationId

    之前也介绍过使用yarn api来submit spark任务,通过提交接口返回applicationId的用法,具体参考<Spark2.3(四十):如何使用java通过yarn api调度sp ...

随机推荐

  1. 《springCloud系列》——Eureka 进行服务治理

    整理一下: @EnableEurekaServer 注册中心 @EnableDiscoveryClient 提供服务 @EnableFeignClients 消费者(Feign特有的,而且他自带断路器 ...

  2. FZU - 1688 Binary land

    题目链接  Problem 1688 Binary land Accept: 72    Submit: 171Time Limit: 1000 mSec    Memory Limit : 3276 ...

  3. 八皇后问题动态演示_Qt5实现

    //核心代码如下 //Queen--放置皇后 #include "queue.h" queue::queue() { *; ; this->board = new bool[ ...

  4. .NET面试题系列(十一)WinDbg、Perfmon

    WinDbg 资料 https://www.cnblogs.com/sheng-jie/p/9503650.html https://www.cnblogs.com/yudongdong/p/9701 ...

  5. Hibernate非主键一对多关联。

    Unit表 id,code User表 id,ucode ...@ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name="ucode" ...

  6. 破解WEP工具wesside-ng

    1.关于wesside-ng wesside-ng是一款自动化的WEP破解工具,该工具采用了多种WEP加密破解技术.它首先会自动明确目标无线网络,然后尝试与之相关联,在获得PRGA(伪随机生成算法)异 ...

  7. luogu P2051 [AHOI2009]中国象棋

    统计方案,果断 dp 注意到合法方案即为每一行,每一列的棋子数不超过2 设\(f_{i,j,k}\)表示放到第\(i\)行,有\(j\)列可以放2个,有\(k\)列可以放1个的方案 然后就随便讨论一下 ...

  8. CF448C Painting Fence (贪心分治)

    题面 \(solution:\) 一道蛮水的分治题,但思想很不错(虽然我还是非常天真的以为是积木大赛原题,并且居然还有30分) 看到这个题目,根据贪心的一贯风格,我们肯定能想到将整个栅栏的下面某部分直 ...

  9. 关于apache 开启 ssl https 支持 TLS1.2 的些事

    项目背景 需要搭建一个小程序的服务器,当然要使用https协议服务器windows service 2012 r2,后台语言是php,服务集成环境装的是appserv2.5 ,apache2.2证书申 ...

  10. python函数——形参中的:*args和**kwargs

    python函数——形参中的:*args和**kwargs   多个实参,放到一个元组里面,以*开头,可以传多个参数:**是形参中按照关键字传值把多余的传值以字典的方式呈现 *args:(表示的就是将 ...