public ActionResult AcceptOffer(int offerId)
        {
            Offer   offer   = _offerDal.GetOffer(offerId);
            Project project = _projectDal.GetProject(offer.ProjectId);

            project.StateId = 2;
            _projectDal.UpdateProject(project);
            _offerDal.AcceptOffer(offer);
            TempData.Add("message", String.Format("Teklif kabul edildi."));
            return(RedirectToAction("index", "Home"));
        }
Beispiel #2
0
        public IHttpActionResult Get(int id)
        {
            Offer offer = offerDal.GetOffer(id);

            if (offer != null)
            {
                return(Ok(offer));
            }
            else
            {
                return(NotFound());
            }
        }