⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 buyaddprint.aspx.cs

📁 基于w/s模式的资产管理系统,可以参考参考,忘了什么时候从网络下的,还可以
💻 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 + -