update db + fix x gestione movimenti!!!
This commit is contained in:
@@ -43,17 +43,30 @@ namespace StockManMVC.Controllers
|
||||
ViewBag.LocationID = LocationID;
|
||||
ViewBag.LocationIDTo = LocationIDTo;
|
||||
ViewBag.ShowMove = ShowMove;
|
||||
return PartialView("_StockByLocation",CurrStock.ToList());
|
||||
return PartialView("_StockByLocation", CurrStock.ToList());
|
||||
}
|
||||
|
||||
|
||||
public ActionResult Move(int ID, string LocationID, string LocationIDTo)
|
||||
{
|
||||
// recupero operatore...
|
||||
IEnumerable<Operator> listOper = OperatorsController.Select(User.Identity.Name);
|
||||
string currOperID = "ND";
|
||||
if (listOper.Count() == 1)
|
||||
{
|
||||
currOperID = listOper.First().ID;
|
||||
}
|
||||
|
||||
// chiamo la stored x il move
|
||||
using (var ctx = new StockManEntities())
|
||||
{
|
||||
// esegue stored procedure come function, SE id == 0 processa TUTTI...
|
||||
int rowMod = ctx.stp_ItemStockMove(ID, LocationID, LocationIDTo, currOperID);
|
||||
}
|
||||
|
||||
// appoggio variabili
|
||||
string SelSX = LocationIDTo;
|
||||
string SelDX = LocationID;
|
||||
string SelSX = LocationID;
|
||||
string SelDX = LocationIDTo;
|
||||
// restituisco la view principale...
|
||||
return RedirectToAction("Index", new { LocationID_SX = SelSX, LocationID_DX = SelDX });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user