Пример #1
0
 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;
     }
 }
Пример #2
0
 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;
     }
 }
Пример #3
0
 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;
     }
 }
Пример #4
0
        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;
            }
        }