Ejemplo n.º 1
0
        private string ValidateFields()
        {
            string retval = "Success";

            if (string.IsNullOrEmpty(QuantityEntry.Text))
            {
                //DependencyService.Get<IMessage>().LongAlert("Not allow blank quantity!");
                retval = "Not allow blank quantity!";
                QuantityEntry.Focus();
                return(retval);
            }

            if (decimal.Parse(QuantityEntry.Text) == 0)
            {
                //DependencyService.Get<IMessage>().LongAlert("Not allow 0 quantity!");
                //UserDialogs.Instance.ShowError("Not allow 0 quantity!", 3000);
                retval = "Not allow 0 quantity!";
                QuantityEntry.Focus();
                return(retval);
            }

            if (decimal.Parse(QuantityEntry.Text) > item.ReturnQty)
            {
                retval = "Quantity is greater than credit memo quantity!";
                return(retval);
            }
            return(retval);
        }
Ejemplo n.º 2
0
        private string ValidateFields()
        {
            string retval = "Success";

            if (string.IsNullOrEmpty(QuantityEntry.Text))
            {
                //DependencyService.Get<IMessage>().LongAlert("Not allow blank quantity!");
                retval = "Not allow blank quantity!";
                QuantityEntry.Focus();
                return(retval);
            }

            if (decimal.Parse(QuantityEntry.Text) == 0)
            {
                retval = "Not allow 0 quantity!";
                QuantityEntry.Focus();
                return(retval);
            }

            if (string.IsNullOrEmpty(ItemNo))
            {
                //decimal bagQty = BagInfo.LoadQty - BagInfo.SoldQty;
                if (decimal.Parse(QuantityEntry.Text) > BagInfo.Quantity)
                {
                    retval = " Quantity is greater than scanned bag quantity!";
                    return(retval);
                }
            }
            return(retval);
        }
Ejemplo n.º 3
0
        private void OnUnloadValidated()
        {
            string textValidate = "Success";

            if (string.IsNullOrEmpty(QuantityEntry.Text))
            {
                textValidate = "Not allow blank quantity!";
            }

            if (decimal.Parse(QuantityEntry.Text) > item.BalQty)
            {
                textValidate       = "Unload quantity must not greater than balance quantity!";
                QuantityEntry.Text = item.BalQty.ToString();
            }

            if (decimal.Parse(QuantityEntry.Text) == 0)
            {
                textValidate       = "Unload quantity must not 0!";
                QuantityEntry.Text = item.BalQty.ToString();
            }

            if (textValidate != "Success")
            {
                UserDialogs.Instance.ShowError(textValidate, 3000);
                QuantityEntry.Focus();
                return;
            }
        }
Ejemplo n.º 4
0
        private void OnLoadValidated()
        {
            string textValidate = "Success";

            if (string.IsNullOrEmpty(QuantityEntry.Text))
            {
                textValidate = "Not allow blank quantity!";
            }

            //if (decimal.Parse(QuantityEntry.Text) == 0)
            //{
            //    textValidate="Not allow 0 quantity!";
            //    QuantityEntry.Text = ln.PickQty.ToString();
            //}

            if (decimal.Parse(QuantityEntry.Text) > ln.Quantity)
            {
                textValidate       = "Pick quantity must not greater than requested quantity!";
                QuantityEntry.Text = ln.Quantity.ToString();
            }

            if (textValidate != "Success")
            {
                UserDialogs.Instance.ShowError(textValidate, 3000);
                QuantityEntry.Focus();
                return;
            }
        }
        private string ValidateFields()
        {
            string retval = "Success";

            if (string.IsNullOrEmpty(QuantityEntry.Text))
            {
                //DependencyService.Get<IMessage>().LongAlert("Not allow blank quantity!");
                retval = "Not allow blank quantity!";
                QuantityEntry.Focus();
                return(retval);
            }

            if (decimal.Parse(QuantityEntry.Text) == 0)
            {
                //DependencyService.Get<IMessage>().LongAlert("Not allow 0 quantity!");
                //UserDialogs.Instance.ShowError("Not allow 0 quantity!", 3000);
                retval = "Not allow 0 quantity!";
                QuantityEntry.Focus();
                return(retval);
            }

            if (Scanfrom == "loaded")
            {
                if (decimal.Parse(QuantityEntry.Text) > ScanRequest.PickQty)
                {
                    retval = "Loaded quantity is greater than picked quantity!";
                    return(retval);
                }
            }
            else
            {
                decimal bagQty = BagInfo.LoadQty - BagInfo.SoldQty;
                if (decimal.Parse(QuantityEntry.Text) > bagQty)
                {
                    retval = "Unloaded quantity is greater than loaded quantity!";
                    return(retval);
                }
            }
            return(retval);
        }
Ejemplo n.º 6
0
        private void Button_Clicked(object sender, EventArgs e)
        {
            // Add item
            if (CurrentFrame == 25)
            {
                NewItemEntry.IsVisible    = true;
                IngredientsList.IsEnabled = false;
                QuantityEntry.Focus();
                singleItem = new IngredientItem();
                AddButton.PlayFrameSegment(25, 45);
                CurrentFrame = 45;
                return;
            }

            // Cancel
            if (CurrentFrame == 45)
            {
                ResetNewItemFrame();
                AddButton.PlayFrameSegment(45, 125);
                AddButton.PlayFrameSegment(0, 25);
                CurrentFrame = 25;
            }
        }