public IQueryable<SupervisionClass> Teaching_Direct_Supervision() { // Create TeachDirect TeachingDirectDataContext tcd = new TeachingDirectDataContext(); // Supervision = 3.5 * person var Supervision = from p in tcd.Supervisions //from r in tcd.SupervisionTypes //where p.SupervisionTypeId == r.SupervisionTypeId where p.UserName == username where p.DurationId == durationId select new SupervisionClass() { SupervisionId = p.SupervisionId, UserName = p.UserName, StudentCount = Convert.ToInt32(p.StudentCount), SupervisionTypeId = Convert.ToInt32(p.SupervisionTypeId) }; // TeachingDirect Result = Sum + Supervision return Supervision; }
//===================================== Teaching =============================================== // Teaching Direct public IQueryable<DirectTeachClass> Teaching_Direct_Main() { // Create TeachDirect TeachingDirectDataContext tcd = new TeachingDirectDataContext(); // TeachingDirectTable var TeachingDirectTable = from p in tcd.DirectTeaches where p.UserName == username where p.DurationId == durationId select new DirectTeachClass() { DirectTeachId = p.DirectTeachId, UserName = p.UserName, CourseName = p.CourseName, StudentCount = Convert.ToInt32(p.StudentCount), StudentGroup = p.StudentGroup, TheoryCredit = Convert.ToInt32(p.TheoryCredit), PracticeCredit = Convert.ToInt32(p.PracticeCredit), TheoryHours = Convert.ToInt32(p.TheoryHours), PracticeHours = Convert.ToInt32(p.PracticeHours), PracticeRate = 1.75 }; return TeachingDirectTable; }