示例#1
0
 public ENResult delete(uspPUSupplierSearch_Result data)
 {
     try
     {
         using (erpStoreEntities db = new erpStoreEntities())
         {
             db.uspPUSupplierDelete(data.idSupplier, PUser, PReturnCode, PReturnMessage);
             return(new ENResult(Convert.ToInt32(PReturnCode.Value), Convert.ToString(PReturnMessage.Value)));
         }
     }
     catch (Exception ex)
     {
         return(PUnexpectedError(ex));
     }
 }
示例#2
0
 public ENResult update(uspPUSupplierSearch_Result data)
 {
     try
     {
         using (erpStoreEntities db = new erpStoreEntities())
         {
             db.uspPUSupplierUpdate(data.idSupplier, data.name, data.documentType, data.documentNumber, data.address,
                                    data.phoneNumber, data.email, data.contactPerson, PUser, PReturnCode, PReturnMessage);
             return(new ENResult(Convert.ToInt32(PReturnCode.Value), Convert.ToString(PReturnMessage.Value)));
         }
     }
     catch (Exception ex)
     {
         return(PUnexpectedError(ex));
     }
 }