Esempio n. 1
0
 public static string CreateLot(CreateLotModel model, string ownername, object image)
 {
     try
     {
         if (dataAccess.CreateLot(ownername, model.Name, model.Description, model.ActualDate, model.StartCurrency, model.SelectedIds,image)) ;
         return null;
     }
     catch (Exception e)
     {
         return e.InnerException.Message;
     }
 }
Esempio n. 2
0
 public ActionResult CreateLot(CreateLotModel model)
 {
     object image = Request.Files[0];
     if (ModelState.IsValid)
     {
         if (Auction.CreateLot(model,HttpContext.User.Identity.Name, image))
         {
             return RedirectToAction("Index", "Home");
         }
     }
     ModelState.AddModelError("","");
     return View(model);
 }
Esempio n. 3
0
 public ActionResult CreateLot(CreateLotModel model)
 {
     object image = Request.Files[0];
     if (ModelState.IsValid)
     {
         var errormsg = Auction.CreateLot(model, HttpContext.User.Identity.Name, image);
         if (String.IsNullOrWhiteSpace(errormsg))
         {
             return RedirectToAction("Index", "Home");
         }
         ModelState.AddModelError("", errormsg);
     }
     return View(model);
 }
Esempio n. 4
0
 public static bool CreateLot(CreateLotModel model, string ownername, object image)
 {
     return dataAccess.CreateLot(ownername,model.Name, model.Description, model.ActualDate, model.Currency,model.LotType, image);
 }