private void UpdateInfo(EditType edType) { vendorID = Forms.Authentication.LoginForm.VendorDetails.VendorID.ToString(); if (edType == EditType.category) { UpdateCategory(); EditCategoryPanel.BringToFront(); } else if (edType == EditType.AddCat) { AddCategory(); } else { UpdateItemInfo(); EditItemPanel.BringToFront(); } }
private void UpdateItemInfo() { string id = ItemName.Text; if (id.Contains("PicBox")) { id = id.Substring(0, id.Length - 6); } else // == "Label". No Other Possibilities { id = id.Substring(0, id.Length - 5); } DataTable dt = StoreMenuInfo.GetSpecificItem(vendorID, id); //ItemName.Text = dt.Rows[0][2].ToString(); NameTBox.Text = dt.Rows[0][2].ToString(); CategoryTBox.Text = dt.Rows[0][3].ToString(); DescTBox.Text = dt.Rows[0][4].ToString(); PriceTBox.Text = dt.Rows[0][5].ToString(); EditItemPanel.BringToFront(); }