Ejemplo n.º 1
0
        private void dataGridViewX1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.RowIndex != -1 && DeleteMaterialData == false)
            {
                Scan_Data.Text = "";
                labpn.Text     = "";


                Scan_Data.Text = this.dataGridViewX1[0, e.RowIndex].Value.ToString() + " " + this.dataGridViewX1[1, e.RowIndex].Value.ToString();
                sKp_No         = this.dataGridViewX1[4, e.RowIndex].Value.ToString();
                sStation       = this.dataGridViewX1[5, e.RowIndex].Value.ToString();
                //sSQL = string.Format("select * from tMaterialPreparation where masterid='{0}'  and woId='{1}' and stationno='{2}' ", dataGridViewX1[0, e.RowIndex].Value.ToString(), dataGridViewX1[1, e.RowIndex].Value.ToString(), dataGridViewX1[5, e.RowIndex].Value.ToString());
                //DataTable dtm=  refWebExecuteSqlCmd.Instance.ExecuteQuerySQL(sSQL);
                Dictionary <string, object> dic = new Dictionary <string, object>();
                dic.Add("MASTERID", dataGridViewX1[0, e.RowIndex].Value.ToString());
                dic.Add("WOID", dataGridViewX1[1, e.RowIndex].Value.ToString());
                dic.Add("STATIONNO", dataGridViewX1[5, e.RowIndex].Value.ToString());
                DataTable dtm = FrmBLL.ReleaseData.arrByteToDataTable(refWebtMaterialPreparation.Instance.GetKpdistinctMaterial(FrmBLL.ReleaseData.DictionaryToJson(dic)));
                //DataTable dtm = FrmBLL.ReleaseData.arrByteToDataTable(refWebtMaterialPreparation.Instance.GetKpdistinctMaterial(new WebServices.tMaterialPreparation.tMaterialPreparation1()
                //    {
                //        masterId = dataGridViewX1[0, e.RowIndex].Value.ToString(),
                //        woId = dataGridViewX1[1, e.RowIndex].Value.ToString(),
                //        stationno = dataGridViewX1[5, e.RowIndex].Value.ToString()
                //    }));

                for (int z = 0; z < dtm.Rows.Count; z++)
                {
                    labpn.Text = labpn.Text + dtm.Rows[z]["KPNUMBER"].ToString() + ",";
                }
                Scan_Data_KeyDown(null, new KeyEventArgs(Keys.Enter));
                Scan_Data.SelectAll();
                Scan_Data.Focus();
            }
        }
Ejemplo n.º 2
0
 private void butRefresh_Click(object sender, EventArgs e)
 {
     if (iasyncresult == null || iasyncresult.IsCompleted)
     {
         eventquerymaterialmonitor = new refquerymaterialmonitor(this.QueryMaterialMonitor);
         iasyncresult = eventquerymaterialmonitor.BeginInvoke(null, null);
         Scan_Data.Focus();
         Scan_Data.SelectAll();
     }
 }
Ejemplo n.º 3
0
        private void Monitor_Load(object sender, EventArgs e)
        {
            #region 添加应用程序
            if (this.sInfo.gUserInfo.rolecaption == "系统开发员")
            {
                IList <IDictionary <string, object> > lsfunls = new List <IDictionary <string, object> >();
                FrmBLL.publicfuntion.GetFromCtls(this, ref lsfunls);
                Dictionary <string, object> dic = new Dictionary <string, object>();
                dic.Add("PROGID", this.Name);
                dic.Add("PROGNAME", this.Text);
                dic.Add("PROGDESC", this.Text);
                FrmBLL.publicfuntion.AddProgInfo(dic, lsfunls);
            }
            #endregion

            dataGridViewX1.AutoGenerateColumns = false;


            QueryMaterialMonitor();
            QueryLineList();
            Scan_Data.SelectAll();
            Scan_Data.Focus();
            cblistline.Text = "ALL";
        }