예제 #1
0
        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);
        }
예제 #2
0
        /// <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);
        }
예제 #3
0
        /// <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);
        }
예제 #4
0
        /// <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);
        }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }
예제 #7
0
        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);
        }
예제 #8
0
        /// <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);
        }
예제 #9
0
        /// <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);
        }
예제 #10
0
        /// <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);
        }
예제 #11
0
        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);
        }
예제 #12
0
        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);
        }
예제 #13
0
        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);
        }
예제 #14
0
        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);
        }
예제 #15
0
 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();
     }
 }
예제 #16
0
 public bool UpdateConventionApply(Conventionapply conventionApply)
 {
     using (var context = new oaContext())
     {
         try
         {
             context.Conventionapply.Update(conventionApply);
         }
         catch
         {
             return(false);
         }
         context.SaveChanges();
     }
     return(true);
 }
예제 #17
0
 public bool Update(Awardpunish awardPunish)
 {
     using (var context = new oaContext())
     {
         try
         {
             context.Awardpunish.Update(awardPunish);
         }
         catch
         {
             return(false);
         }
         context.SaveChanges();
     }
     return(true);
 }
예제 #18
0
 public bool UpdateMaterialApply(Materialapply materialApply)
 {
     using (var context = new oaContext())
     {
         try
         {
             context.Materialapply.Update(materialApply);
         }
         catch
         {
             return(false);
         }
         context.SaveChanges();
     }
     return(true);
 }