I have a application which is on timesheet. I have total of 54 columns out of which 10 columns are visible rest invisible.
First 3 columns are Project, MileStone and Classes. Rest are Sun- Sat work hrs, TaskId, TaskDesc and so on for each day. On my grid only first 3 columns and Sun - Sat work hrs are visible, rest are invisible.
These Columns from Sun - Sat do not exists in database. They are identified on the basis of date and displayed on the grid. They exists as row in database but displayed as column over the grid.
Now I have columns named SunTaskID,MonTaskID and so on till SatTaskID for holding each days taskid[TaskID is the PK of the table from which data is pulled out. And each has its own task id.] Now on the selection of SunHrs (Sunday's Work Hrs), i retrieve that days taskid and on the basis of task id i then retrieve attachments which is displayed under a listbox.
Now the problem is that since a day can have multiple attachments and a user can attach multiple attachments at time. I am not able to hold the attachments.
For example
Project | Milestone | Class | Sunhrs | Monhrs | TueHrs | WedHrs | ThuHrs | FriHrs | satHrs
abc - xyz |sa | nyz | 11.00 | 6.00 | 0 | 0 |1 |1 | 0
abc - xyz |sa | dasdds| 1.00 | 9.00 | 16 | 10 _ |11 |11 | 10
Attachments
---------------------
|
| abc.txt
| def.pdf
|
|
|____________________
Say above is my grid and below grid, is attachment, its a listbox to hold attachments. _ is my current cursor location which is at WedHrs having value 10 [second row].
I am using BindingList(of TaskClass) in VB.Net for binding grid. I have total 54 properties n my task class. I have only 10 columns visible rest invisible whose values are retrieved programatically.
Current cell has attachment abc.txt and def.pdf. The problem is that i need to attach attachments to multiple cells before saving. But i am not able to hold. I have my task model having all properties for grid. I then on save iterates the collection and retrieves the values for each required item.
But for attachments here i need some sort of collection property in my taskmodel class to hold attachments for all days of a row.
Earlier I tried Dictionary. But i was not aware of its usage as a property so i gave. Then prepared a separate class for attachment but, it was difficult to synchronize the existing attachments with taskid...
I hope now the issue will be clear