| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 692 人关注过本帖
标题:关于打印的问题
取消只看楼主 加入收藏
huangcui2003
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2006-8-4
收藏
 问题点数:0 回复次数:2 
关于打印的问题

麻烦大家帮我检查一下下面程序有什么错误,就是打印那个模块不能实现


using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Text;
using Mrp.Class;
using Mrp.Include;


namespace Mrp.OrderManage
{
/// <summary>
/// Index 的摘要说明。
/// </summary>
public class ProducePlanView : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label lblErrorMessage;
protected System.Web.UI.WebControls.DataGrid dgList;
protected System.Web.UI.WebControls.DropDownList ddlCustomer;
protected System.Web.UI.WebControls.LinkButton lnkbtnSave;
protected System.Web.UI.WebControls.LinkButton lnkbtnErase;
protected System.Web.UI.WebControls.TextBox txtDestination;
protected System.Web.UI.WebControls.LinkButton lnkbtnNewDetail;
protected System.Web.UI.WebControls.RequiredFieldValidator rfvDestination;
protected System.Web.UI.WebControls.Button btnBack;
protected int UserID;
protected StringBuilder ErrorMessage = new StringBuilder();
protected ProducePlan oInfo = new ProducePlan();
protected DataSet dsList;
protected System.Web.UI.WebControls.TextBox txtProducePlanHeadID;
protected System.Web.UI.WebControls.TextBox txtProducePlanNo;
protected System.Web.UI.WebControls.TextBox txtOverCIQDate;
protected System.Web.UI.WebControls.RequiredFieldValidator rfvOverCIQDate;
protected System.Web.UI.WebControls.TextBox txtGetOrderDate;
protected System.Web.UI.WebControls.TextBox txtMaterielDate;
protected System.Web.UI.WebControls.TextBox txtShipmentDate;
protected System.Web.UI.WebControls.TextBox txtProduceDate;
protected System.Web.UI.WebControls.TextBox txtInStorageDate;
protected System.Web.UI.WebControls.CheckBoxList chklProduceDept;
protected System.Web.UI.WebControls.RequiredFieldValidator rfvGetOrderDate;
protected System.Web.UI.WebControls.RequiredFieldValidator rfvMaterielDate;
protected System.Web.UI.WebControls.RequiredFieldValidator rfvShipmentDate;
protected System.Web.UI.WebControls.RequiredFieldValidator rfvProduceDate;
protected System.Web.UI.WebControls.RequiredFieldValidator rfvInStorageDate;
protected System.Web.UI.WebControls.Image imgMark;
protected System.Web.UI.WebControls.TextBox txtComment;
protected System.Web.UI.WebControls.TextBox txtRemark;
protected System.Web.UI.WebControls.LinkButton lnkbtnDesire;
protected System.Web.UI.HtmlControls.HtmlTable tblHead;
protected System.Web.UI.WebControls.LinkButton lnkbtnEdit;
protected System.Web.UI.WebControls.LinkButton lnkbtnCancel;
protected System.Web.UI.WebControls.Label lblFlowFlag;
protected System.Web.UI.WebControls.LinkButton lnkbtnPrint;
protected CapPaper oCapPaper = new CapPaper();

private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
if (! IsPostBack)
{
lnkbtnErase.Attributes.Add("onclick", "return confirmDialog()");
ShowCustomerList();
if (Request["ProducePlanHeadID"] != null)
{
lnkbtnCancel.Enabled = false;
lnkbtnSave.Enabled = false;
SetEnableControlHeadTable(false);
txtProducePlanHeadID.Text = Request["ProducePlanHeadID"].ToString();
oInfo.LoadInfo(Convert.ToInt32(txtProducePlanHeadID.Text));
txtProducePlanNo.Text = oInfo.ProducePlanNo;
txtOverCIQDate.Text = Common.DateFormatShort(oInfo.OverCIQDate);
ddlCustomer.SelectedValue = oInfo.CustomerID.ToString();
txtDestination.Text = oInfo.Destination;
txtGetOrderDate.Text = Common.DateFormatShort(oInfo.GetOrderDate);
txtMaterielDate.Text = Common.DateFormatShort(oInfo.MaterielDate);
txtProduceDate.Text = Common.DateFormatShort(oInfo.ProduceDate);
txtInStorageDate.Text = Common.DateFormatShort(oInfo.InStorageDate);
txtShipmentDate.Text = Common.DateFormatShort(oInfo.ShipmentDate);
txtRemark.Text = oInfo.Comment;
lblFlowFlag.Text = oInfo.FlowFlag.ToString();
string ProduceDept = oInfo.ProduceDept;
if (ProduceDept.IndexOf("T") > -1)
{
chklProduceDept.Items[0].Selected = true;
}
if (ProduceDept.IndexOf("M") > -1)
{
chklProduceDept.Items[1].Selected = true;
}
if (oInfo.MarkImageURL != "")
{
imgMark.Visible = true;
imgMark.ImageUrl = oInfo.MarkImageURL;
}
lnkbtnNewDetail.Attributes.Add("onclick", "return showDialog('" + txtProducePlanHeadID.Text + "')");
}
else
{
lnkbtnEdit.Enabled = false;
lnkbtnCancel.Enabled = false;
lnkbtnErase.Enabled = false;
lnkbtnDesire.Enabled = false;
lnkbtnPrint.Enabled = false;
lnkbtnNewDetail.Enabled = false;
}
GetdsList("true");
BindDgList();
ShowErrorMessage();
}
//Role Config
PrivilegeContorl();
//Send Parameters to CommonDialog
StringBuilder sqlString = new StringBuilder();
sqlString.Append("SELECT");
sqlString.Append(" D.OrderHeadID");
sqlString.Append(", H.OrderNo");
sqlString.Append(", D.OrderDetailID");
sqlString.Append(", D.ProductID");
sqlString.Append(", D.ProductName AS 货号");
sqlString.Append(", D.Surface AS 表面处理");
sqlString.Append(", D.PCS AS 包装方式");
sqlString.Append(", D.Qty AS 数量");
sqlString.Append(", D.PlanQty AS 已计划数量");
sqlString.Append(", D.Qty - D.PlanQty AS 剩余数量");
sqlString.Append(" FROM OrderDetail D");
sqlString.Append(" INNER JOIN OrderHead H ON H.OrderHeadID = D.OrderHeadID");
sqlString.Append(" WHERE H.IsValid = 1");
sqlString.Append(" AND H.FLowFlag = 10");
sqlString.Append(" AND Convert(nvarchar(10), H.SignDate, 120) = '" + txtOverCIQDate.Text + "'");
sqlString.Append(" AND H.CustomerID = " + Convert.ToInt32(ddlCustomer.SelectedValue));
sqlString.Append(" AND H.Destination = '" + Common.ToSQLString(txtDestination.Text) + "'");
sqlString.Append(" AND D.Qty > D.PlanQty");
StringBuilder queryField = new StringBuilder();
queryField.Append("货号\\\\ProductName");
int SelectCount = 0;
string NotVisibleColumns = "1, 2, 3, 4";
Session["CommonDialogArguments"] = CommonDialog.SetParameterSession(sqlString.ToString(), queryField.ToString(), SelectCount, NotVisibleColumns);
}

