예제 #1
0
 public void UpdateSupplier(SUPPLIER item)
 {
     using (PODbEntities1 context = new PODbEntities1())
     {
         context.Entry(item).State = System.Data.Entity.EntityState.Modified;
         context.SaveChanges();
     }
 }
예제 #2
0
 public void DeleteSupplier(string id)
 {
     using (PODbEntities1 context = new PODbEntities1())
     {
         context.SUPPLIERs.Remove(
             context.SUPPLIERs.Where(e => e.SUPLNO == id).FirstOrDefault());
         context.SaveChanges();
     }
 }
예제 #3
0
 public void AddSupplier(SUPPLIER item)
 {
     try
     {
         using (PODbEntities1 context = new PODbEntities1())
         {
             context.SUPPLIERs.Add(item);
             context.SaveChanges();
         }
     }
     catch (Exception e)
     {
         throw new Exception(e.Message.ToString());
     }
 }