Exemple #1
0
        private async Task SetUpDefaultDirectory()
        {
            LocationTextBox.Text = await Task.Run(() =>
            {
                var dataFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData, Environment.SpecialFolderOption.Create);
                var location       = Path.Combine(dataFolderPath, "LASI", "Projects");
                if (!Directory.Exists(location))
                {
                    Directory.CreateDirectory(location);
                }
                return(location);
            });

            LocationTextBox.ScrollToEnd();
            LocationTextBox.TextChanged += (s, e) => LocationTextBox.ScrollToEnd();
        }
Exemple #2
0
    protected void LinkButton2_Click(object sender, EventArgs e)
    {
        Valid = new Validation();
        if (BoxID != "")
        {
            if (Valid.IsValidOrder(BoxID) == true)
            {
                BoxScanGroup.Attributes["class"] = "form-group has-success";
                CartonUpdatePanel.Visible        = true;
                ProductPanel.Visible             = true;
                LocationPanel.Visible            = true;
                QuantityPanel.Visible            = true;
                CartonPanel.Visible = true;
                // string shipmentID = Valid.GetShipmentID(BoxID);
                // string orderNumber = Valid.GetOrderNumber(BoxID);
                LocationTextBox.Focus();

                if (Panel2.Visible == true && Valid.IsValidOrder(BoxID) == true && CheckBox1.Checked == false)
                {
                    PickTicketDataSource.SelectCommand = "SELECT PRODUCT_MASTER.DESCRIPTION, PRODUCT_MASTER.SHORT_DESCRIPTION, PRODUCT_MASTER.PIECE_PICK_LOCATION as from_location, OUTBOUND_SHIPMENT_DETAILS.ORDER_LINE, OUTBOUND_SHIPMENT_DETAILS.Ordered_units as quantity FROM OUTBOUND_SHIPMENT_DETAILS INNER JOIN PRODUCT_MASTER ON OUTBOUND_SHIPMENT_DETAILS.PRODUCT_ID = PRODUCT_MASTER.PRODUCT_ID where OUTBOUND_SHIPMENT_DETAILS.shipment_id='" + Valid.GetShipmentID(BoxID) + "' and OUTBOUND_SHIPMENT_DETAILS.order_Number='" + Valid.GetOrderNumber(BoxID) + "'and OUTBOUND_SHIPMENT_DETAILS.UOM='EA' order by Product_master.Piece_pick_location";
                }
                if (Panel2.Visible == true && Valid.IsValidOrder(BoxID) == true && CheckBox1.Checked == true)
                {
                    PickTicketDataSource.SelectCommand = "select MQ.order_line, MQ.FROM_LOCATION,PM.DESCRIPTION,PM.short_description,  Sum(MQ.QUANTITY_REQUIRED) as quantity From Move_queue MQ (NOLOCK),  inventory INV (NOLOCK), Locations L (NOLOCK), Product_Master PM (NOLOCK) Where (INV._RID_ = MQ.INV_RID) And (PM.PRODUCT_ID = INV.PRODUCT_ID) And (MQ.FROM_LOCATION = L.LOCATION_ID) And (MQ.TYPE = 'PICK') And (MQ.LABELLEVEL = 'EA') And  L.PICKING_ZONE = '" + CurrentZone + "' And (MQ.SHIPMENT_ID = '" + Valid.GetShipmentID(BoxID) + "') And (MQ.ORDER_NUMBER = '" + Valid.GetOrderNumber(BoxID) + "') Group By MQ.SHIPMENT_ID, MQ.ORDER_NUMBER, MQ.ORDER_LINE, MQ.LABELLEVEL, ISNULL(INV.CASELABEL, ''), INV.PRODUCT_ID,PM.description, PM.SHORT_DESCRIPTION, L.PICKING_ZONE, L.LOCATION_GROUP, MQ.FROM_LOCATION, PICK_SEQUENCE, TO_LOCATION Order By L.LOCATION_GROUP, FROM_LOCATION";
                }



                CartonUpdatePanel.Update();
                //  PickUpdatePannel.Update();
            }
            else
            {
                BoxScannTextBox.Text = "";
                BoxScannTextBox.Attributes["placeholder"] = "Shipment ID is not valid";
                BoxScannTextBox.Text             = "";
                BoxScanGroup.Attributes["class"] = "form-group has-error";
            }
        }
        else
        {
            BoxScannTextBox.Text = "";
            BoxScannTextBox.Attributes["placeholder"] = "Please Scan an order";
            BoxScanGroup.Attributes["class"]          = "form-group has-error";
        }
    }
        private void Haifa_Click(object sender, RoutedEventArgs e)
        {
            LocationTextBox.Text = "Haifa";
            LocationTextBox.GetBindingExpression(TextBox.TextProperty).UpdateSource();

            LocationTextBox.Focus();

            KeyEventArgs ke = new KeyEventArgs(
                Keyboard.PrimaryDevice,
                Keyboard.PrimaryDevice.ActiveSource,
                0,
                Key.Enter)
            {
                RoutedEvent = UIElement.KeyDownEvent
            };

            InputManager.Current.ProcessInput(ke);
        }
 //TODO: Iterate through properties and dynamically generate controls at runtime.
 private void InitDBControls()
 {
     EntryTimeTextBox.SetDBInfo(HistoricalDevicesCols.ActionDateTime, ParseType.DisplayOnly, false);
     ActionUserTextBox.SetDBInfo(HistoricalDevicesCols.ActionUser, ParseType.DisplayOnly, false);
     ChangeTypeTextBox.SetDBInfo(HistoricalDevicesCols.ChangeType, Attributes.DeviceAttributes.ChangeType, ParseType.DisplayOnly, false);
     DescriptionTextBox.SetDBInfo(HistoricalDevicesCols.Description, ParseType.DisplayOnly, false);
     GuidTextBox.SetDBInfo(HistoricalDevicesCols.DeviceGuid, ParseType.DisplayOnly, false);
     CurrentUserTextBox.SetDBInfo(HistoricalDevicesCols.CurrentUser, ParseType.DisplayOnly, false);
     LocationTextBox.SetDBInfo(HistoricalDevicesCols.Location, Attributes.DeviceAttributes.Locations, ParseType.DisplayOnly, false);
     PONumberTextBox.SetDBInfo(HistoricalDevicesCols.PO, ParseType.DisplayOnly, false);
     AssetTagTextBox.SetDBInfo(HistoricalDevicesCols.AssetTag, ParseType.DisplayOnly, false);
     PurchaseDateTextBox.SetDBInfo(HistoricalDevicesCols.PurchaseDate, ParseType.DisplayOnly, false);
     OSVersionTextBox.SetDBInfo(HistoricalDevicesCols.OSVersion, Attributes.DeviceAttributes.OSType, ParseType.DisplayOnly, false);
     SerialTextBox.SetDBInfo(HistoricalDevicesCols.Serial, ParseType.DisplayOnly, false);
     ReplaceYearTextBox.SetDBInfo(HistoricalDevicesCols.ReplacementYear, ParseType.DisplayOnly, false);
     EQTypeTextBox.SetDBInfo(HistoricalDevicesCols.EQType, Attributes.DeviceAttributes.EquipType, ParseType.DisplayOnly, false);
     NotesTextBox.SetDBInfo(HistoricalDevicesCols.Notes, ParseType.DisplayOnly, false);
     StatusTextBox.SetDBInfo(HistoricalDevicesCols.Status, Attributes.DeviceAttributes.StatusType, ParseType.DisplayOnly, false);
     EntryGuidTextBox.SetDBInfo(HistoricalDevicesCols.HistoryEntryGuid, ParseType.DisplayOnly, false);
     chkTrackable.SetDBInfo(HistoricalDevicesCols.Trackable, ParseType.DisplayOnly, false);
     PhoneNumberTextBox.SetDBInfo(HistoricalDevicesCols.PhoneNumber, ParseType.DisplayOnly, false);
     HostnameTextBox.SetDBInfo(HistoricalDevicesCols.HostName, ParseType.DisplayOnly, false);
     iCloudTextBox.SetDBInfo(HistoricalDevicesCols.iCloudAccount, ParseType.DisplayOnly, false);
 }
