Ejemplo n.º 1
0
 public void SetDetails(clsLocation prLocation)
 {
     _Location = prLocation;
     UpdateForm();
     UpdateDisplay();
     Show();
 }
 protected virtual void checkIfItemExists(clsLocation prLocation)
 {
     _ItemListNames = new List <string>();
     foreach (clsAllItem Item in prLocation.ItemsList)
     {
         _ItemListNames.Add(Item.Name);
     }
     getAllLocationItems();
 }
        private async void btnItemOk_Click(object sender, EventArgs e)
        {
            if (isValid())
            {
                pushData();
                if (txtItemName.Enabled)
                {
                    _Location = await ServiceClient.GetLocationAsync(_Item.LocationName);

                    checkIfItemExists(_Location);
                }
                else
                {
                    MessageBox.Show(await ServiceClient.UpdateItemAsync(_Item));
                    Close();
                }
            }
            else
            {
                MessageBox.Show("Please enter values for all inputboxes before creating the item");
            }
        }