?? buyreduceprint.aspx.cs
字號:
?//文件名;BuyReducePrint.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;
using System.Data.SqlClient;
public partial class BuyManage_BuyReducePrint : System.Web.UI.Page
{
private BuyManage_BuyReduceForm 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_BuyReduceForm)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.Double"));
MyGoodsTable.Columns.Add("退貨數量", System.Type.GetType("System.Double"));
MyGoodsTable.Columns.Add("退貨金額", System.Type.GetType("System.Double"));
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[2].ToString();
MyRow["規格型號"] = MyPrintRow[3].ToString();
MyRow["計量單位"] = MyPrintRow[4].ToString();
MyRow["商品單價"] = MyPrintRow[5].ToString();
MyRow["退貨數量"] = MyPrintRow[6].ToString();
MyRow["退貨金額"] = MyPrintRow[7].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 + -