1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace YurevichIS31_Stroymaterialy
- {
- public partial class tovarform : Form
- {
- public tovarform()
- {
- InitializeComponent();
- }
- private void tovarform_Load(object sender, EventArgs e)
- {
- // TODO: данная строка кода позволяет загрузить данные в таблицу "iS31YurevichDataSet.Товар_import_Стройматериалы". При необходимости она может быть перемещена или удалена.
- this.товар_import_СтройматериалыTableAdapter.Fill(this.iS31YurevichDataSet.Товар_import_Стройматериалы);
- }
- private void button4_Click(object sender, EventArgs e)
- {
- admform form = new admform();
- form.Show();
- this.Close();
- }
- private void panel3_Paint(object sender, PaintEventArgs e)
- {
- }
- private void savebuttont_Click(object sender, EventArgs e)
- {
- this.Validate();
- this.товарimportСтройматериалыBindingSource.EndEdit();
- this.tableAdapterManager1.UpdateAll(this.iS31YurevichDataSet);
- MessageBox.Show("Данные успешно сохранены");
- }
- private void delbuttont_Click(object sender, EventArgs e)
- {
- товарimportСтройматериалыBindingSource.RemoveCurrent();
- }
- private void addbuttont_Click(object sender, EventArgs e)
- {
- tovaraddform form = new tovaraddform();
- form.Show();
- this.Close();
- }
- private void poiskbutton_Click(object sender, EventArgs e)
- {
- for (int i = 0; i < tovar.RowCount; i++)
- {
- tovar.Rows[i].Selected = false;
- for (int j = 0; j < tovar.ColumnCount; j++)
- if (tovar.Rows[i].Cells[j].Value != null)
- if (tovar.Rows[i].Cells[j].Value.ToString().Contains(searchtextbox.Text))
- {
- tovar.Rows[i].Selected = true;
- break;
- }
- }
- }
- private void searchtextbox_TextChanged(object sender, EventArgs e)
- {
- }
- }
- }
|