public List<SkuInfo> GetSkuInfo(string sku) { AdminFactory factory = new AdminFactory(); var model = factory.GetSkuInfo(sku); if (model == null) { throw new HttpResponseException( HttpErrorResponse.GetHttpErrorResponse( HttpStatusCode.NotFound, "No Sku Info", string.Format("SKU = {0} Has No Info", sku))); } return model; }
public List<JobTrackingItem> GetJobTrackingInfo(int lineId) { AdminFactory factory = new AdminFactory(); ItemDetailsModel model = new ItemDetailsModel(); var lineBuffer = (from s in factory.GetJobTrackingInfo(lineId) select new JobTrackingItem { Item = s, ItemDetail = model.GetItemInfo(s.ItemNumber) }).ToList(); return lineBuffer; }
public PalletChange GetPalletChange(int palletId) { AdminFactory factory = new AdminFactory(); var model = factory.GetPalletChange(palletId); if (model == null) { throw new HttpResponseException( HttpErrorResponse.GetHttpErrorResponse( HttpStatusCode.NotFound, "No Pallet Data", string.Format("Pallet ID = {0} Has No Data", palletId))); } return model; }
public List<RecipeBit> GetRecipeDefinition(int buildCode, int lineId) { AdminFactory factory = new AdminFactory(); var bits = factory.GetRecipeDefinition(buildCode, lineId); return bits; }
public List<RecipeBit> GetRecipesByLine(int lineId) { AdminFactory factory = new AdminFactory(); var bits = factory.GetRecipesByLine(lineId); return bits; }
public void UpdatePalletChange(PalletChangeRequest request) { AdminFactory factory = new AdminFactory(); var result = factory.UpdatePalletChange(request); if (!result.Code) { throw new HttpResponseException( HttpErrorResponse.GetHttpErrorResponse( HttpStatusCode.NotFound, "SQL Error", result.Message)); } }
public List<PalletHistorySummary> GetPalletHistorySummaryByPalletId(int palletId) { AdminFactory factory = new AdminFactory(); var history = factory.GetPalletHistorySummaryByPalletId(palletId); if (history.Count() == 0) throw new HttpResponseException( HttpErrorResponse.GetHttpErrorResponse( HttpStatusCode.NotFound, "No History Data", string.Format("Pallet ID = {0} Has No History", palletId))); return history; }
public PalletHistoryInfo GetPalletInfoByPalletId(int palletId) { AdminFactory factory = new AdminFactory(); var info = factory.GetPalletInfoByPalletId(palletId); if (info == null) { throw new HttpResponseException( HttpErrorResponse.GetHttpErrorResponse( HttpStatusCode.NotFound, "No Pallet Data", string.Format("Pallet ID = {0} Has No Data", info.PalletId))); } return info; }