public EditPacking(string idw) { InitializeComponent(); this.IDW = idw; DBPacking dbwp = new DBPacking(); textBox1.Text = dbwp.Get(this.IDW); }
private void button3_Click(object sender, EventArgs e) { EditPacking ew = new EditPacking(dgWP.SelectedRows[0].Cells["ID"].Value.ToString()); ew.ShowDialog(); DBPacking dbwp = new DBPacking(); dgWP.DataSource = dbwp.GetAll(); }
private void button2_Click(object sender, EventArgs e) { NewPacking nwp = new NewPacking(); nwp.ShowDialog(); DBPacking dbwp = new DBPacking(); dgWP.DataSource = dbwp.GetAll(); }
public Packing() { InitializeComponent(); DBPacking dbwp = new DBPacking(); dgWP.DataSource = dbwp.GetAll(); dgWP.Columns["ID"].Visible = false; dgWP.Columns["PNAME"].HeaderText = "Наименование упаковки"; dgWP.Columns["PNAME"].Width = 350; }
public NewSummon(IRole uvo) { InitializeComponent(); this.UVO = uvo; dbs = new DBSummon(); // tbIDS.Text = dbs.GetNextNumber(); tbIDS.Text = "<не определено>"; IDNEWSUMMON = dbs.AddNIPSummon(); dtpCREATED.Value = DateTime.Now; cbSISP.SelectedIndex = 0; DBCustomer dbc = new DBCustomer(); cbCustomers.ValueMember = "ID"; cbCustomers.DisplayMember = "CNAME"; cbCustomers.DataSource = dbc.GetAllCustomers(); /*DBWPName dbwp = new DBWPName(); * cbWPNAME.ValueMember = "ID"; * cbWPNAME.DisplayMember = "WPNAME"; * cbWPNAME.DataSource = dbwp.GetAllWPNames();*/ DBAccept dbacc = new DBAccept(); cbAccept.ValueMember = "ID"; cbAccept.DisplayMember = "ANAME"; cbAccept.DataSource = dbacc.GetAllAccept(); DBPacking dbp = new DBPacking(); cbPacking.ValueMember = "ID"; cbPacking.DisplayMember = "PNAME"; cbPacking.DataSource = dbp.GetAll(); //DBEXTCABLE dbec = new DBEXTCABLE(); //cbExtCable.ValueMember = "ID"; //cbExtCable.DisplayMember = "EXTCABLENAME"; //cbExtCable.DataSource = dbec.GetAllEXTCABLENames(); //DBMountingKit dbmk = new DBMountingKit(); //cbMountingKit.ValueMember = "ID"; //cbMountingKit.DisplayMember = "MOUNTINGKITNAME"; //cbMountingKit.DataSource = dbmk.GetAllDBMountingKitNames(); //cbMountingKit.SelectedIndex = 0; // UIProc ui = new UIProc(); //ui.LoadExtCables(dgv, this.IDNEWSUMMON.ToString()); //LoadExtCables(); pickWPName1.Init(UVO); cbCONTRACTTYPE.SelectedIndex = 0; }
private void button2_Click(object sender, EventArgs e) { if (textBox1.Text == "") { MessageBox.Show("Введите наименование!"); return; } DBPacking dbwp = new DBPacking(); dbwp.Edit(textBox1.Text, this.IDW); MessageBox.Show("Наименование успешно изменено!"); Close(); }
private void button2_Click(object sender, EventArgs e) { if (textBox1.Text == "") { MessageBox.Show("Введите наименование!"); return; } DBPacking dbwp = new DBPacking(); dbwp.AddNew(textBox1.Text); MessageBox.Show("Наименование успешно добавлено!"); Close(); }