public void AddNewBidderWin(SidejobEntities context, int projectId)
 {
     var newBid = GetCurrentNewBid(projectId, NewProID);
     var newwin = new ProfessionalWinBid
                      {
                          BidID = newBid.BidID,
                          ProID = NewProID,
                          NumberofBids = GetNumberofBids(context)
                      };
     context.AddToProfessionalWinBids(newwin);
     context.SaveChanges();
 }
    public void AddNewBidderWin(SidejobEntities context, int projectId)
    {
        var newBid = GetCurrentNewBid(projectId, NewProID);
        if (newBid == null) return;
        try
        {
            var newwin = new ProfessionalWinBid
                         {
                             BidID = newBid.BidID,
                             ProID = NewProID,
                             NumberofBids = GetNumberofBids(context)
                         };
            context.AddToProfessionalWinBids(newwin);
            context.SaveChanges();

        }
        catch (Exception e)
        {

            var i = e;
        }
    }
Exemple #3
0
 public void ProWin(Bid bidder)
 {
     var context = new SidejobEntities();
     var professionalwinbid = new ProfessionalWinBid
     {
         BidID = bidder.BidID,
         ProID = bidder.BidderID,
         NumberofBids = GetProfessionalNumberofBids(bidder.BidderID)
     };
     context.AddToProfessionalWinBids(professionalwinbid);
     context.DeleteObject(bidder);
     context.SaveChanges();
 }