コード例 #1
0
        public PickingEntry(clsWhsItem pickingSummary, string id, string title, List <clsWhsItem> items)
        {
            InitializeComponent();

            linkID       = id;
            pickingTitle = title;
            clsWhsItems  = items;

            //find the item index in the list
            index = items.FindIndex(a => a.PalletId == pickingSummary.PalletId);

            LoadPickingSummary(pickingSummary.Summary);
        }
コード例 #2
0
        public TallyInPalletEntry(clsWhsItem product, string tallyInID, string action)
        {
            try
            {
                InitializeComponent();

                id = tallyInID;

                actionID = action;

                productPallet = product;

                Title = "Tally In # " + productPallet.ProductCode;

                palletDesc.Children.Clear();

                Label topBlank = new Label();
                palletDesc.Children.Add(topBlank);

                string[] descs = (productPallet.Description.Replace("\r\n", "t")).Split('t');

                foreach (string desc in descs)
                {
                    Label caption = new Label();

                    if (desc == "")
                    {
                        caption.Text           = "    " + desc;
                        caption.FontAttributes = FontAttributes.Bold;
                    }
                    else
                    {
                        caption.Text = "    " + desc;
                    }

                    palletDesc.Children.Add(caption);
                }

                Label bottomBlank = new Label();
                palletDesc.Children.Add(bottomBlank);

                GetNewPalletList();
            }
            catch (Exception ex)
            {
                string test = ex.Message;
            }
        }
コード例 #3
0
        async void AddToGrid(object sender, System.EventArgs e)
        {
            try
            {
                if (!(String.IsNullOrEmpty(SKUEntry.Text)) && !(String.IsNullOrEmpty(SKUEntry.Text)))
                {
                    clsWhsItem item = new clsWhsItem
                    {
                        ProductCode = SKUEntry.Text,
                        LoadQty     = Convert.ToInt32(QtyEntry.Text)
                    };

                    bool existItem = items.Any(check => check.ProductCode == item.ProductCode);

                    if (existItem == false)
                    {
                        items.Add(item);
                        itemsTest.Add(item);

                        dataGrid.ItemsSource = items;
                        dataGrid.ItemsSource = itemsTest;

                        SKUEntry.Text = String.Empty;
                        QtyEntry.Text = String.Empty;

                        var toastConfig = new ToastConfig("Added to the list");
                        toastConfig.SetDuration(3000);
                        toastConfig.SetBackgroundColor(System.Drawing.Color.FromArgb(0, 128, 0));
                        toastConfig.SetPosition(0);
                        UserDialogs.Instance.Toast(toastConfig);
                    }
                    else
                    {
                        await DisplayAlert("Duplicate", "Item added to list.", "OK");
                    }
                }
                else
                {
                    await DisplayAlert("Missing field", "Please enter all field.", "OK");
                }
            }
            catch (Exception ex)
            {
                await DisplayAlert("Error", ex.Message, "OK");
            }
        }
コード例 #4
0
        async void Handle_GridTapped(object sender, GridTappedEventArgs e)
        {
            if (record.Category == "TallyIn" || record.Category == "FullPick" || record.Category == "LoosePick" || record.Category == "Picking")
            {
                clsWhsItem product = new clsWhsItem();
                product = ((clsWhsItem)e.RowData);

                if (product != null)
                {
                    if (record.Category == "TallyIn")
                    {
                        //await Navigation.PushAsync(new TallyInPalletEntry(product, record.Id, recordDetails.Action));
                        await Navigation.PushAsync(new oldTallyInPalletEntry(product, record.Id, recordDetails.Action));
                    }
                    else
                    {
                        await Navigation.PushAsync(new PickingEntry(product, pickingID, record.Name, recordDetails.Items));
                    }
                }
            }
        }
コード例 #5
0
        async void TallyOut(string result)
        {
            Device.BeginInvokeOnMainThread(async() =>
            {
                clsPalletTrx tallyOutPallet = new clsPalletTrx
                {
                    LinkId = record.Id,
                    Id     = result
                };

                var content = await CommonFunction.CallWebService(1, tallyOutPallet, Ultis.Settings.SessionBaseURI, ControllerUtil.postTallyOutDetailURL(), this);
                clsResponse upload_response = JsonConvert.DeserializeObject <clsResponse>(content);

                if (upload_response.IsGood)
                {
                    DisplayToast("Success");

                    clsWhsItem item = new clsWhsItem
                    {
                        PalletId    = result,
                        Description = Ultis.Settings.SessionUserId
                    };

                    tallyOutItems.Add(item);

                    dataGrid.ItemsSource = null;

                    dataGrid.ItemsSource = tallyOutItems;

                    palletIdEntry.Text = String.Empty;
                }
                else
                {
                    DisplayToast(palletIdEntry.Text + " " + upload_response.Message);
                }
            });
        }