123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using UAS_MES_NEW.DataOperate;
- using UAS_MES_NEW.Entity;
- using UAS_MES_NEW.PublicMethod;
- namespace UAS_MES_NEW.Query
- {
- public partial class BadSn : Form
- {
- DataHelper dh = SystemInf.dh;
- AutoSizeFormClass asc = new AutoSizeFormClass();
- string _linecode;
- string _prodcode;
- string _wccode;
- string _begindate;
- string _enddate;
- string _stepcode;
- string _makind;
- string _badname;
- public BadSn(string linecode, string prodcode, string wccode, string begindate, string enddate, string stepcode,string makind,string badname)
- {
- InitializeComponent();
- _linecode = linecode;
- _prodcode = prodcode;
- _wccode = wccode;
- _begindate = begindate;
- _enddate = enddate;
- _stepcode = stepcode;
- _makind = makind;
- _badname = badname;
- }
- private void BadItem_SizeChanged(object sender, EventArgs e)
- {
- asc.controlAutoSize(this);
- }
- private void BadItem_Load(object sender, EventArgs e)
- {
- string condition = " mb_indate between to_date('" + _begindate + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + _enddate + "', 'yyyy-mm-dd hh24:mi:ss') ";
- if (_prodcode != "")
- {
- condition += " and ma_prodcode = '" + _prodcode + "'";
- }
- if (_linecode != "")
- {
- condition += " and mb_linecode = '" + _linecode + "'";
- }
- if (_wccode != "")
- {
- condition += " and ma_wccode = '" + _wccode + "'";
- }
- if (_makind != "")
- {
- condition += " and ma_kind = '" + _makind + "'";
- }
- if (_stepcode != "")
- {
- condition += " and mb_stepcode = '" + _stepcode + "'";
- }
- if (_badname != "")
- {
- condition += " and mb_badname = '" + _badname + "'";
- }
- string v_sql = "";
- LogicHandler.GetQuerySQL(condition, "不良明细", out v_sql);
-
- DataTable dt = (DataTable)dh.ExecuteSql(v_sql, "select");
- BaseUtil.FillDgvWithDataTable(Data, dt);
- }
- }
- }
|