示例#1
0
        public DEPT GetDept(String dept_no)
        {
            int  no   = int.Parse(dept_no);
            DEPT dept = (from data in e.DEPT
                         where data.DEPT_NO == no
                         select data).FirstOrDefault();

            return(dept);
        }
示例#2
0
        public void Update(DEPT dept)
        {
            DEPT d = (from data in e.DEPT
                      where data.DEPT_NO == dept.DEPT_NO
                      select data).FirstOrDefault();

            d.DNOMBRE = dept.DNOMBRE;
            d.LOC     = dept.LOC;
            e.SaveChanges();
        }
示例#3
0
        public void Create(DEPT dept)
        {
            int id = (from data in e.DEPT
                      orderby data.DEPT_NO descending
                      select data.DEPT_NO).FirstOrDefault();

            dept.DEPT_NO = id + 10;
            e.DEPT.Add(dept);
            e.SaveChanges();
        }
示例#4
0
 public void InsertarDepartamento(DEPT departamento)
 {
     this.entidad.DEPT.Add(departamento);
     this.entidad.SaveChanges();
 }