Esempio n. 1
0
 public void UpdateSupplier(SUPPLIER item)
 {
     using (PODbEntities1 context = new PODbEntities1())
     {
         context.Entry(item).State = System.Data.Entity.EntityState.Modified;
         context.SaveChanges();
     }
 }
Esempio n. 2
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());
     }
 }