public ManageStockClearControls(ManageItem manageStock) { foreach (Control item in manageStock.groupBox1.Controls) { if (item is TextBox) { ((TextBox)item).Text = string.Empty; } } manageStock.pictureBoxItem.Image = Properties.Resources.DefaultItem; }
internal static bool CheckIfBarCodeIsUnique(ManageItem manageItem) { _manageItem = manageItem; if (CreateDataReader().HasRows) { MessageBox.Show("BarCode is already taken", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return(true); } else { return(false); } }
public AddProduct(ManageItem manageStock) { ManageStock = manageStock; ExecuteCommand(CreateCommand()); System.Windows.Forms.MessageBox.Show("Item Saved Succesfully", "Message", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information); }
public AddToOrderDetails(ManageItem manageItem, int index) { this.manageItem = manageItem; this.index = index; ExecuteCommand(CreateCommand()); }