Hello Everyone,
I got an employee_Works table with columns eid,ename,sdate,edate,wages/day.Now I need to calculate his salary based on sdate and edate. Below are the steps what I followed :
In addition to the other columns i added a boundfiled to gridview manually for salary because it's not a column in this table.I am not sure whether i can do it manually or not.Now I calculated the difference between the dates.
DateTime d1 = DateTime.Parse(sdate);
DateTime d2 = DateTime.Parse(edate);
TimeSpan ds = d2 -d1;DateTime d1 = DateTime.Parse(sdate);
DateTime d2 = DateTime.Parse(edate);
TimeSpan ds = d2 -d1;
float sal = ds * wages;
Now I need to assign this value to the grid view for Salary cell.Let me know how to proceed?