#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.lnkbtnEdit.Click += new System.EventHandler(this.lnkbtnEdit_Click);
this.lnkbtnCancel.Click += new System.EventHandler(this.lnkbtnCancel_Click);
this.lnkbtnSave.Click += new System.EventHandler(this.lnkbtnSave_Click);
this.lnkbtnErase.Click += new System.EventHandler(this.lnkbtnErase_Click);
this.lnkbtnDesire.Click += new System.EventHandler(this.lnkbtnDesire_Click);
this.lnkbtnPrint.Click += new System.EventHandler(this.lnkbtnPrint_Click);
this.lnkbtnNewDetail.Click += new System.EventHandler(this.lnkbtnNewDetail_Click);
this.dgList.CancelCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.dgList_CancelCommand);
this.dgList.EditCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.dgList_EditCommand);
this.dgList.UpdateCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.dgList_UpdateCommand);
this.dgList.DeleteCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.dgList_DeleteCommand);
this.dgList.ItemDataBound += new System.Web.UI.WebControls.DataGridItemEventHandler(this.dgList_ItemDataBound);

搜索更多相关主题的帖子: using System Mrp Web 打印 
2006-08-04 15:26
huangcui2003
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2006-8-4
收藏
得分:0 

this.btnBack.Click += new System.EventHandler(this.btnBack_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void ShowErrorMessage()
{
ErrorMessage.Append(oInfo.ErrorMessage);
lblErrorMessage.Text = ErrorMessage.ToString();
}

private void SetEnableControlHeadTable(bool EnableFlag)
{
txtOverCIQDate.Enabled = EnableFlag;
txtOverCIQDate.CssClass = txtOverCIQDate.Enabled ? "txtBorder" : "txtDisable";
ddlCustomer.Enabled = EnableFlag;
txtDestination.Enabled = EnableFlag;
txtDestination.CssClass = txtDestination.Enabled ? "txtBorder" : "txtDisable";
txtGetOrderDate.Enabled = EnableFlag;
txtGetOrderDate.CssClass = txtGetOrderDate.Enabled ? "txtBorder" : "txtDisable";
txtMaterielDate.Enabled = EnableFlag;
txtMaterielDate.CssClass = txtMaterielDate.Enabled ? "txtBorder" : "txtDisable";
txtInStorageDate.Enabled = EnableFlag;
txtInStorageDate.CssClass = txtInStorageDate.Enabled ? "txtBorder" : "txtDisable";
chklProduceDept.Enabled = EnableFlag;
txtProduceDate.Enabled = EnableFlag;
txtProduceDate.CssClass = txtProduceDate.Enabled ? "txtBorder" : "txtDisable";
txtShipmentDate.Enabled = EnableFlag;
txtShipmentDate.CssClass = txtShipmentDate.Enabled ? "txtBorder" : "txtDisable";
txtRemark.Enabled = EnableFlag;
txtRemark.CssClass = txtRemark.Enabled ? "areaBorder" : "areaDisable";
}

private void ShowCustomerList()
{
Customer oCustomer = new Customer();
try
{
foreach (ListItem lstItem in oCustomer.GetList(false))
{
ddlCustomer.Items.Add(lstItem);
}
}
catch(Exception ex)
{
ErrorMessage.Append(ex.ToString());
}
}

//Head
private void lnkbtnEdit_Click(object sender, System.EventArgs e)
{
lnkbtnEdit.Enabled = false;
lnkbtnCancel.Enabled = true;
lnkbtnSave.Enabled = true;
SetEnableControlHeadTable(true);
}

private void lnkbtnCancel_Click(object sender, System.EventArgs e)
{
Response.Redirect(Request.RawUrl);
}

private void lnkbtnSave_Click(object sender, System.EventArgs e)
{
if (! chklProduceDept.Items[0].Selected && ! chklProduceDept.Items[1].Selected)
{
ErrorMessage.Append("请选择生产单位");
ShowErrorMessage();
return;
}
int ProducePlanHeadID = 0;
if (txtProducePlanHeadID.Text != "")
{
ProducePlanHeadID = Convert.ToInt32(txtProducePlanHeadID.Text);
}
if (oInfo.CheckInfo(ProducePlanHeadID, txtProducePlanNo.Text))
{
ErrorMessage.Append("资料重复");
ShowErrorMessage();
return;
}
string ProduceDept = "";
foreach (ListItem lstItem in chklProduceDept.Items)
{
if (lstItem.Selected)
{
ProduceDept += lstItem.Value;
}
}
if (txtProducePlanHeadID.Text == "")
{
oInfo.NewInfo(txtOverCIQDate.Text,
Convert.ToInt32(ddlCustomer.SelectedValue),
ddlCustomer.SelectedItem.Text, txtDestination.Text,
txtGetOrderDate.Text, txtMaterielDate.Text, txtProduceDate.Text,
txtInStorageDate.Text, txtShipmentDate.Text, ProduceDept,
txtRemark.Text, UserID);
Response.Redirect("ProducePlanView.aspx?ProducePlanHeadID=" + Common.GetLastPKID("ProducePlanHead", "ProducePlanHeadID"));
}
oInfo.ModifyInfo(Convert.ToInt32(txtProducePlanHeadID.Text),
txtOverCIQDate.Text, Convert.ToInt32(ddlCustomer.SelectedValue),
ddlCustomer.SelectedItem.Text, txtDestination.Text,
txtGetOrderDate.Text, txtMaterielDate.Text, txtProduceDate.Text,
txtInStorageDate.Text, txtShipmentDate.Text, ProduceDept,
txtRemark.Text, UserID);
ErrorMessage.Append("修改成功");
SetEnableControlHeadTable(false);
lnkbtnSave.Enabled = false;
lnkbtnEdit.Enabled = true;
lnkbtnCancel.Enabled = false;
ShowErrorMessage();
}

private void lnkbtnErase_Click(object sender, System.EventArgs e)
{
if (txtProducePlanHeadID.Text != "")
{
oInfo.EraseInfo(Convert.ToInt32(txtProducePlanHeadID.Text));
}
btnBack_Click(sender, e);
}

private void lnkbtnDesire_Click(object sender, System.EventArgs e)
{
if (txtProducePlanHeadID.Text != "")
{
Desire oDesire = new Desire();
int DesireHeadID;
DesireHeadID = oDesire.GetDesireHeadID(txtProducePlanNo.Text);
if (DesireHeadID == -1)
{
DesireHeadID = oDesire.NewInfo(Convert.ToInt32(txtProducePlanHeadID.Text), UserID);
Common.ModifyFlowFlag("ProducePlanHead", "ProducePlanHeadID", Convert.ToInt32(txtProducePlanHeadID.Text), 10);
}
Response.Redirect("DesireView.aspx?DesireHeadID=" + DesireHeadID + "&ProducePlanHeadID=" + txtProducePlanHeadID.Text);
}
}

private void lnkbtnPrint_Click(object sender, System.EventArgs e)
{
if (txtProducePlanHeadID.Text != "")
{
Session["dsReport"] = oInfo.LoadPrintInfo(Convert.ToInt32(txtProducePlanHeadID.Text));
StringBuilder ScriptString = new StringBuilder();
ScriptString.Append("ShowReport('ProducePlanView.rpt');");
Page.RegisterClientScriptBlock("ShowReport", Common.WriteScript(ScriptString));
ScriptString = new StringBuilder();
Response.Write(Common.WriteScript(ScriptString));
}
}

//List 部分
private void GetdsList(string RefreshFlag)
{
//get DataSet
if (txtProducePlanHeadID.Text == "")
{
return;
}
if (RefreshFlag == "false")
{
dsList = (DataSet)ViewState["dsList"];
}
else
{
oInfo.LoadInfo(Convert.ToInt32(txtProducePlanHeadID.Text));
dsList = oInfo.DetailInfo;
ViewState["dsList"] = dsList;
}
}

private void BindDgList()
{
//Bind Data to DataGridList
dgList.DataSource = dsList;
dgList.DataBind();
}

private void dgList_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
int DataGridCellCount = e.Item.Cells.Count;
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.EditItem)
{
//Delete Button
LinkButton delBttn = (LinkButton)e.Item.Cells[DataGridCellCount - 1].Controls[0];
delBttn.Attributes.Add("onclick", "return confirmDialog()");
//Product Picture
System.Web.UI.WebControls.Image imgProduct = (System.Web.UI.WebControls.Image)e.Item.FindControl("imgProduct");
Upload oUpload = new Upload();
imgProduct.ImageUrl = oUpload.getUploadURL("Product", Convert.ToInt32(DataBinder.Eval(e.Item.DataItem, "ProductID")));
}
}

