public static async Task InsertSectionAsync() { await SectionTable.InsertSection(CommandInsertModel.InsertSection()); SectionContextList.Add(CommandModel.GetSectionContext()); return; }
public static async Task InsertDocumentAsync(string DateOfDoc, string MembersEdipi, string FilePath) { string fileName = CommandModel.GetDocTypeContext() + "." + MembersEdipi + "." + CommandModel.GetSectionContext() + "." + DateOfDoc + ".pdf"; Task <string> SaveFile = Task.Run(() => FileOperation.CopyFile(fileName, "Member Documents" + @"\" + MembersEdipi, FilePath)); string FileSaveLocation = await SaveFile; Task InsertDocument = Task.Run(() => DocumentTable.InsertDocument(CommandInsertModel.InsertDocument(MembersEdipi, DateOfDoc, FileSaveLocation))); await InsertDocument; }