Example #1
0
        private void HY_PurchasingdetailsDH_Load(object sender, EventArgs e)
        {
            HY_Invoicing.HY_Purchasingstatus hypur; //实例化传值窗体
            hypur = (HY_Invoicing.HY_Purchasingstatus) this.Owner;
            string aa    = hypur.GetMainvalue;      //单号传值
            string sup   = hypur.HYSupplier;        //供应商传值
            string model = hypur.ModelID;           //模号

            HY_BLL.HY_StorageBLL hystorfobll = new HY_StorageBLL();
            string  sql = "select * from HY_ProcurementInfo where c_DID='" + aa + "' and c_Supplier='" + sup + "'";
            DataSet ds  = hystorfobll.ExecuteQueryDataSet(sql);

            this.reportViewer1.LocalReport.ReportEmbeddedResource = "HYWJ.HY_Report.HY_ProcurementInfoReportDH.rdlc";
            this.reportViewer1.LocalReport.DataSources.Clear();
            this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("HY_ProcurementInfo", ds.Tables[0]));
            //设置打印布局模式,显示物理页面大小
            this.reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
            //缩放模式为百分比,以100%方式显示
            this.reportViewer1.ZoomMode    = Microsoft.Reporting.WinForms.ZoomMode.Percent;
            this.reportViewer1.ZoomPercent = 100;

            ReportParameter rp = new ReportParameter("content", sup);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp });
            ReportParameter rp1 = new ReportParameter("cgID", aa);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp1 });
            ReportParameter mod = new ReportParameter("modelID", model);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { mod });

            // TODO: 这行代码将数据加载到表“hYMISDataSet.HY_ProcurementInfo”中。您可以根据需要移动或移除它。
            //this.HY_ProcurementInfoTableAdapter.Fill(this.DataSet1.HY_ProcurementInfo, aa);
            this.reportViewer1.RefreshReport();
        }
Example #2
0
        //自定义绑定数据
        private void requistionDate(string sql)
        {
            this.dataGridViewCK.AutoGenerateColumns = false;// 关闭自动创建列
            HY_BLL.HY_StorageBLL hystorfobll = new HY_StorageBLL();

            this.dataGridViewCK.DataSource = hystorfobll.ExecuteQuerySelect(sql);
        }
Example #3
0
        //自定义绑定数据
        private void requistionDate()
        {
            this.dataGridViewCK.AutoGenerateColumns = false;// 关闭自动创建列
            HY_BLL.HY_StorageBLL hystorfobll = new HY_StorageBLL();
            string sql = "select s_ID,s_DID,s_CID,s_Supplier,s_Person,s_Class,s_Warehouse,s_XDate,s_DDate,s_PID,s_Pname,s_Origin,s_Specifications,s_Amount,s_Price,s_Notes,(s_Amount*s_Price) as ABV,s_WFDate,s_DWDate,s_WFSup,s_WFDateHot,s_DWDateHot,s_WFHotSup,s_WFDateBM,s_DWDateBM,s_WFSupBM from HY_Storage order by s_ID desc";

            this.dataGridViewCK.DataSource = hystorfobll.ExecuteQuerySelect(sql);
        }
Example #4
0
        //绑定产品类别
        private void cp_Class()
        {
            HY_BLL.HY_StorageBLL hystorbll = new HY_StorageBLL();
            string sql = "select * from HY_CPClass order by c_ID desc";

            this.listBoxClass.DataSource    = hystorbll.ExecuteQuerySelect(sql);
            this.listBoxClass.DisplayMember = "c_Class";
            this.listBoxClass.ValueMember   = "c_ID";
        }
Example #5
0
        private void btnADD_Click(object sender, EventArgs e)
        {
            HY_BLL.HY_StorageBLL hystor = new HY_StorageBLL();
            string sql = "insert into HY_CPClass(c_Class) values('" + this.c_Class.Text.Trim() + "')";
            int    res = hystor.com_HY_HY_Storagelslist(sql);

            if (res > 0)
            {
                MessageBox.Show("产品类别添加成功,确定后可继续添加!");
                cp_Class();
                this.c_Class.Text = "";//清空输入框
            }
        }
Example #6
0
        private void btnDEL_Click(object sender, EventArgs e)
        {
            int cid = int.Parse(this.listBoxClass.SelectedValue.ToString());//选择产品类别值

            HY_BLL.HY_StorageBLL hystorbll = new HY_StorageBLL();
            string sql = "delete from HY_CPClass where c_ID='" + cid + "'";
            int    res = hystorbll.com_HY_HY_Storagelslist(sql);

            if (res > 0)
            {
                MessageBox.Show("提示:成功删除产品类别!");
                cp_Class();
            }
        }