private void dgList_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
if (e.Item.Cells[0].Text != "&nbsp;")
{
oInfo.SetOrderDetailPlanQty(Convert.ToInt32(e.Item.Cells[0].Text), 0);
oInfo.EraseDetailInfo(Convert.ToInt32(e.Item.Cells[0].Text));
}
GetdsList("true");
dgList.EditItemIndex = -1;
BindDgList();
}

private void dgList_CancelCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
GetdsList("false");
dgList.EditItemIndex = -1;
BindDgList();
ShowErrorMessage();
}

private void dgList_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
GetdsList("false");
dgList.EditItemIndex = e.Item.ItemIndex;
BindDgList();
ShowErrorMessage();
}

private void dgList_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
int DetailTablePKID = Convert.ToInt32(e.Item.Cells[0].Text);
int Qty = Convert.ToInt32(((TextBox)e.Item.FindControl("txtQty")).Text);
int StoredQty = Convert.ToInt32(((TextBox)e.Item.FindControl("txtStoredQty")).Text);
int CapPaperQty = 1;
CapPaperQty = oInfo.GetCapPaperQty(DetailTablePKID, Qty);
if (CapPaperQty == -1)
{
((Label)e.Item.FindControl("lblMessage")).Text = "纸箱数量出错, 请检查产品表";
ShowErrorMessage();
return;
}
string Comment = ((TextBox)e.Item.FindControl("txtComment")).Text;
int ValidQty = oInfo.GetValidQty(DetailTablePKID);
if (ValidQty == -1)
{
ShowErrorMessage();
return;
}
if (Qty > ValidQty || Qty < 1)
{
((Label)e.Item.FindControl("lblMessage")).Text = "数量为大于1小于" + ValidQty + "的整数";
ShowErrorMessage();
return;
}
oInfo.SetOrderDetailPlanQty(DetailTablePKID, Qty);
oInfo.MofifyDetailInfo(DetailTablePKID, Qty, StoredQty, CapPaperQty, Comment, UserID);
GetdsList("true");
dgList.EditItemIndex = -1;
BindDgList();
ShowErrorMessage();
}

