public BuyForm(SQLPrise qLPrise) { InitializeComponent(); sqlPrise = qLPrise; labelCountClassGroup.Text += $" {qLPrise.CountClassesGroup()}"; labelPriceOneClass.Text += $" {qLPrise.PriceOneClasses()}"; labelCountClassThisGroup.Text += $" {qLPrise.CountClassesThisGroup()}"; labelCountBuyAll.Text += $" {qLPrise.CountBuyAll()}"; labelCountBuyWillAll.Text += $" {qLPrise.CountBuyWillAll()}"; labelPriceWillAll.Text += $" {qLPrise.PriceWillAll()}"; labelGroup.Text += $" {qLPrise.Group}"; labelCustomer.Text += $" {qLPrise.Customer}"; }
private void GridViewRecordGroups_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (GridViewRecordGroups.CurrentRow == null) { MessageBox.Show("Ничего не выбрано", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } SQLPrise qLPrise = new SQLPrise(); qLPrise.Group = GridViewRecordGroups.CurrentRow.Cells[0].Value.ToString(); qLPrise.Customer = GridViewRecordGroups.CurrentRow.Cells[1].Value.ToString(); qLPrise.DateRecord = DateTime.Parse(GridViewRecordGroups.CurrentRow.Cells[2].Value.ToString()); BuyForm buyForm = new BuyForm(qLPrise); buyForm.ShowDialog(); }
private void bttBuyClasses_Click(object sender, EventArgs e) { if (cbCustomer.Text == string.Empty || cbGroups.Text == string.Empty) { MessageBox.Show("Заполните поля", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } SQLPrise qLPrise = new SQLPrise(); qLPrise.Group = cbGroups.Text; qLPrise.Customer = cbCustomer.Text; qLPrise.DateRecord = DateRecord.Value; BuyForm buyForm = new BuyForm(qLPrise); buyForm.mainForm = this; buyForm.flagForm = true; buyForm.ShowDialog(); }