private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     ProductionNew.ProductionReceiveFail pf = new ProductionReceiveFail(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString());
     pf.ShowDialog();//เรียกหน้าส่งซ่อม
     if (pf.DialogResult == DialogResult.OK)
     {
         loadDataNew();
         if (dataGridView1.Rows.Count < 1) { dataGridView2.DataSource = null; return; }
         loadDataDetailNew("where ProductionRepairHeadId = '" + dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString() + "'");/*ดึงรายการของใบส่งซ่อมใหม่*/
     }
 }
 private void toolStripButton1_Click_1(object sender, EventArgs e)
 {
     ProductionNew.ProductionReceiveFail pf = new ProductionReceiveFail();
     pf.ShowDialog();
     if (pf.DialogResult == DialogResult.OK) {
         loadDataNew();
         if (dataGridView1.Rows.Count < 1) { dataGridView2.DataSource = null; return; }
         loadDataDetailNew("where ProductionRepairHeadId = '" + dataGridView1.Rows[0].Cells[0].Value.ToString() + "'");/*ดึงรายการของใบส่งซ่อมใหม่*/
     }
 }
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     ProductionNew.ProductionReceiveFail pw = new ProductionReceiveFail();
     pw.ShowDialog();
     pw.StartPosition = FormStartPosition.CenterScreen;
 }