Ejemplo n.º 1
0
 public ActionResult CloseBid(int PropertyId)
 {
     try
     {
         if (ModelState.IsValid)
         {
             PropertyViewModel model = new PropertyViewModel(PropertyId);
             if (model.ChangeStatus(PropertyStatus.Closed))
             {
                 return(RedirectToAction("Index", "Seller"));
             }
             else
             {
                 ModelState.AddModelError("", "Status change failed.");
             }
         }
     }
     catch (Exception ex)
     {
     }
     return(RedirectToAction("Index", "Seller"));
 }
Ejemplo n.º 2
0
 public ActionResult ConfirmBid(int BidId)
 {
     try
     {
         if (ModelState.IsValid)
         {
             BidVieModel model = new BidVieModel(BidId);
             if (model.ConfirmBid())
             {
                 PropertyViewModel pvm = new PropertyViewModel(model.PropertyId);
                 pvm.ChangeStatus(PropertyStatus.Sold);
                 return(RedirectToAction("Index", "Seller"));
             }
             else
             {
                 ModelState.AddModelError("", "Status change failed.");
             }
         }
     }
     catch (Exception ex)
     {
     }
     return(RedirectToAction("Index", "Seller"));
 }