Example #7
0
        private void HY_WarehouseState_Load(object sender, EventArgs e)
        {
            HY_BLL.HY_StorageBLL hystorfobll = new HY_StorageBLL();
            string  sql = "select * from HY_Storage order by s_ID desc";
            DataSet ds  = hystorfobll.ExecuteQueryDataSet(sql);

            this.reportViewer1.LocalReport.ReportEmbeddedResource = "HYWJ.HY_Report.HY_WarehouseStateReport.rdlc";
            this.reportViewer1.LocalReport.DataSources.Clear();
            this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("StorageState", ds.Tables[0].DefaultView));
            // TODO: 这行代码将数据加载到表“DataSet1.HY_Storage”中。您可以根据需要移动或移除它。
            //this.HY_StorageTableAdapter.Fill(this.DataSet1.HY_Storage);
            //设置打印布局模式,显示物理页面大小
            this.reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
            //缩放模式为百分比,以100%方式显示
            this.reportViewer1.ZoomMode    = Microsoft.Reporting.WinForms.ZoomMode.Percent;
            this.reportViewer1.ZoomPercent = 100;
            this.reportViewer1.RefreshReport();
        }
        private void HY_BomlistDB_Load(object sender, EventArgs e)
        {
            HYWJ.HY_Production.HY_BOMListInventory hybomlist; //实例化传值窗体
            hybomlist = (HYWJ.HY_Production.HY_BOMListInventory) this.Owner;
            string aa = hybomlist.GetBomvalue;                //传值

            HY_BLL.HY_StorageBLL hystorfobll = new HY_StorageBLL();
            string  sql = "select * from HY_BomDetails where d_SKID='" + aa + "' order by d_ID desc";
            DataSet ds  = hystorfobll.ExecuteQueryDataSet(sql);

            this.reportViewer1.LocalReport.ReportEmbeddedResource = "HYWJ.HY_Report.HY_BomlistReport.rdlc";
            this.reportViewer1.LocalReport.DataSources.Clear();
            this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("HY_BomDetails", ds.Tables[0]));
            // TODO: 这行代码将数据加载到表“DataSet1.HY_Storage”中。您可以根据需要移动或移除它。
            //this.HY_StorageTableAdapter.Fill(this.DataSet1.HY_Storage);
            //设置打印布局模式,显示物理页面大小
            this.reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
            //缩放模式为百分比,以100%方式显示
            this.reportViewer1.ZoomMode    = Microsoft.Reporting.WinForms.ZoomMode.Percent;
            this.reportViewer1.ZoomPercent = 100;
            this.reportViewer1.RefreshReport();
        }
        //追加补货信息
        private void btnADDOK_Click(object sender, EventArgs e)
        {
            if (this.s_Specifications.Text.Trim() == string.Empty)
            {
                MessageBoxEx.Show("产品规格不能为空,请正确填写", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                this.s_Specifications.Focus();
                return;
            }
            if (this.s_Price.Text.Trim() == string.Empty)
            {
                MessageBoxEx.Show("产品单价不能为空,请正确填写", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                this.s_Price.Focus();
                return;
            }
            if (!IsNumber(this.s_Price.Text.Trim()))
            {
                MessageBoxEx.Show("产品单价只能为数字,请正确填写", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                this.s_Price.Focus();
                return;
            }
            if (this.s_Amount.Text.Trim() == string.Empty)
            {
                MessageBoxEx.Show("产品数量不能为空,请正确填写", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                this.s_Amount.Focus();
                return;
            }
            if (!IsNumber(this.s_Amount.Text.Trim()))
            {
                MessageBoxEx.Show("产品数量只能为数字,请正确填写", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                this.s_Amount.Focus();
                return;
            }
            HY_Model.HY_Storage hystormodel = new HY_Model.HY_Storage();
            hystormodel.S_DID            = this.s_DID.Text;
            hystormodel.S_CID            = this.s_CID.Text;
            hystormodel.S_Person         = this.s_Person.Text;
            hystormodel.S_Class          = this.s_Class.Text;
            hystormodel.S_Warehouse      = this.s_Warehouse.Text;
            hystormodel.S_XDate          = Convert.ToDateTime(this.s_XDate.Value);
            hystormodel.S_DDate          = Convert.ToDateTime(this.s_DDate.Value);
            hystormodel.S_PID            = this.s_PID.Text;
            hystormodel.S_Pname          = this.s_Pname.Text.Trim();
            hystormodel.S_Specifications = this.s_Specifications.Text.Trim();
            hystormodel.S_Amount         = int.Parse(this.s_Amount.Text.Trim());
            hystormodel.S_Price          = int.Parse(this.s_Price.Text.Trim());
            hystormodel.S_Notes          = this.s_Notes.Text.Trim();

            string str_DID = this.listView1.SelectedItems[0].SubItems[0].Text;

            HY_BLL.HY_StorageBLL hystorbll = new HY_StorageBLL();
            string sql = "update HY_Storage set s_Amount=s_Amount+'" + hystormodel.S_Amount + "',s_Price='" + hystormodel.S_Price + "' where s_PID='" + str_DID + "'";
            int    res = hystorbll.com_HY_HY_Storagelslist(sql);

            if (res > 0)
            {
                //写入log库存表
                string sqllog = "insert into HY_StorageLog(s_DID,s_CID,s_Person,s_Class,s_Warehouse,s_XDate,s_DDate,s_PID,s_Pname,s_Specifications,s_Amount,s_Price,s_Notes,s_State) values('" + hystormodel.S_DID + "','" + hystormodel.S_CID + "','" + hystormodel.S_Person + "','" + hystormodel.S_Class + "','" + hystormodel.S_Warehouse + "','" + hystormodel.S_XDate + "','" + hystormodel.S_DDate + "','" + hystormodel.S_PID + "','" + hystormodel.S_Pname + "','" + hystormodel.S_Specifications + "','" + hystormodel.S_Amount + "','" + hystormodel.S_Price + "','" + hystormodel.S_Notes + "','添加补货')";
                hystorbll.com_HY_HY_Storagelslist(sqllog);

                MessageBoxEx.Show("预警产品追加成功,确认后继续追加!", "操作提示", MessageBoxButtons.OK);
                string sql4 = "select * from HY_Storage order by s_ID desc";
                requistionDate(sql4);
            }
        }
        private void HY_BomlistDB2_Load(object sender, EventArgs e)
        {
            HYWJ.HY_Production.HY_BomAudit hybomaud;//实例化传值窗体
            hybomaud = (HYWJ.HY_Production.HY_BomAudit) this.Owner;
            string aa       = hybomaud.B_SKID;
            string cid      = hybomaud.B_CNID;
            string customer = hybomaud.B_CustomerID;
            string no       = hybomaud.B_No;
            string material = hybomaud.B_Material;
            string bomSize  = hybomaud.B_BomSize;
            string height   = hybomaud.B_Height;
            string tonnage  = hybomaud.B_Tonnage;
            string mname    = hybomaud.B_Name;
            string notes    = hybomaud.B_Notes;


            HY_BLL.HY_StorageBLL hystorfobll = new HY_StorageBLL();
            string  sql = "select * from HY_BomDetails where d_SKID='" + aa + "' order by d_ID desc";
            DataSet ds  = hystorfobll.ExecuteQueryDataSet(sql);

            this.reportViewer1.LocalReport.ReportEmbeddedResource = "HYWJ.HY_Report.HY_BomlistReport.rdlc";
            this.reportViewer1.LocalReport.DataSources.Clear();

            ReportParameter bid = new ReportParameter("BID", aa);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { bid });

            ReportParameter cnid = new ReportParameter("CNID", cid);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { cnid });

            ReportParameter cust = new ReportParameter("CustomerID", customer);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { cust });

            ReportParameter gcs = new ReportParameter("GCS", no);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { gcs });

            ReportParameter cz = new ReportParameter("CZ", material);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { cz });

            ReportParameter boms = new ReportParameter("YLZC", bomSize);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { boms });

            ReportParameter bhgd = new ReportParameter("BHGD", height);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { bhgd });

            ReportParameter ccd = new ReportParameter("CCDW", tonnage);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { ccd });

            ReportParameter mjmc = new ReportParameter("MJMC", mname);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { mjmc });

            ReportParameter gznr = new ReportParameter("GZNR", notes);

            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { gznr });



            this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("HY_BomDetails", ds.Tables[0]));
            //设置打印布局模式,显示物理页面大小
            this.reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
            //缩放模式为百分比,以100%方式显示
            this.reportViewer1.ZoomMode    = Microsoft.Reporting.WinForms.ZoomMode.Percent;
            this.reportViewer1.ZoomPercent = 100;
            this.reportViewer1.RefreshReport();
        }