示例#1
0
 public bool Update(tblVendor obj)
 {
     try
     {
         tblVendor result = Get(obj.VendorId);
         if (result != null)
         {
             repository.Entry(result).CurrentValues.SetValues(obj);
             repository.SaveChanges();
             return(true);
         }
         return(false);
     }
     catch (Exception)
     {
         return(false);
     }
 }
 public bool Update(tblPurchaseOrderDetail obj)
 {
     try
     {
         tblPurchaseOrderDetail result = Get(obj.PODetailId);
         if (result != null)
         {
             repository.Entry(result).CurrentValues.SetValues(obj);
             repository.SaveChanges();
             return(true);
         }
         return(false);
     }
     catch (Exception)
     {
         return(false);
     }
 }