How could I view absent and present with unique color code in winform C# gridview -


i have table(payroll_attendancestatus) contains 4 columns

====================================== statusid | status | shortname | color ======================================    01    | present|     p     |  yellow    02    | absent |         |  red ======================================= 

from above mentioned table used mark day wise attendance table (payrollmarkattendance)and contains values

==================================================== markid  |  employee_code  |  statusid  |  datetime ==================================================== 1       |        001      |    01      |  2016-06-11 2       |        002      |    02      |  2016-06-11 ==================================================== 

for view using pivot table , code pivot table

select * (select [employeename] ,[employee_code]  ,[shortname],  datename(m, [datetime])as [month]  ,day([datetime]) [dayvalue] [view_payrollmarkattendance]) composite pivot (max([shortname]) [dayvalue] in ([1], [2], [3], [4],[5], [6], [7], [8], [9],[10], [11], [12], [13], [14],[15], [16], [17], [18], [19],[20], [21], [22], [23], [24],[25], [26], [27], [28], [29],[30],[31])) pivottable 

through pivottable can view status quite good. want view absent , present through unique code color. absent red , present yellow.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -