Exemplo n.º 1
0
 public decimal AddDept(T_DEPT dept)
 {
     using (var ctx = new OAContext())
     {
         ctx.T_DEPT.Add(dept);
         return ctx.SaveChanges();
     }
 }
Exemplo n.º 2
0
 public decimal AddDept(T_DEPT dept)
 {
     var re = _ctrl.AddDept(dept);
     return re;
 }
Exemplo n.º 3
0
 public decimal UpdateDept(T_DEPT dept)
 {
     var re = _ctrl.UpdateDept(dept);
     return re;
 }
Exemplo n.º 4
0
 public decimal UpdateDept(T_DEPT dept)
 {
     using (var ctx = new OAContext())
     {
         ctx.T_DEPT.Attach(dept);
         ctx.Entry<T_DEPT>(dept).State = EntityState.Modified;
         return ctx.SaveChanges();
     }
 }