public IActionResult ApproveStatus(int[] Ids) { foreach (int Id in Ids) { ArrivingFromChina arrivingFromChina = _unitOfWork.ArrivingFromChina.GetAll().Where(a => a.Id == Id).FirstOrDefault(); arrivingFromChina.UpdatedByAdmin = true; _unitOfWork.Save(); } return(View()); }
public IActionResult UpdateArrivingFromChina(long Id) { ArrivingFromChina arrivingFromChina = _unitOfWork.ArrivingFromChina.GetAll().Where(a => a.Id == Id).FirstOrDefault(); ArrivingFromChinaVM arrivingFromChinaVM = new ArrivingFromChinaVM() { arrivingFromChina = arrivingFromChina, ProductList = _unitOfWork.Product.GetAll().OrderBy(a => a.ProductName). Select(i => new SelectListItem { Text = i.ProductName, Value = i.Id.ToString() }) }; return(View(arrivingFromChinaVM)); }