var cal = from cals in db.calendar
from ds in db.relativedoc
where cals.year_coop == year && cals.doc_id_fk == ds.doc_id && cals.maj_fk == nummaj
orderby cals.cal_dstart
select new
{
id = cals.cal_id,
name = cals.cal_name,
dstart = cals.cal_dstart,
dend = cals.cal_dend,
response = cals.cal_response,
doc = ds.doc_name
};
gvcalendar.DataSource = cal.ToList();
gvcalendar.DataBind();