public void ClearTextbox() { SupplierComboBox.SelectedIndex = -1; SupplierComboBox.Items.Clear(); textBox1.Clear(); textBox2.Clear(); textBox3.Clear(); textBox4.Clear(); textBox5.Clear(); ProductNameTextBox.Clear(); ProductDesTextBox.Clear(); ProductCodeTextBox.Clear(); ShipingQtyTextBox.Clear(); totalItemTextBox.Clear(); totalQuantityTextBox.Clear(); prNmSrchBx.Clear(); itmDscrptnSrchBx.Clear(); pNCheckBox.Checked = false; pDCheckBox.Checked = false; itmCdSrchBx.Clear(); iOSrchBx.Clear(); pCCheckBox.Checked = false; iOCheckBox.Checked = false; listView1.Items.Clear(); dataGridView1.Rows.Clear(); dataGridView1.Refresh(); totalQuantity = 0; totalItem = 0; }
private void ClearselectedProduct() { impOd = null; ProductCodeTextBox.Clear(); ShipingQtyTextBox.Clear(); ProductDesTextBox.Clear(); ProductNameTextBox.Clear(); }
public void Cleardata() { FilenameLabel.Text = "FileNotSelected"; PriceTextBox.Clear(); QuantityTextBox.Clear(); ProductCodeTextBox.Clear(); ProductNameTextBox.Clear(); }
// FOR: ResetRecords For All Buttons Applay private void ResetRecords() { ProductCodeTextBox.Clear(); ProductNameTextBox.Clear(); StatusComboBox.SelectedIndex = -1; AddButton.Text = "Add"; ProductCodeTextBox.Focus(); }
private void Clear() { ProductIdTextBox.Clear(); ProductNameTextBox.Clear(); DescriptionTextBox.Clear(); ProductPriceTextBox.Clear(); NewProductArrivedTextBox.Clear(); onHandCount.Clear(); }
private void ClearProductInputBoxes() { ProductNameTextBox.Clear(); ProductBarcodeTextBox.Clear(); MarginTextBox.Clear(); PercentMarginTextBox.Clear(); UnitPriceTextBox.Clear(); UnitCostTextBox.Clear(); CategoryComboBox.SelectedIndex = -1; }
private void ClearselectedProduct() { ShipmentProductId = null; ImportOrderProductId = null; Sl = null; checkvalue = null; backlogQty = null; ProductCodeTextBox.Clear(); ShipingQtyTextBox.Clear(); ProductDesTextBox.Clear(); ProductNameTextBox.Clear(); }
/// <summary> /// Vymazani formulare a pridaneho obrazku /// </summary> private void ClearForm() { // polozky formulare nastaveny na puvodni hodnotu ProductNameTextBox.Clear(); ProductCathegoryCBox.SelectedIndex = -1; ProductCathegoryCBox.ResetText(); ProductPriceTextBox.Clear(); ProductDescriptionRTBox.Clear(); // obrazek je smazan ProductPictureBox.ImageLocation = string.Empty; }
private void ClearControls() { ProductNameTextBox.Clear(); SupplierComboBox.SelectedIndex = -1; CategoryComboBox.SelectedIndex = -1; PurchasePriceTextBox.Clear(); SalesPriceTextBox.Clear(); foreach (DataGridViewRow row in SizeDataGridView.Rows) { row.Cells["select"].Value = 0; } ProductNameTextBox.Focus(); }
private void очиститьToolStripMenuItem_Click(object sender, EventArgs e) { ProductNameTextBox.Clear(); InventoryNumberMaskedTextBox.Clear(); SizeTrackBar.Value = 0; radioButton1.Checked = true; radioButton2.Checked = false; GettingDatePicker.Value = DateTime.Now; WeightMaskedTextBox.Clear(); NumberMaskedTextBox.Clear(); PriceMaskedTextBox.Clear(); OrganizationNameTextBox.Clear(); CountryTextBox.Clear(); TelephoneNumberMaskedTextBox.Clear(); form2.CityTextBox.Clear(); form2.StreetTextBox.Clear(); form2.HouseMaskedTextBox.Clear(); Act = "очистка всех полей"; }
private void ProductListBox_SelectedIndexChanged(object sender, EventArgs e) { Product selectedProduct = (Product)ProductListBox.SelectedItem; if (selectedProduct != null) { ProductNameTextBox.Text = selectedProduct.Name; ProductNameLabel.Text = selectedProduct.Name; OwnerLabel.Text = selectedProduct.OwnerName; // Set default owner in combobox foreach (User u in OwnerComboBox.Items) { if (u.UserId == selectedProduct.OwnerId) { OwnerComboBox.SelectedItem = u; break; } } // Get count information StockInfo stockInfo = DBHelper.GetStockInfo(selectedProduct); if (stockInfo != null) { ProductCount.Value = stockInfo.Count; } else { ProductCount.Value = 0; } } else { // User has clicked an empty area, no products are selected. // Clear all fields ProductNameTextBox.Clear(); ProductNameLabel.Text = "Please select a product."; OwnerLabel.Text = string.Empty; OwnerComboBox.SelectedItem = null; ProductCount.Value = 0; } }
private void AddProoductButton_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(); con.ConnectionString = ConfigurationManager.ConnectionStrings["MassiveDynamic.Properties.Settings.MassiveDynamicConnectionString"].ConnectionString; string insertIntoProductId = "'" + ProductIDTextBox.Text + "'"; string insertIntoProductName = "'" + ProductNameTextBox.Text + "'"; string insertIntoCaegoryId = "'" + CategoryIdComboBox.Text + "'"; string insertIntoQPE = "'" + QuantityPerUnitTextBox.Text + "'"; string insertIntoUnitPrice = "'" + PriceTextBox.Text + "'"; string command = string.Format("insert into Products(ProductID,ProductName,CategoryID,QuantityPerUnit,UnitPrice) values ({0},{1},{2},{3},{4})", insertIntoProductId, insertIntoProductName, insertIntoCaegoryId, insertIntoQPE, insertIntoUnitPrice); SqlCommand com = new SqlCommand(command, con); com.CommandType = CommandType.Text; try { con.Open(); com.ExecuteNonQuery(); MessageBox.Show("Данните са добавени успешно!"); ProductIDTextBox.Clear(); ProductNameTextBox.Clear(); QuantityPerUnitTextBox.Clear(); PriceTextBox.Clear(); } catch (Exception exe) { //извеждаме съобщение с възникналото изключение MessageBox.Show(exe.ToString(), "Message/Съобщение:"); } finally { con.Close(); this.Close(); } }