Exemple #5
0
    protected void QuantityButton_Click(object sender, EventArgs e)
    {
        Valid = new Validation();
        string  UserID             = "Tturner";
        Utility UT                 = new Utility();
        string  PickZone           = CurrentZone;
        string  ProductID          = UT.GetProductID(ProductTextBox.Text);
        string  LocationID         = LocationTextBox.Text;
        string  shipmentID         = Valid.GetShipmentID(BoxID);
        string  OrderNumber        = Valid.GetOrderNumber(BoxID);
        string  Quantity           = QuantityTextBox.Text;
        int     NumberOfMoveQueues = 0;
        int     n;
        string  orderLine;
        string  InventoryRID;
        bool    isNumeric = int.TryParse(Quantity, out n);


        if (isNumeric == true)
        {
            int EnteredQuantity = Convert.ToInt16(Quantity);
            if (Valid.IsValidQuantity(shipmentID, OrderNumber, ProductID, Quantity) == true)
            {
                QuantityTextBox.Text = "";
                LocationTextBox.Text = "";
                ProductTextBox.Text  = "";
                LocationTextBox.Focus();
                QuantityInputGroup.Attributes["class"] = "form-group has-success";
                orderLine = UT.GetOrderLine(shipmentID, OrderNumber, Quantity, ProductID);

                NumberOfMoveQueues = UT.GetNumberOfMoveQueues(shipmentID, OrderNumber, orderLine);

                int NQuantity = Convert.ToInt16(Quantity);
                for (int i = 0; i < NumberOfMoveQueues; i++)
                {
                    string MoveQRID      = UT.GetMoveQueueRID(shipmentID, OrderNumber, orderLine);
                    int    moveQQuantity = UT.GetMoveQueueQuantity(MoveQRID);
                    InventoryRID = UT.GetInventoryRID(MoveQRID);
                    UT.InsertPickIntoInventory(moveQQuantity.ToString(), shipmentID, OrderNumber, orderLine, UserID, InventoryRID);

                    UT.deleteMoveQueue(MoveQRID);
                    if (InventoryRID != "")
                    {
                        UT.UpdateInventory(UserID, moveQQuantity.ToString(), InventoryRID);
                        UT.MoveToQCEmpty(InventoryRID, shipmentID, OrderNumber, orderLine);
                        UT.InsertIntoAuditInventory(UserID, moveQQuantity.ToString(), shipmentID, OrderNumber, orderLine, ProductID, LocationID, InventoryRID);
                    }
                    else
                    {
                        //error message
                    }
                }

                if (Valid.OrderDone(shipmentID, OrderNumber) == true)
                {
                    UT.UpdateOoutboundShipments(shipmentID, OrderNumber);
                }

                if (Valid.IsQCRequired(UserID) == true)
                {
                    UT.SetQCRequired(shipmentID, OrderNumber);
                }

                UT.DeleteInventoryAllocation(shipmentID, OrderNumber, orderLine);

                QuantityInputGroup.Attributes["class"] = "form-group";
                LocationInputGroup.Attributes["class"] = "form-group";

                ProductInputGroup.Attributes["class"] = "form-group";

                //check to see if we need more inventory from another
                //updateLocationStatus
            }
            else
            {
                QuantityTextBox.Text = "";
                QuantityTextBox.Attributes["placeholder"] = "Incorrect Quantity";
                QuantityTextBox.Focus();

                QuantityInputGroup.Attributes["class"] = "form-group has-error";
            }
        }
        else
        {
            QuantityTextBox.Text = "";
            BoxScannTextBox.Attributes["placeholder"] = "Please enter a number";
            QuantityInputGroup.Attributes["class"]    = "form-group has-error";
        }
    }