private void lnkbtnNewDetail_Click(object sender, System.EventArgs e)
{
GetdsList("true");
BindDgList();
ShowErrorMessage();
}

private void btnBack_Click(object sender, System.EventArgs e)
{
Response.Redirect("ProducePlanList.aspx");
}

private void PrivilegeContorl()
{
string MenuName = "ProducePlanView";
User oUser = new User();
try
{
if (Session["UserID"] == null)
{
Response.Write("<Script>top.location = '../Login.aspx';</Script>");
Response.End();
}
UserID = Convert.ToInt32(Session["UserID"]);
//IsSelect
if (! oUser.GetPrivilege(UserID, MenuName, "IsSelect"))
{
Response.Redirect("../ErrorPage.aspx");
Response.End();
}
//IsInsert
//IsUpdate
if (! oUser.GetPrivilege(UserID, MenuName, "IsUpdate"))
{
lnkbtnEdit.Enabled = false;
lnkbtnSave.Enabled = false;
lnkbtnNewDetail.Enabled = false;
dgList.Columns[dgList.Columns.Count - 2].Visible = false;
}
//IsDelete
if (! oUser.GetPrivilege(UserID, MenuName, "IsDelete"))
{
lnkbtnErase.Enabled = false;
dgList.Columns[dgList.Columns.Count - 1].Visible = false;
}
//IsDesire
if (! oUser.GetPrivilege(UserID, "GZMaster"))
{
if (lblFlowFlag.Text == "0")
{
lnkbtnDesire.Enabled = false;
}
}
}
catch(Exception ex)
{
Response.Write(ex.ToString());
Response.End();
}
}

}
}

