Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 4
0
 public List<RecipeBit> GetRecipeDefinition(int buildCode, int lineId)
 {
     AdminFactory factory = new AdminFactory();
     var bits = factory.GetRecipeDefinition(buildCode, lineId);
     return bits;
 }
Exemplo n.º 5
0
 public List<RecipeBit> GetRecipesByLine(int lineId)
 {
     AdminFactory factory = new AdminFactory();
     var bits = factory.GetRecipesByLine(lineId);
     return bits;
 }
Exemplo n.º 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));
            }
        }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }