public Conventionapply QueryConventionById(int id) { Conventionapply convention = null; using (var context = new oaContext()) { convention = context.Conventionapply.FirstOrDefault(x => x.Id == id); context.SaveChanges(); } return(convention); }
/// <summary> /// 根据帐号查询教师信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public Teacherpassword Query(string id) { Teacherpassword teacher = null; using (var context = new oaContext()) { teacher = context.Teacherpassword.FirstOrDefault(x => x.Teacherid.Equals(id)); context.SaveChanges(); } return(teacher); }
/// <summary> /// 查询学生信息 /// </summary> /// <param name="Sid"></param> /// <returns></returns> public Student QueryStudentById(string Sid) { Student student = null; using (var context = new oaContext()) { student = context.Student.FirstOrDefault(x => x.Id == Sid); context.SaveChanges(); } return(student); }
/// <summary> /// 根据登录账号查询教师信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public Teacherinfomation QueryTeacherInformation(string id) { Teacherinfomation teacher = null; using (var context = new oaContext()) { teacher = context.Teacherinfomation.FirstOrDefault(x => x.Teacherid == id); context.SaveChanges(); } return(teacher); }
public Awardpunish QueryAwardPunishById(int id) { Awardpunish award = null; using (var context = new oaContext()) { award = context.Awardpunish.FirstOrDefault(x => x.Id == id); context.SaveChanges(); } return(award); }
public Materialapply QueryMaterialById(int id) { Materialapply material = null; using (var context = new oaContext()) { material = context.Materialapply.FirstOrDefault(x => x.Id == id); context.SaveChanges(); } return(material); }
public Awardpunish QueryAwardPunishDetail(int id) { Awardpunish awardpunish = new Awardpunish(); using (var context = new oaContext()) { awardpunish = context.Awardpunish.FirstOrDefault(x => x.Id == id); context.SaveChanges(); } return(awardpunish); }
/// <summary> /// 查询教师所在部门 /// </summary> /// <param name="id"></param> /// <returns></returns> public Section QuerySection(string id) { Section section; using (var context = new oaContext()) { section = context.Section.FirstOrDefault(x => x.Id == id); context.SaveChanges(); } return(section); }
/// <summary> /// 查询奖惩信息 /// </summary> /// <returns></returns> public List <Awardpunish> QueryAwardPunish() { List <Awardpunish> awardpubishlist = new List <Awardpunish>(); using (var context = new oaContext()) { awardpubishlist = (from u in context.Awardpunish select u).ToList(); context.SaveChanges(); } return(awardpubishlist); }
/// <summary> /// 查询所有的会议申请 /// </summary> /// <returns></returns> public List <Conventionapply> QueryConventionapply() { List <Conventionapply> conventionlist = new List <Conventionapply>(); using (var context = new oaContext()) { conventionlist = (from u in context.Conventionapply select u).ToList(); context.SaveChanges(); } return(conventionlist); }
public List <Plantable> QueryAllFile() { List <Plantable> fileOrder = new List <Plantable>(); using (oaContext context = new oaContext()) { fileOrder = (from u in context.Plantable select u).ToList(); context.SaveChanges(); } return(fileOrder); }
public List <Materialapply> QueryMaterialApply() { List <Materialapply> materialList = new List <Materialapply>(); using (var context = new oaContext()) { materialList = (from u in context.Materialapply select u).ToList(); context.SaveChanges(); } return(materialList); }
public List <Teacherinfomation> QueryAllTeacher() { List <Teacherinfomation> teacherList = new List <Teacherinfomation>(); using (var context = new oaContext()) { teacherList = (from u in context.Teacherinfomation select u).ToList(); context.SaveChanges(); } return(teacherList); }
public List <Plantable> QueryFile(string teacherid) { List <Plantable> fileOrder = new List <Plantable>(); using (oaContext context = new oaContext()) { fileOrder = (from u in context.Plantable where u.Teacherid.Equals(teacherid) select u).ToList(); context.SaveChanges(); } return(fileOrder); }
public void Upload(string fileAddress, string fileName, string teacherId, string issue) { using (oaContext context = new oaContext()) { Plantable upload = new Plantable(); upload.Filepath = fileAddress; upload.Filename = fileName; upload.Teacherid = teacherId; upload.Committime = DateTime.Now; upload.Issue = issue; context.Plantable.Add(upload); context.SaveChanges(); } }
public bool UpdateConventionApply(Conventionapply conventionApply) { using (var context = new oaContext()) { try { context.Conventionapply.Update(conventionApply); } catch { return(false); } context.SaveChanges(); } return(true); }
public bool Update(Awardpunish awardPunish) { using (var context = new oaContext()) { try { context.Awardpunish.Update(awardPunish); } catch { return(false); } context.SaveChanges(); } return(true); }
public bool UpdateMaterialApply(Materialapply materialApply) { using (var context = new oaContext()) { try { context.Materialapply.Update(materialApply); } catch { return(false); } context.SaveChanges(); } return(true); }