Exemplo n.º 1
0
        private void cboLocationType_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cboStorageType.Text.Equals("CONTAINER"))
            {
                {
                    var withBlock      = cboStorage;
                    var delegationList = new List <string>();
                    delegationList.Add("STORAGE");
                    delegationList.Add("UNASSIGNED");
                    withBlock.DataSource    = ContainerService.GetByFilters("", "", "", "", "", "", delegationList, "");
                    withBlock.DisplayMember = "ContainerNumber";
                    withBlock.ValueMember   = "ContainerId";
                }

                cboStorage.SelectedValue = 0;
            }
            else if (cboStorageType.Text.Equals("BAGGER"))
            {
                {
                    var withBlock2 = cboStorage;
                    withBlock2.DataSource    = BaggerService.GetAll();
                    withBlock2.DisplayMember = "BaggerName";
                    withBlock2.ValueMember   = "BaggerId";
                }
            }
            else
            {
                {
                    var withBlock1 = cboStorage;
                    withBlock1.DataSource    = PalletService.GetAll();
                    withBlock1.DisplayMember = "PalletName";
                    withBlock1.ValueMember   = "PalletId";
                }
            }
        }
Exemplo n.º 2
0
        public object Any(PalletRequest request)
        {
            DTOResponseLayUI dtoResponseLayUi = new DTOResponseLayUI();
            PalletService    service          = new PalletService();
            DTOResponse      response         = new DTOResponse();

            if (request.ACTION == OPAction.QUERY)
            {
                response = service.GetList(request);
            }
            else if (request.ACTION == OPAction.QUERYDETAIL1)
            {
                response = service.GetDetailList(request);
            }
            else if (request.ACTION == OPAction.STAT1)
            {
                response = service.GetPalletList(request);
            }
            else
            {
                dtoResponseLayUi.code = -1;
                dtoResponseLayUi.msg  = "未定义的操作类型:" + request.ACTION.ToString();
                return(dtoResponseLayUi);
            }
            return(this.ConvertTo(response));
        }
Exemplo n.º 3
0
        public APIGatewayProxyResponse PlacePallet(LambdaRequest lambdaRequest)
        {
            var palletService      = new PalletService();
            var placePalletRequest = JsonConvert.DeserializeObject <PlacePalletRequest>(lambdaRequest.Body);

            palletService.PlacePallet(placePalletRequest);

            return(new APIGatewayProxyResponse
            {
                StatusCode = (int)HttpStatusCode.OK
            });
        }
Exemplo n.º 4
0
        public APIGatewayProxyResponse GetPallet(APIGatewayProxyRequest request)
        {
            if (request.PathParameters != null && request.PathParameters.ContainsKey("palletId") &&
                int.TryParse(request.PathParameters["palletId"], out var palletId))
            {
                var palletService     = new PalletService();
                var getPalletResposne = palletService.GetPallet(palletId);

                return(new APIGatewayProxyResponse
                {
                    StatusCode = (int)HttpStatusCode.OK,
                    Body = JsonConvert.SerializeObject(getPalletResposne)
                });
            }

            return(new APIGatewayProxyResponse
            {
                StatusCode = (int)HttpStatusCode.NotFound
            });
        }