private HtmlAttributes CreateEventAttributes(CalendarCell calendarCell, CellRow cell) { var style = $"{GetColumnStyle(calendarCell.Column, cell.Span)} {GetRowStyle(calendarCell.Row + cell.Row - 1)}"; return(new HtmlAttributes( $"task task--info", style, otherAttributes: new Dictionary <string, string> { { "data-id", cell.Event.Id.ToString() } })); }
private string GetRowTitle(int i, string eventTitle, CalendarCell calendarCell) { var rowTitle = i == 0 ? eventTitle : string.Empty; if (calendarCell.Column == 1 && i > 0) { rowTitle = $"{eventTitle} Cont.."; } return(rowTitle); }
private int GetSpan(CalendarCell currentCel, int totalSpan) { var column = currentCel.Column; var span = 0; for (int i = 0; i < totalSpan; i++, column++, span++) { if (column == 8) { return(span); } } return(span); }