private void exportBtn_Click(object sender, EventArgs e) { string schno = string.Empty; try { if (statusBox.Text == "系统Offline") { return; } if (statusBox.Text == "通过") { return; } if (_isOperating == false) { return; } if (_touCyaKu == null) { msgBox.Text = "没有到达报告"; return; } schno = DbAccess.generateScheduleNo(); FNGSETEntity fngset = new FNGSETEntity(); fngset.SCHNO = schno; fngset.MOTOSTNO = GlobalAccess.StationNo; fngset.SYORIFLG = "0"; fngset.Save(); DbAccess.callProcedure(schno, "stockin_1_export"); DbAccess.callAfterExport(); msgBox.Text = "设定成功"; ClearAll(); ticketNoBox.Focus(); ticketNoBox.SelectAll(); _isOperating = false; } catch (Exception ex) { msgBox.Text = ex.Message; } finally { DbAccess.UpdateFngset(schno); } }