Example #1
0
        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;
        }
Example #2
0
        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;
        }
Example #3
0
        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;
        }
Example #4
0
 public List<RecipeBit> GetRecipeDefinition(int buildCode, int lineId)
 {
     AdminFactory factory = new AdminFactory();
     var bits = factory.GetRecipeDefinition(buildCode, lineId);
     return bits;
 }
Example #5
0
 public List<RecipeBit> GetRecipesByLine(int lineId)
 {
     AdminFactory factory = new AdminFactory();
     var bits = factory.GetRecipesByLine(lineId);
     return bits;
 }
Example #6
0
        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));
            }
        }
Example #7
0
 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;
 }
Example #8
0
 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;
 }