Esempio n. 1
0
 protected BaseEntityManager()
 {
     Entities = new COATEntities();
 }
Esempio n. 2
0
        public void UploadAndImport(HttpPostedFileBase file, string taskType)
        {
            if (file == null || file.ContentLength == 0)
                return;

            FileStore fs = _fHelper.SaveRawDateFile(file);
            //stRunner.AddTask(new ImportTask { Type = taskType, FilePath = fs.FilePath });

            var task = new COATImportTask {Type = taskType, FilePath = fs.FilePath};
            var db = new COATEntities();
            db.ImportTasks.AddObject(task.ImportTask);
            db.SaveChanges();
            task.Run(null);
            task.Success();
            db.SaveChanges();
        }