private void buttonCreateReport_Click(object sender, EventArgs e) { dataGridViewSalesRep.Rows.Clear(); if (textBoxLogin.Text == "") { error_number = 1; f2.message_box(error_number); return; } else if (textBoxLogin.Text.Length > 30) { error_number = 2; f2.message_box(error_number); return; } user = f2.user.find(textBoxLogin.Text); tree_sale.root sale = f2.sales.main; string[] line = new string[3]; if (user != null) { potential_sale(line, sale, user); } else { error_number = 3; f2.message_box(error_number); } }
private void buttonCreateReport_Click(object sender, EventArgs e) { dataGridViewUsersRep.Rows.Clear(); if (textBoxProvider.Text == "") { error_number = 1; f2.message_box(error_number); } else if (textBoxProvider.Text.Length > 30) { error_number = 2; f2.message_box(error_number); } pr = f2.provider.find(textBoxProvider.Text); string[] line = new string[2]; for (int i = 0; i < pr.current_user; i++) { spisok_users.nest u = f2.user.find(pr.users[i]); if (u == null) { error_number = 3; f2.message_box(error_number); } else { tree_sale.root s = f2.user.check_for_sale(u.tariph, f2.sales.main, u); if (s == null) { line[0] = u.login; line[1] = "0"; dataGridViewUsersRep.Rows.Add(line); } else { line[0] = u.login; line[1] = s.size; dataGridViewUsersRep.Rows.Add(line); } } } }
private void buttonCreateReport_Click(object sender, EventArgs e) { dataGridViewSaleForUsers.Rows.Clear(); if (sale_size.Text == "") { error_number = 1; f2.message_box(error_number); } else if (sale_size.Text.Length > 3) { error_number = 2; f2.message_box(error_number); } else { string[] line = new string[3];//затестить size_of_sale = sale_size.Text; sale_obhod_po_skidke(f2.sales.main, sale_size.Text, line); } }
private void buttonCreateReport_Click(object sender, EventArgs e) { dataGridViewTypeRep.Rows.Clear(); pr = f2.provider.find(textBoxProvider.Text); type = 0; if ((checkBoxAddTariphInternet.Checked) && (checkBoxAddTariphTV.Checked)) { type = 2; } else if (checkBoxAddTariphTV.Checked) { type = 3; } else if (checkBoxAddTariphInternet.Checked) { type = 2; } if (type == 0) { error_number = 1; f2.message_box(error_number); } else if (textBoxProvider.Text == "") { error_number = 1; f2.message_box(error_number); } else if (pr == null) { error_number = 3; f2.message_box(error_number); } else if (textBoxProvider.Text.Length > 30) { error_number = 2; f2.message_box(error_number); } else { string name = ""; for (int i = 0; i < pr.current_tariph; i++) { spisok_tariph.nest a = f2.tariph.find(pr.arr[i].name, pr); if (a.type == type) { name = a.name; dataGridViewTypeRep.Rows.Add(name); } } } }