Exemplo n.º 1
0
        private void HyperLinkWriteWellData_Click(object sender, RoutedEventArgs e)
        {
            if (this.m_CaseList != null)
            {
                if (this.m_WorkBook != null)
                {
                    Microsoft.Office.Interop.Excel.Worksheet workSheet = this.m_WorkBook.Sheets["SamplePlacement"];
                    workSheet.Select(Type.Missing);

                    TecanSamplePlacementQueue tecanSamplePlacementQueue = new TecanSamplePlacementQueue();
                    for (int i = this.m_CaseList.Count - 1; i >= 0; i--)
                    {
                        if (tecanSamplePlacementQueue.Queue.Count != 0)
                        {
                            TecanSample tecanSample = tecanSamplePlacementQueue.Queue.Dequeue();
                            workSheet.Cells[tecanSample.WellCell.RowIndex, tecanSample.WellCell.ColumnIndex] = TecanSample.GetWellCellValue(this.m_CaseList[i].ReportNo, this.m_CaseList[i].PLastName);
                        }
                    }
                }
                else
                {
                    MessageBox.Show("The spread sheet doesn't appear to be open.");
                }
            }
            else
            {
                MessageBox.Show("The well data cannot be written in this mode.");
            }
        }
        private void HyperLinkWriteWellData_Click(object sender, RoutedEventArgs e)
        {
            if (this.m_CaseList != null)
            {
                if (this.m_WorkBook != null)
                {
                    Microsoft.Office.Interop.Excel.Worksheet workSheet = this.m_WorkBook.Sheets["SamplePlacement"];
                    workSheet.Select(Type.Missing);

                    TecanSamplePlacementQueue tecanSamplePlacementQueue = new TecanSamplePlacementQueue();
                    for (int i = this.m_CaseList.Count - 1; i >= 0; i--)
                    {
                        if (tecanSamplePlacementQueue.Queue.Count != 0)
                        {
                            TecanSample tecanSample = tecanSamplePlacementQueue.Queue.Dequeue();
                            workSheet.Cells[tecanSample.WellCell.RowIndex, tecanSample.WellCell.ColumnIndex] = TecanSample.GetWellCellValue(this.m_CaseList[i].ReportNo, this.m_CaseList[i].PLastName);
                        }
                    }
                }
                else
                {
                    MessageBox.Show("The spread sheet doesn't appear to be open.");
                }
            }
            else
            {
                MessageBox.Show("The well data cannot be written in this mode.");
            }
        }