sms_goodsreport.cs

来自「库存管理系统,对企业仓库的产品进行管理,使用C#语句 .net 平台开发」· CS 代码 · 共 39 行

CS
39
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace FORU_SMS_.CrystalReport
{
    public partial class SMS_GoodsReport : Form
    {
        private DataTable dt;
        private ChkDataSet chkSet = new ChkDataSet();
        private ChkCrystalReport chkReport = new ChkCrystalReport();
        public SMS_GoodsReport(DataTable dtb)
        {
            InitializeComponent();
            dt = dtb;
        }

        private void SMS_GoodsReport_Load(object sender, EventArgs e)
        {
            string[] r = new string[5];
            foreach (System.Data.DataRow rw in dt.Rows)
            {
                r[0] = rw["产品编号"].ToString();
                r[1] = rw["产品名称"].ToString();
                r[2] = rw["库存数量"].ToString();
                r[3] = rw["盘点实数"].ToString();
                r[4] = rw["盘点日期"].ToString();
                chkSet.Tables[0].Rows.Add(r);
            }
            chkReport.SetDataSource(chkSet);
            this.crystalReportViewer1.ReportSource = chkReport;
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?