public void Import() { DialogProfJobListView dialog = new DialogProfJobListView(); try { dialog.Type = EReportType.Chemical; dialog.ShowDialog(); } finally { if (dialog.DialogResult == DialogResult.OK) { if (dialog.AreaNo == EReportArea.None) { MessageBox.Show("Can't import chemical report because AreaNo is none!", "SGS", MessageBoxButtons.OK, MessageBoxIcon.Error); } else if (string.IsNullOrWhiteSpace(dialog.ItemNo) == true) { MessageBox.Show("Can't import chemical report because MaterialNo is none!", "SGS", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { Insert(dialog.AreaNo, dialog.ItemNo.Split(',')[0]); } } } }
public void Import() { DialogProfJobListView dialog = new DialogProfJobListView(); try { dialog.Type = EReportType.Physical; dialog.ShowDialog(); } finally { if (dialog.DialogResult == DialogResult.OK) { profJobSet.Type = EReportType.Physical; profJobSet.JobNo = dialog.JobNo; profJobSet.ExtendASTM = false; profJobSet.Select(); profJobSet.Fetch(); Insert(); } } }