public void GetDataForPersonalHome(HttpRequestBase req, Container_Notices_MyWorks_TeamWorks_Activities conTa_Notices_MyWorks_TeamWorks_Activities) { NoticeDAL noticeDal = new NoticeDAL(); bool isResume = true; noticeDal.GetNotices(isResume, null, NoticeType.NONE); noticeDal.ReturnUnitToPool(); conTa_Notices_MyWorks_TeamWorks_Activities.list_Notice = noticeDal.ListNotice; Container_List_Activity conta_Activity = new Container_List_Activity(); ActivityDAL activityDal = new ActivityDAL(); activityDal.GetActivities(conta_Activity, false, true); activityDal.ReturnUnitToPool(); conTa_Notices_MyWorks_TeamWorks_Activities.list_Activity = conta_Activity.activities; List <Work> works = new List <Work>(); List <Work> m_works = new List <Work>(); WorkDAL workDal = new WorkDAL(); for (int i = 0; i < req.Cookies.Count; ++i) { if (req.Cookies[i].Name.Contains(GLB.activity)) { workDal.GetWorks(Convert.ToInt32(req.Cookies[GLB.depId].Value), Convert.ToInt32(req.Cookies[i].Value), works, null); workDal.GetWorks(Convert.ToInt32(req.Cookies[GLB.depId].Value), Convert.ToInt32(req.Cookies[i].Value), m_works, Convert.ToInt32(req.Cookies[GLB.id].Value)); } } workDal.ReturnUnitToPool(); conTa_Notices_MyWorks_TeamWorks_Activities.list_TeamWork = works; conTa_Notices_MyWorks_TeamWorks_Activities.list_MyWork = m_works; }
public ResponseStatus GetActivities(Container_List_Activity conta_Activity, bool isHasNoActive) { activityDal = new ActivityDAL(); ResponseStatus resp = activityDal.GetActivities(conta_Activity, isHasNoActive, false); activityDal.ReturnUnitToPool(); return(resp); }
// Hämtar alla aktiviteter ur databasen. public IEnumerable <Activity> GetActivities() { return(ActivityDAL.GetActivities()); }