2006-08-04 15:27
huangcui2003
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2006-8-4
收藏
得分:0 
</script>
<SCRIPT language="JavaScript" event="onload" for="window">
if (document.all("iframeUpload") == undefined)
{
return false;
}
document.all("iframeUpload").height = iframeUpload.document.body.scrollHeight;
</SCRIPT>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<TABLE class="tbIn" cellSpacing="0" cellPadding="5">
<TR class="trNormal" vAlign="top">
<td class="tdNormal">
<TABLE class="tbInBlank" id="tblHead" cellSpacing="0" cellPadding="0" runat="server">
<TR class="trTitle">
<td class="tdTitle"><IMG src="../Image/TdBgLeft.gif"></td>
<td class="tdTitle" width="100%">&nbsp;表头</td>
<td class="tdTitle"><IMG src="../Image/TdBgRight.gif"></td>
</TR>
<TR class="trToolbar">
<td class="tdNormalLR" colSpan="3">&nbsp;&nbsp;&nbsp;&nbsp;
<asp:linkbutton id="lnkbtnEdit" runat="server">编辑</asp:linkbutton>
<asp:linkbutton id="lnkbtnCancel" runat="server" CausesValidation="False">取消</asp:linkbutton>
<asp:linkbutton id="lnkbtnSave" runat="server">保存</asp:linkbutton>
<asp:linkbutton id="lnkbtnErase" runat="server">删除</asp:linkbutton>
<asp:linkbutton id="lnkbtnDesire" runat="server">产生请购单</asp:linkbutton>
<asp:LinkButton id="lnkbtnPrint" runat="server">打印<img src="..\Image\Print.jpg" border="0" align="absmiddle"></asp:LinkButton>
<asp:label id="lblErrorMessage" runat="server" CssClass="RedFont"></asp:label></td>
</TR>
<TR class="trNormal">
<TD class="tdNormal" colSpan="3">
<TABLE class="tbInBorderBlank" cellSpacing="4" cellPadding="0">
<TR>
<TD align="right" width="10%">结关日期</TD>
<TD width="23%"><asp:textbox id="txtOverCIQDate" onfocus="calendar()" runat="server" CssClass="txtBorder"></asp:textbox><asp:requiredfieldvalidator id="rfvOverCIQDate" runat="server" Display="Dynamic" ControlToValidate="txtOverCIQDate"
ErrorMessage="不为空"></asp:requiredfieldvalidator></TD>
<TD align="right" width="10%"><asp:textbox id="txtProducePlanHeadID" runat="server" Width="25px" Visible="False"></asp:textbox>客户</TD>
<TD width="23%"><asp:dropdownlist id="ddlCustomer" runat="server"></asp:dropdownlist></TD>
<TD align="right" width="10%">目的地</TD>
<TD><asp:textbox id="txtDestination" runat="server" CssClass="txtBorder" Width="200px"></asp:textbox><asp:requiredfieldvalidator id="rfvDestination" runat="server" Display="Dynamic" ControlToValidate="txtDestination"
ErrorMessage="不为空"></asp:requiredfieldvalidator></TD>
</TR>
<TR>
<TD align="right"><asp:label id="lblFlowFlag" runat="server" Visible="False"></asp:label>依据</TD>
<TD>原始订单</TD>
<TD align="right">收单日期</TD>
<TD><asp:textbox id="txtGetOrderDate" onfocus="calendar()" runat="server" CssClass="txtBorder"></asp:textbox><asp:requiredfieldvalidator id="rfvGetOrderDate" runat="server" Display="Dynamic" ControlToValidate="txtGetOrderDate"
ErrorMessage="不为空"></asp:requiredfieldvalidator></TD>
<TD align="right">制造单号</TD>
<TD><asp:textbox id="txtProducePlanNo" runat="server" CssClass="txtDisable" ReadOnly="True"></asp:textbox></TD>
</TR>
<TR>
<TD align="right">订单号</TD>
<TD>如下</TD>
<TD align="right">到料日期</TD>
<TD><asp:textbox id="txtMaterielDate" onfocus="calendar()" runat="server" CssClass="txtBorder"></asp:textbox><asp:requiredfieldvalidator id="rfvMaterielDate" runat="server" Display="Dynamic" ControlToValidate="txtMaterielDate"
ErrorMessage="不为空"></asp:requiredfieldvalidator></TD>
<TD align="right">入库日期</TD>
<TD><asp:textbox id="txtInStorageDate" onfocus="calendar()" runat="server" CssClass="txtBorder"></asp:textbox><asp:requiredfieldvalidator id="rfvInStorageDate" runat="server" Display="Dynamic" ControlToValidate="txtInStorageDate"
ErrorMessage="不为空"></asp:requiredfieldvalidator></TD>
</TR>
<TR>
<TD align="right">生产单位</TD>
<TD><asp:checkboxlist id="chklProduceDept" runat="server" CssClass="pt9" RepeatLayout="Flow" RepeatDirection="Horizontal">
<asp:ListItem Value="T">铁器厂</asp:ListItem>
<asp:ListItem Value="M">木器厂</asp:ListItem>
</asp:checkboxlist></TD>
<TD align="right">投产日期</TD>
<TD><asp:textbox id="txtProduceDate" onfocus="calendar()" runat="server" CssClass="txtBorder"></asp:textbox><asp:requiredfieldvalidator id="rfvProduceDate" runat="server" Display="Dynamic" ControlToValidate="txtProduceDate"
ErrorMessage="不为空"></asp:requiredfieldvalidator></TD>
<TD align="right">出货日期</TD>
<TD><asp:textbox id="txtShipmentDate" onfocus="calendar()" runat="server" CssClass="txtBorder"></asp:textbox><asp:requiredfieldvalidator id="rfvShipmentDate" runat="server" Display="Dynamic" ControlToValidate="txtShipmentDate"
ErrorMessage="不为空"></asp:requiredfieldvalidator></TD>
</TR>
<TR>
<TD vAlign="top" align="right">注意事项</TD>
<TD colSpan="5"><asp:textbox id="txtRemark" runat="server" CssClass="areaBorder" Width="350px" TextMode="MultiLine"></asp:textbox></TD>
</TR>
<TR>
<TD colSpan="6"><asp:image id="imgMark" runat="server" Visible="False" Height="200px"></asp:image></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<BR>
<TABLE class="tbInBlank" id="tblDetail" cellSpacing="0" cellPadding="0">
<TR class="trTitle">
<td class="tdTitleB"><IMG src="../Image/TdBgLeft.gif"></td>
<td class="tdTitleB" width="100%">&nbsp;表身</td>
<td class="tdTitleB"><IMG src="../Image/TdBgRight.gif"></td>
</TR>
<TR class="trToolbar">
<td class="tdNormalLR" colSpan="3">&nbsp;&nbsp;&nbsp;&nbsp;
<asp:linkbutton id="lnkbtnNewDetail" runat="server">新增</asp:linkbutton></td>
</TR>
<TR class="trNormal">
<td class="tdNormal" colSpan="3">
<TABLE class="tbInBorder" cellSpacing="10" cellPadding="0">
<tr>
<td><asp:datagrid id="dgList" runat="server" Width="100%" AutoGenerateColumns="False" BorderWidth="0px"
GridLines="None" BorderColor="#B5C3EF" PageSize="20">
<AlternatingItemStyle CssClass="tr1"></AlternatingItemStyle>
<ItemStyle CssClass="tr0"></ItemStyle>
<HeaderStyle CssClass="trHead"></HeaderStyle>
<Columns>
<asp:BoundColumn Visible="False" DataField="ProducePlanDetailID" ReadOnly="True" HeaderText="制造单明细ID"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="OrderDetailID" ReadOnly="True" HeaderText="订单明细ID"></asp:BoundColumn>
<asp:BoundColumn DataField="OrderNo" ReadOnly="True" HeaderText="订单号"></asp:BoundColumn>
<asp:BoundColumn DataField="ProductName" ReadOnly="True" HeaderText="货号"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="数量">
<ItemTemplate>
<asp:Label id=lblQty runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Qty") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id=txtQty runat="server" CssClass="txtBorder" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem.Qty") %>'>
</asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" Display="Dynamic" ControlToValidate="txtQty"
ErrorMessage="不为空"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server" Display="Dynamic" ControlToValidate="txtQty"
ErrorMessage="为整数" ValidationExpression="\d+"></asp:RegularExpressionValidator>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="库存数量">
<ItemTemplate>
<asp:Label id=Label1 runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.StoredQty") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id=txtStoredQty runat="server" CssClass="txtBorder" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem.StoredQty") %>'>
</asp:TextBox>
<asp:RequiredFieldValidator id="rfvStoredQty" runat="server" Display="Dynamic" ControlToValidate="txtStoredQty"
ErrorMessage="不为空"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator id="revStoredQty" runat="server" Display="Dynamic" ControlToValidate="txtStoredQty"
ErrorMessage="整数" ValidationExpression="\d+"></asp:RegularExpressionValidator>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn DataField="Surface" ReadOnly="True" HeaderText="表面处理"></asp:BoundColumn>
<asp:BoundColumn DataField="PCS" ReadOnly="True" HeaderText="装箱方式"></asp:BoundColumn>
<asp:BoundColumn DataField="CapPaperQty" ReadOnly="True" HeaderText="纸箱数量"></asp:BoundColumn>
<asp:TemplateColumn HeaderText="图示">
<ItemTemplate>
<FONT face="宋体">
<asp:Image id="imgProduct" runat="server" Width="150px" Height="50px"></asp:Image></FONT>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="备注">
<ItemTemplate>
<asp:Label id=lblComment runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Comment") %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id=txtComment runat="server" CssClass="txtBorder" Text='<%# DataBinder.Eval(Container, "DataItem.Comment") %>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<EditItemTemplate>
<asp:Label id="lblMessage" runat="server" CssClass="RedFont"></asp:Label>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="更新" HeaderText="操作" CancelText="取消" EditText="&lt;img src=&quot;../Image/editicon.gif&quot; border=&quot;0&quot; alt=&quot;编辑&quot;&gt;"></asp:EditCommandColumn>
<asp:ButtonColumn Text="&lt;img src=&quot;../Image/clearicon.gif&quot; border=&quot;0&quot; alt=&quot;删除&quot;&gt;"
HeaderText="删除" CommandName="Delete"></asp:ButtonColumn>
</Columns>
<PagerStyle Visible="False"></PagerStyle>
</asp:datagrid></td>
</tr>
</TABLE>
</td>
</TR>
</TABLE>
<BR>
<DIV align="right"><asp:button id="btnBack" runat="server" CausesValidation="False" CssClass="btnNormal" Text="返 回"></asp:button></DIV>
</td>
</TR>
</TABLE>
</form>
</body>
</HTML>
2006-08-04 15:27
快速回复:关于打印的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018972 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved