Esempio n. 1
0
        private SRMData CreateSRMFData(string datarange, bool cumulative)
        {
            try
            {
                Object[,] dataCells = IOOperation.GetInstance().Read(datarange);
                if (dataCells == null)
                {
                    throw new InvalidDataRange();
                }
                switch (dataCells.GetLength(1))
                {
                case 1:
                    return(SetDataOneColumn(dataCells, cumulative));

                case 2:
                    return(SetDataTwoColumn(dataCells, cumulative));

                case 3:
                    return(SetDataThreeColumn(dataCells, cumulative));

                default:
                    throw new WrongColumn();
                }
            }
            catch
            {
                throw new InvalidDataRange();
            }
        }
Esempio n. 2
0
 private void Report()
 {
     try
     {
         Model.MakeResult();
         IOOperation.GetInstance().MakeReport(Model);
     }
     catch (AlreadyExistSheetName)
     {
         MessageBox.Show("This sheet name has already been used.");
     }
 }