private void DeleteBtn_Click(object sender, EventArgs e) { ApplicationManager.deleteItem(comboBox1.SelectedItem.ToString()); comboBox1.Items.Remove(comboBox1.SelectedItem); ApplicationManager.showStock(ApplicationManager.getDataGridViewFromInventoryStoreForm()); ApplicationManager.getItemIDs(comboBox1); }
private void UpdateBtn_Click(object sender, EventArgs e) { //if ((ItemName.Text != "" && ItemName.Text != "ItemName")) ApplicationManager.updateItem("ItemName",ItemName.Text,comboBox1.SelectedItem.ToString()); //if ((Cost.Text != "" && Cost.Text != "Cost")) ApplicationManager.updateItem("Cost",Cost.Text,comboBox1.SelectedItem.ToString()); //if ((CompanyID.Text != "" && CompanyID.Text != "CompanyID")) ApplicationManager.updateItem("CompanyID",CompanyID.Text,comboBox1.SelectedItem.ToString()); ApplicationManager.updateItem(ItemName, Cost, CompanyID, comboBox1.SelectedItem.ToString()); ApplicationManager.showStock(ApplicationManager.getDataGridViewFromInventoryStoreForm()); }
private void AddBtn_Click(object sender, EventArgs e) { ApplicationManager.addItem(ItemID.Text, ItemName.Text, Cost.Text, CompanyID.Text, DateTime.Now.ToString()); ApplicationManager.updateStock(ItemID.Text, Quantity.Text); ApplicationManager.setItemPriceManagement(ItemID.Text, RetailerProfitPrice.Text, WholeSallerProfitPrice.Text); ApplicationManager.showStock(ApplicationManager.getDataGridViewFromInventoryStoreForm()); ItemID.Text = "ItemID"; ItemName.Text = "ItemName"; Cost.Text = "Cost"; CompanyID.Text = "CompanyID"; Quantity.Text = "Quantity"; RetailerProfitPrice.Text = "RetailerProfitPrice"; WholeSallerProfitPrice.Text = "WholeSallerProfitPrice"; }