123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Runtime.InteropServices;
- 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 Query_BadSearch : CustomControl.BaseForm.BaseForm
- {
- //所有用到了headBar的部分都需要这段代码
- [DllImport("user32.dll")]
- public static extern bool ReleaseCapture();
- [DllImport("user32.dll")]
- public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
- [DllImport("user32.dll", EntryPoint = "GetWindowLong", CharSet = CharSet.Auto)]
- public static extern int GetWindowLong(HandleRef hWnd, int nIndex);
- [DllImport("user32.dll", EntryPoint = "SetWindowLong", CharSet = CharSet.Auto)]
- public static extern IntPtr SetWindowLong(HandleRef hWnd, int nIndex, int dwNewLong);
- public const int WM_SYSCOMMAND = 0x0112;
- public const int SC_MOVE = 0xF010;
- public const int HTCAPTION = 0x0002;
- DataHelper dh;
- LogStringBuilder sql = new LogStringBuilder();
- string msid;
- double badqty;
- string macode;
- public Query_BadSearch(string msid, double badqty, string macode)
- {
- dh = SystemInf.dh;
- InitializeComponent();
- this.msid = msid;
- this.badqty = badqty;
- this.macode = macode;
- }
- private void Warehouse_ProdDetail_Load(object sender, EventArgs e)
- {
-
- FillDataGridView();
- }
- private void headBar1_MouseDown(object sender, MouseEventArgs e)
- {
- ReleaseCapture();
- SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
- }
- private void BatchProductDGV_CellContentClick66(object sender, DataGridViewCellEventArgs e)
- {
- if (BatchProductDGV.Columns[e.ColumnIndex].Name == "DeleteRow")
- {
- if (e.RowIndex >= 0)
- {
- string id = BatchProductDGV.Rows[e.RowIndex].Cells["msd_id"].Value.ToString();
-
- }
- }
- }
- private void FillDataGridView()
- {
- sql.Clear();
- sql.Append("select msd_id,msd_msid,msd_badname,msd_qty,msd_indate,msd_status,msd_stepcode from MES_STEPREPORTdet ");
- sql.Append("where msd_msid = '" + msid + "' and msd_stepcode = '" + User.CurrentStepCode + "' and msd_status = 0");
- DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
- BaseUtil.FillDgvWithDataTable(BatchProductDGV, dt);
- }
-
-
- }
- }
|