|
|
@@ -13,6 +13,9 @@ namespace UAS_MES
|
|
|
//判断是否配置了DbFind
|
|
|
bool IsAbleDbFind;
|
|
|
|
|
|
+ //双击选择的工单号
|
|
|
+ string TextBoxValue;
|
|
|
+
|
|
|
DataHelper dh = new DataHelper();
|
|
|
|
|
|
DataTable dt = new DataTable();
|
|
|
@@ -51,6 +54,18 @@ namespace UAS_MES
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public string TextBoxValue1
|
|
|
+ {
|
|
|
+ get
|
|
|
+ {
|
|
|
+ return TextBoxValue;
|
|
|
+ }
|
|
|
+ set
|
|
|
+ {
|
|
|
+ TextBoxValue = value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
@@ -189,78 +204,14 @@ namespace UAS_MES
|
|
|
catch (Exception ea)
|
|
|
{
|
|
|
LogManager.DoLog(ea.Message);
|
|
|
- MainControl = fillFormname(FormName, (ControlCollection)fmCollection[FormName].Controls, e);
|
|
|
- if (MainControl is MaCodeSearchTextBox)
|
|
|
- {
|
|
|
- MaCodeSearchTextBox ctl = (MainControl as MaCodeSearchTextBox);
|
|
|
- ctl.GetData();
|
|
|
- }
|
|
|
- if (MainControl is SearchTextBox)
|
|
|
- {
|
|
|
- SearchTextBox ctl = (MainControl as SearchTextBox);
|
|
|
- ctl.GetData();
|
|
|
- }
|
|
|
- MainControl.Focus();
|
|
|
SuccessReturnData = false;
|
|
|
}
|
|
|
+ TextBoxValue = DbFindGridView.Rows[e.RowIndex].Cells[0].Value.ToString();
|
|
|
Dispose();
|
|
|
Close();
|
|
|
}
|
|
|
|
|
|
|
|
|
- private Control fillFormname(string fromname, ControlCollection controls, DataGridViewCellEventArgs e)
|
|
|
- {
|
|
|
- Control ct = null;
|
|
|
- if (e.RowIndex >= 0)
|
|
|
- {
|
|
|
- switch (fromname)
|
|
|
- {
|
|
|
- case "Make_TestCollection":
|
|
|
- controls[MainField].Text = DbFindGridView.Rows[e.RowIndex].Cells["工单号"].Value.ToString();
|
|
|
- ct = controls[MainField];
|
|
|
- break;
|
|
|
- case "Make_Repair":
|
|
|
- if (MainField == "cr_code")
|
|
|
- {
|
|
|
- controls[MainField].Text = DbFindGridView.Rows[e.RowIndex].Cells["工艺编号"].Value.ToString();
|
|
|
- }
|
|
|
- else if (MainField == "cd_stepcode")
|
|
|
- {
|
|
|
- controls[MainField].Text = DbFindGridView.Rows[e.RowIndex].Cells["工序编号"].Value.ToString();
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- controls[MainField].Text = DbFindGridView.Rows[e.RowIndex].Cells["零件名称"].Value.ToString();
|
|
|
- }
|
|
|
- ct = controls[MainField];
|
|
|
- break;
|
|
|
- case "OQC_PlanMaintain":
|
|
|
- if (MainField == "al_code")
|
|
|
- {
|
|
|
- Control.ControlCollection ctL = controls["panel1"].Controls;
|
|
|
- ctL[MainField].Text = DbFindGridView.Rows[e.RowIndex].Cells["流水编号"].Value.ToString();
|
|
|
- ct = ctL[MainField];
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- controls[MainField].Text = DbFindGridView.Rows[e.RowIndex].Cells["方案编号"].Value.ToString();
|
|
|
- ct = controls[MainField];
|
|
|
- }
|
|
|
- break;
|
|
|
- case "OQC_Inspection":
|
|
|
- controls[MainField].Text = DbFindGridView.Rows[e.RowIndex].Cells["工单号"].Value.ToString();
|
|
|
- ct = controls[MainField];
|
|
|
- break;
|
|
|
- case "Make_FeedingCollection":
|
|
|
- controls[MainField].Text = DbFindGridView.Rows[e.RowIndex].Cells["工单号"].Value.ToString();
|
|
|
- ct = controls[MainField];
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- return ct;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
private void fillControl(DataGridViewCellEventArgs e, int i, Control ct)
|
|
|
{
|
|
|
for (int j = 0; j < SetValueField.Length; j++)
|