Beispiel #1
0
        public Task MoveRow(int fromRow, int toRow, bool active)
        {
            LastEditedDateTime = DateTime.Now;
            TaskSheet sheet = GetSheet(active);

            return(sheet.MoveRow(ProjectIndex(fromRow), ProjectIndex(toRow)));
        }
Beispiel #2
0
        private void OpenProjectXLSX()
        {
            FileInfo     file         = new FileInfo(FullPath);
            ExcelPackage excelPackage = new ExcelPackage(file);

            activeSheet   = new TaskSheet(excelPackage, ACTIVE_SHEET_NAME, true);
            inactiveSheet = new TaskSheet(excelPackage, INACTIVE_SHEET_NAME, false);
            config        = new ConfigSheet(excelPackage);
        }
Beispiel #3
0
 private void OpenProjectXML()
 {
     try
     {
         MSExcel2003XmlFile xmlFile = new MSExcel2003XmlFile(FullPath);
         activeSheet   = new TaskSheet(xmlFile, ACTIVE_SHEET_NAME, isActive: true);
         inactiveSheet = new TaskSheet(xmlFile, INACTIVE_SHEET_NAME, isActive: false);
         config        = new ConfigSheet(xmlFile);
     }
     catch
     {
         CreateNewProject();
         return;
     }
 }
Beispiel #4
0
        public StatusChangeResult UpdateStatus(int row, string status, bool active)
        {
            LastEditedDateTime = DateTime.Now;
            TaskSheet selectedSheet = GetSheet(active);
            TaskSheet otherSheet    = GetSheet(!active);

            StatusChangeResult result = selectedSheet.UpdateStatus(ProjectIndex(row), status, config.ActiveStatuses);

            if (result.ActiveInactiveChanged)
            {
                Task task = selectedSheet.GetTask(ProjectIndex(row));
                task.DoneDate = DateTime.Now;
                otherSheet.InsertTask(0, task);
                selectedSheet.RemoveTask(ProjectIndex(row));
            }

            return(result);
        }
Beispiel #5
0
 private void CreateNewProject()
 {
     config        = new ConfigSheet();
     activeSheet   = new TaskSheet(isActive: true);
     inactiveSheet = new TaskSheet(isActive: false);
 }