$rstf->setDeleted(TRUE);
                         $rstf->Save();
                     } else {
                         unset($week_row[$week_row_id]);
                     }
                 }
             }
         }
         if ($redirect == 0) {
             $rstcf->CommitTransaction();
             //$rstcf->FailTransaction();
             Redirect::Page(URLBuilder::getURL(NULL, 'RecurringScheduleTemplateControlList.php'));
             break;
         }
     }
     $rstcf->FailTransaction();
 case 'delete':
     if (count($ids) > 0) {
         foreach ($ids as $rst_id) {
             if ($rst_id > 0) {
                 Debug::Text('Deleting Week Row ID: ' . $rst_id, __FILE__, __LINE__, __METHOD__, 10);
                 $rstlf = new RecurringScheduleTemplateListFactory();
                 $rstlf->getById($rst_id);
                 if ($rstlf->getRecordCount() == 1) {
                     foreach ($rstlf as $rst_obj) {
                         $rst_obj->setDeleted(TRUE);
                         if ($rst_obj->isValid()) {
                             $rst_obj->Save();
                         }
                     }
                 }