aggiunto metodo scambia x scambiare le 2 locazioni
This commit is contained in:
@@ -29,27 +29,35 @@ namespace StockManMVC.Controllers
|
||||
return View(vLocationVal.ToList());
|
||||
}
|
||||
|
||||
//[HttpPost]
|
||||
//public ActionResult Index(string LocationID_SX, string LocationID_DX)
|
||||
//{
|
||||
// if (LocationID_SX == null) LocationID_SX = "";
|
||||
// if (LocationID_DX == null) LocationID_DX = "";
|
||||
// ViewBag.SelSX = LocationID_SX;
|
||||
// ViewBag.SelDX = LocationID_DX;
|
||||
// return View(Index());
|
||||
//}
|
||||
|
||||
// GET: MagStatus
|
||||
public ActionResult StockByLocation(string LocationID)
|
||||
public ActionResult StockByLocation(string LocationID, string LocationIDTo, bool? ShowMove)
|
||||
{
|
||||
var CurrStock = db.ItemStock
|
||||
.Where(s => s.QtyConf > 0 && s.LocationID == LocationID)
|
||||
.Include(v => v.Location)
|
||||
.Include(s => s.Item);
|
||||
|
||||
if (ShowMove == null) ShowMove = false;
|
||||
|
||||
ViewBag.LocationID = LocationID;
|
||||
ViewBag.LocationIDTo = LocationIDTo;
|
||||
ViewBag.ShowMove = ShowMove;
|
||||
return PartialView("_StockByLocation",CurrStock.ToList());
|
||||
}
|
||||
|
||||
|
||||
public ActionResult Move(int ID, string LocationID, string LocationIDTo)
|
||||
{
|
||||
// chiamo la stored x il move
|
||||
|
||||
// appoggio variabili
|
||||
string SelSX = LocationIDTo;
|
||||
string SelDX = LocationID;
|
||||
// restituisco la view principale...
|
||||
return RedirectToAction("Index", new { LocationID_SX = SelSX, LocationID_DX = SelDX });
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
|
||||
Reference in New Issue
Block a user