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

📄 buyreduceprint.aspx.cs

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