/// <summary> /// 查找留存样 /// </summary> private void btnLoadVehData_Click(object sender, EventArgs e) { QC_Sample_Mix sample = null; DbEntityTable <QC_MixCheckGroup> mixCgrp = new DbEntityTable <QC_MixCheckGroup>(); mixCgrp.LoadDataByWhere("main.StoreCode=@StoreCode", txtStoreCode.Text.Trim()); if (mixCgrp.Count > 0) { sample = QC_Sample_Mix.GetByID(mixCgrp[0].Sample_Mix_ID); } if (sample != null) { currentData.CopyData(sample); } else { MessageBox.Show("没有找到"); } }