public void processSheet(string tabName, int branchId)
 {
     if (Util.CheckForSheet(tabName, _wb))
     {
         ITableEditor o = WeeklySheetFactory.CreateSheet(tabName);
         if (o != null)
         {
             o.EditTable(_wb.GetSheet(tabName), branchId);
         }
         else
         {
             throw new Exception("Object is null");
         }
     }
     else
     {
         throw new Exception("Sheet does not exist");
     }
 }
Exemple #2
0
        static public ITableEditor CreateSheet(String sheetName)
        {
            ITableEditor sheetChoser = null;

            switch (sheetName)
            {
            case "Hives":
                sheetChoser = new WeeklyProcessing.EditHivesTable();
                break;

            case "Weekly Observations":
                sheetChoser = new WeeklyProcessing.EditObservationsTable();
                break;

            case "Weekly Data":
                sheetChoser = new WeeklyProcessing.EditWeeklyDataTable();
                break;
            }

            return(sheetChoser);
        }