private void AccountTableList_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { SelectedItemString = AccountTableList.Rows[e.RowIndex].Cells[0].Value.ToString(); CounterpartyAccount cp_acc = new CounterpartyAccount(); cp_acc.CreateTable = true; cp_acc.insertRecords = false; cp_acc.LoadString = SelectedItemString; cp_acc.ShowDialog(this); }
private void OKButton_Click(object sender, EventArgs e) { General.CreateCounterpartyAccount(Counterparty); SaledShopMaterials SaledMaterials = new SaledShopMaterials(); SaledMaterials.InsertRecords(titlebox.Text, textBox3.Text, textBox1.Text, textBox2.Text, textBox5.Text, DateTime.Today.ToString(), "Vella", Counterparty); SaledMaterials.Close(); General.DeleteFromSQLDataBase("ResidueShopMaterials", "Имя", titlebox.Text); CounterpartyAccount CpAcc = new CounterpartyAccount(); CpAcc.LoadString = Counterparty; CpAcc.ProductName = titlebox.Text; CpAcc.PriceString = textBox1.Text; CpAcc.CountString = textBox2.Text; CpAcc.SumString = textBox4.Text; CpAcc.InsertRecordsBoolean = true; CpAcc.Date = dateTimePicker1.Text; CpAcc.ShowDialog(this); }