Exemple #6
0
    protected void ProductCheckButton_Click(object sender, EventArgs e)
    {
        Valid = new Validation();

        string GTIN        = ProductTextBox.Text;
        string ProductID   = Valid.GtinToPruductID(GTIN);
        string LocationID  = LocationTextBox.Text;
        string shipmentID  = Valid.GetShipmentID(BoxID);
        string OrderNumber = Valid.GetOrderNumber(BoxID);

        if (Valid.inNumeric(GTIN) == true)
        {
            ProductID = Valid.GtinToPruductID(GTIN);
        }
        else
        {
            ProductID = GTIN;
        }



        if (ProductID != "" && LocationID != "")
        {
            if (Valid.ProductIsInTHisOrder(Valid.GetShipmentID(BoxID), Valid.GetOrderNumber(BoxID), ProductID) == true || Valid.DescriptionInThisOrder(Valid.GetShipmentID(BoxID), Valid.GetOrderNumber(BoxID), ProductID, LocationID) == true)
            {
                if (Valid.ProductInEnteredLocation(Valid.GetShipmentID(BoxID), Valid.GetOrderNumber(BoxID), LocationID, ProductID) == true || Valid.DescriptionInEnteredLocation(LocationID, ProductID) == true)
                {
                    if (Valid.IsThereAPriority1ReplenComingHere(LocationID) != true)
                    {
                        ProductTextBox.Text = ProductID.ToUpper();

                        LocationTextBox.Focus();
                        ProductInputGroup.Attributes["class"] = "form-group has-success";
                        QuantityTextBox.Focus();
                    }
                    else
                    {
                        ProductTextBox.Text = "";
                        ProductTextBox.Attributes["placeholder"] = "Replen Can Not Pick";
                        ProductInputGroup.Attributes["class"]    = "form-group has-error";
                    }
                }
                else
                {
                    ProductTextBox.Text = "";
                    ProductTextBox.Attributes["placeholder"] = "Item not in This Location";
                    ProductInputGroup.Attributes["class"]    = "form-group has-error";
                }
            }
            else
            {
                ProductTextBox.Text = "";
                ProductTextBox.Attributes["placeholder"] = "Item not in order";
                ProductInputGroup.Attributes["class"]    = "form-group has-error";
            }
        }
        else
        {
            ProductTextBox.Text = "";
            ProductTextBox.Attributes["placeholder"] = "Enter Product";
            ProductInputGroup.Attributes["class"]    = "form-group has-error";
        }
    }