?? buyaddprint.aspx.cs
字號:
?//文件名:BuyAddPrint.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class BuyManage_BuyAddPrint : System.Web.UI.Page
{
private BuyManage_BuyAddForm MyPrintForm;
private static int MyID = 0;
private static DataTable MyGoodsTable = new DataTable();
protected void Page_Load(object sender, EventArgs e)
{//打印商品采購入庫信息
if (Session["MyCompanyName"] != null)
{
this.Label1.Text = Session["MyCompanyName"].ToString() + "商品采購入庫單";
}
this.Label2.Text = "打印日期:" + DateTime.Now.ToShortDateString();
MyPrintForm = (BuyManage_BuyAddForm)Context.Handler;
this.Label3.Text ="采購單號:"+ MyPrintForm.MyPrint采購單號;
this.Label4.Text = "客戶名稱:" + MyPrintForm.MyPrint客戶名稱;
this.Label5.Text = "應付金額:" + MyPrintForm.MyPrint應付金額;
this.Label6.Text = "實付金額:" + MyPrintForm.MyPrint實付金額;
this.Label7.Text = "經辦人員:" + MyPrintForm.MyPrint經辦人員;
this.Label8.Text = "支付方式:" + MyPrintForm.MyPrint支付方式;
this.Label9.Text = "入庫日期:" + MyPrintForm.MyPrint入庫日期;
this.Label10.Text ="補充說明:" + MyPrintForm.MyPrint補充說明;
//創建無連接的數據表
DataColumn[] MyKey = new DataColumn[1];
MyGoodsTable = new DataTable("商品采購明細表");
DataColumn MyColumn = new DataColumn();
MyColumn.DataType = System.Type.GetType("System.Int16");
MyColumn.ColumnName = "自編號";
MyGoodsTable.Columns.Add(MyColumn);
MyKey[0] = MyColumn;
MyGoodsTable.PrimaryKey = MyKey;
//MyGoodsTable.Columns.Add("商品編號", System.Type.GetType("System.String"));
MyGoodsTable.Columns.Add("商品名稱", System.Type.GetType("System.String"));
MyGoodsTable.Columns.Add("規格型號", System.Type.GetType("System.String"));
MyGoodsTable.Columns.Add("計量單位", System.Type.GetType("System.String"));
MyGoodsTable.Columns.Add("商品單價", System.Type.GetType("System.Double"));
MyGoodsTable.Columns.Add("采購數量", System.Type.GetType("System.Double"));
MyGoodsTable.Columns.Add("采購金額", System.Type.GetType("System.Double"));
//MyGoodsTable.Columns.Add("生產日期", System.Type.GetType("System.String"));
//MyGoodsTable.Columns.Add("補充說明", System.Type.GetType("System.String"));
this.GridView1.DataSource = MyGoodsTable;
MyID = 0;
foreach (DataRow MyPrintRow in MyPrintForm.MyPrintDataTable.Rows)
{
MyID = MyID + 1;
DataRow MyRow = MyGoodsTable.NewRow();
MyRow[0] = MyID;
//MyRow["商品編號"] = MyPrintRow[1].ToString();
MyRow["商品名稱"] = MyPrintRow[2].ToString();
MyRow["規格型號"] = MyPrintRow[3].ToString();
MyRow["計量單位"] = MyPrintRow[4].ToString();
MyRow["商品單價"] = MyPrintRow[5].ToString();
MyRow["采購數量"] = MyPrintRow[6].ToString();
MyRow["采購金額"] = MyPrintRow[7].ToString();
//MyRow["生產日期"] = MyPrintRow[8].ToString();
//MyRow["補充說明"] = MyPrintRow[9].ToString();
MyGoodsTable.Rows.Add(MyRow);
this.GridView1.DataSource = MyGoodsTable;
this.GridView1.DataBind();
}
if (Session["MyUserName"] != null)
{
this.Label31.Text = "庫管員:" + Session["MyUserName"].ToString();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -