public static int UpdateBid(Bid bOld, Bid bNew) { try { int i = BidAccessor.SetBid(bOld, bNew); if (i != 0) { return(i); } else { throw new ApplicationException("Record not updated! An error occured."); } } catch (Exception) { throw; } }
public static int UpdateBidStatusNewWO(int bidid, string status) { try { int i = BidAccessor.SetBidStatusNewWO(bidid, status); if (i != 0) { return(i); } else { throw new ApplicationException("Record not updated! An error occured."); } } catch (Exception) { throw; } }
public static int AddBid(Bid bNew) { try { int i = BidAccessor.NewBid(bNew); if (i != 0) { return(i); } else { throw new ApplicationException("Record not updated! An error occured."); //throw new ApplicationException(i.ToString()); } } catch (Exception) { throw; } }
public List <Bid> GetBidList() { try { var bidList = BidAccessor.FetchBid(); if (bidList.Count > 0) { return(bidList); } else { throw new ApplicationException("No records found"); } } catch (Exception) { throw; } }