internal PickingAreaLocationCountMatrixViewModel(PickingArea area) { _counts = new BoolArrayTwoDimensional(); AreaId = area.AreaId; _counts[null, null] = area.LocationCount; _counts[true, null] = area.CountAssignedLocations; _counts[true, true] = area.CountEmptyAssignedLocations; _counts[false, true] = area.CountEmptyUnassignedLocations; _counts[null, true] = area.CountEmptyLocations; _counts[true, false] = area.CountNonemptyAssignedLocations; _counts[false, false] = area.CountNonemptyUnassignedLocations; _counts[false, null] = area.CountUnassignedLocations; _counts[null, false] = area.CountNonemptyLocations; }
public virtual ActionResult UpdatePickingArea(PickingAreaViewModel model) { try { var updatePickingAreas = new PickingArea { AreaId = model.AreaId, Description = model.Description, IsPickingArea = model.IsPickingArea, IsRestockArea = model.IsRestockArea, IsShippingArea = model.IsShippingArea, LocationNumberingFlag = model.LocationNumberingFlag //TODO:How to update,not implemented in repository yet. }; _service.UpdatePickingArea(updatePickingAreas); AddStatusMessage(string.Format("Picking Area {0} successfully updated", updatePickingAreas.ShortName)); } catch (DbException ex) { ModelState.AddModelError("", ex.Message); } return(RedirectToAction(MVC_CartonAreas.CartonAreas.Home.PickingArea(model.BuildingId))); }