public IContentReader GetCurrentDescriptorContent() { var current = _folder.GetBlockBlobReference(FileNameMaker.CurrentFileName()).DownloadTextAsync().Result .Trim(); if (string.IsNullOrEmpty(current)) { throw new InvalidDataException("bad CURRENT file"); } return(new StreamContentReader(_folder.GetBlockBlobReference(current).OpenReadAsync().Result)); }
private void MakeReport(ReportType type) { DateTime day = ScheduleView.SelectedSlot.Start; DateTime from = day.GetFirstDayOfWeek(); DateTime to = day.GetLastDayOfWeek(); CheckFlag selectedFlag = (CheckFlag)CheckStatusComboBox.SelectedItem; Department selectedDepartment = (DepartmentComboBox.SelectedItem as Department); Bank selectedBank = (BankComboBox.SelectedItem as Bank); ReportParameter param = new ReportParameter() { Type = type, CheckFlag = selectedFlag, DepartmentId = selectedDepartment.Id, BankId = (int)selectedBank.Id, DepartmentName = selectedDepartment.Name, BankName = selectedBank.BankName, Day = day, From = from, To = to }; FileNameMaker maker = new FileNameMaker(param); string fileName = maker.GetFileName(); SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.Filter = "Excel Documents (*.xlsx)|*.xlsx"; saveFileDialog.FileName = fileName; if (saveFileDialog.ShowDialog() == true) { try{ ExportReport(param, saveFileDialog.FileName); MessageBox.Show("Report Generated!"); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error Exporting Report"); } } }
public string TableFileName(ulong number) { return(FullPath(FileNameMaker.TableFileName(number))); }
public string DescriptorFileName(ulong number) { return(FullPath(FileNameMaker.DescriptorFileName(number))); }
public string CurrentFileName() { return(FullPath(FileNameMaker.CurrentFileName())); }
public IContentReader GetTableContentById(ulong num) { return(new BlockBlobContentReader(_folder.GetBlockBlobReference(FileNameMaker.TableFileName(num)))); }