public ReportsPDFCommonView(string pathContentPDFCssStyle, int groupById, PDFCell valueForPeriodCell) { PatchCssStyle = pathContentPDFCssStyle; PDFGrandModel = new ReportsPDFGrandGridView(); GroupById = groupById; PeriodCell = valueForPeriodCell; }
private PDFCell GetPeriodPDFCell() { var dateFormat = new GetDateFormat().GetDateFormaDotNetById(DateFormatId); var pdfCell = new PDFCell { NameDefault = "PeriodName", NameDisplay = "Period: ", Value = DateFrom.ToString(dateFormat) + " - " + DateTo.ToString(dateFormat), }; return(pdfCell); }
private PDFCell GetNameDisplayForTotalHeaderPDF(PropertyInfo prop, string value) { var PDFcell = new PDFCell { NameDisplay = prop.Name, NameDefault = prop.Name }; #region Grand headers if (prop.Name == ExternalProperties.GrandActualTime.ToString()) { PDFcell.NameDisplay = "Grand Actual Time: "; return(PDFcell); } if (prop.Name == ExternalProperties.GrandEstimatedTime.ToString()) { PDFcell.NameDisplay = "Grand Estimated Time: "; return(PDFcell); } #endregion #region Total headers if (prop.Name == InternalProperties.TotalActualTime.ToString()) { PDFcell.NameDisplay = "Total Actual Time: "; return(PDFcell); } if (prop.Name == InternalProperties.TotalEstimatedTime.ToString()) { PDFcell.NameDisplay = "Total Estimated Time: "; return(PDFcell); } if (prop.Name == InternalProperties.ClientName.ToString() && value == Constants.WithoutClient.Name) { PDFcell.NameDisplay = string.Empty; return(PDFcell); } if (prop.Name == InternalProperties.TimeEntryName.ToString()) { PDFcell.NameDisplay = string.Empty; return(PDFcell); } #endregion #region Entity headers if (prop.Name == InternalProperties.ProjectName.ToString()) { PDFcell.NameDisplay = "Project"; if (GroupById == (int)Constants.ReportsGroupBy.Project) { PDFcell.NameDisplay = PDFcell.NameDisplay + ": "; } return(PDFcell); } if (prop.Name == InternalProperties.ClientName.ToString()) { PDFcell.NameDisplay = "Client"; if (GroupById == (int)Constants.ReportsGroupBy.Client) { PDFcell.NameDisplay = PDFcell.NameDisplay + ": "; } return(PDFcell); } if (prop.Name == InternalProperties.Date.ToString()) { PDFcell.NameDisplay = "Date"; if (GroupById == (int)Constants.ReportsGroupBy.Date) { PDFcell.NameDisplay = PDFcell.NameDisplay + ": "; } return(PDFcell); } if (prop.Name.Contains(InternalProperties.MemberName.ToString())) { PDFcell.NameDisplay = "User"; if (GroupById == (int)Constants.ReportsGroupBy.User) { PDFcell.NameDisplay = PDFcell.NameDisplay + ": "; } return(PDFcell); } if (prop.Name == InternalProperties.TaskName.ToString()) { PDFcell.NameDisplay = "Task"; return(PDFcell); } if (prop.Name == InternalProperties.Description.ToString()) { PDFcell.NameDisplay = "Notes"; return(PDFcell); } if (prop.Name == InternalProperties.ActualTime.ToString()) { PDFcell.NameDisplay = "Actual Hours"; return(PDFcell); } if (prop.Name == InternalProperties.EstimatedTime.ToString()) { PDFcell.NameDisplay = "Estimated Hours"; return(PDFcell); } if (prop.Name == InternalProperties.TimeFrom.ToString()) { PDFcell.NameDisplay = "Start"; return(PDFcell); } if (prop.Name == InternalProperties.TimeTo.ToString()) { PDFcell.NameDisplay = "Finish"; return(PDFcell); } #endregion return(PDFcell); }