/// <summary> /// 開啟料盤查詢,取得料盤編號 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnTraySelect_Click(object sender, EventArgs e) { List <string> list = TraySearch.GetTrayValue(); txtTrayNo.Text = list[0]; lblTrayName.Text = list[1]; }
/// <summary> /// 取得Tray編號 /// </summary> /// <returns></returns> public static List <string> GetTrayValue() { List <string> result = new List <string>(); TraySearch traySearch = new TraySearch(); traySearch.ShowDialog(); if (!string.IsNullOrEmpty(traySearch.noResult) && !string.IsNullOrEmpty(traySearch.nameResult)) { result.Add(traySearch.noResult); result.Add(traySearch.nameResult); } return(result); }