private bool IsCurrentShift(IsolatorShift p) { var st = Convert.ToDateTime(p.StartTime); var et = Convert.ToDateTime(p.EndTime); if (et < st) { st = st.AddDays(-1); } var stat1 = st <= DateTime.Now; var stat2 = et >= DateTime.Now; return(stat1 && stat2); }
public static GridRow BindShiftGridData(IsolatorShift source) { var row = new GridRow { IdentityValue = source.ShiftId, }; row.AddCell(source.ShiftTitle); row.AddCell(source.StartTime); row.AddCell(source.EndTime); row.AddActionIcon("fa fa-edit text-success", "Click to view/edit"); row.AddActionIcon("fa fa-trash text-danger", "Click to delete"); return(row); }