ВУЗ: Не указан
Категория: Не указан
Дисциплина: Не указана
Добавлен: 08.11.2023
Просмотров: 231
Скачиваний: 3
ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.
country) as par from сontract_view WHERE coun
try='" + s + "'"; SQLiteDataReader s1 = db.select(str);
res.Add(Int32.Parse(s1["par"].ToString()));
}
db.close();
return res;
}
private void button3_Click(object sender, EventArgs e)
{
textBox3.Text = Client.count_clients(); textBox4.Text = Contract.count_contract(); textBox5.Text = Tour.avg_tour(); textBox6.Text = Contract.sum_contract(); Listring> list = new Listing>(); foreach (string s in comboBox1.Items)
{
list.Add(s);
}
List<int> str = graf();
// int [] mas_g = Convert.ToInt32(str.Split(' '));
//string[] m = {"Россия","Франция","Китай","Австралия","Грузия"};
this.chart1.Series["Посещение стран"].Points.DataBindXY(list, str);
}
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
if (richTextBox1.Text != "") e.Graphics.DrawString(richTextBox1.Text, new Font("Arial", 14), new
SolidBrush(Color.Black), new PointF(100, 100));
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (textBox1.Text != "")
dataGridView1.DataSource = loadClient(true, textBox1.Text);
else
dataGridView1.DataSource = loadClient(false, "");
}
private void button8_Click(object sender, EventArgs e)
{
List<Contract> l = Contract.load();
string str = "";
for (int i = 0; i < l.Count; i++)
{
str += l[i].id + ") " + l[i].data + " - " + l[i].country + " - " + l[i].city + " - " + l[i].sur_c +" - "+ l[i].summa + " руб. - " + "\n";
}
richTextBox1.Text = str;
}
private void button10_Click(object sender, EventArgs e)
{
if (printPreviewDialog1.ShowDialog() == DialogResult.OK) printDocument1.Print();
}
private void button11_Click(object sender, EventArgs e)
{
if (printPreviewDialog2.ShowDialog() == DialogResult.OK) printDocument2.Print();
}
private void printDocument2_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
if (richTextBox2.Text != "")
e.Graphics.DrawString(richTextBox2.Text, new Font("Arial", 14), new SolidBrush(Color.Black), new
PointF(100, 100));
}
public string
get_name_tour()
{
Database db = Database.getInstance();
string s = "select c,cit from tour_view where id=" +Tour.id_t;
db.select(s);
SQLiteDataReader read = db.select(s);
string str = read["c"].ToString()+" " + read["cit"].ToString();
db.close();
return str;
}
private void button12_Click(object sender, EventArgs e)
{
List<Tour> l = Tour.load();
string str = "\t\t Список путёвок\n";
for (int i = 0; i < l.Count; i++)
{
str += l[i].id + ") " + l[i].country + " - " + l[i].city + " - " + l[i].transport + " - " + l[i].placement + " - " +
l[i].sum + " ру
б. - " + "\n";
}
richTextBox1.Text = str;
}
private void printDocument3_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
if (richTextBox1.Text != "")
e.Graphics.DrawString(richTextBox2.Text, new Font("Arial", 14), new SolidBrush(Color.Black), new
PointF(100, 100));
}
private void button13_Click(object sender, EventArgs e)
{
Listlient> l = Client.load();
string str = "\t\t Список клиентов\n";
for (int i = 0; i < l.Count; i++)
{
str += l[i].id + ") " + l[i].surname + " - " + l[i].name + " - " + l[i].patronymic + " - " + l[i].phone + " - " +
l[i].passport+ "\n";
}
richTextBox1.Text = str;
}
private void Form3_FormClosed(object sender, FormClosedEventArgs e)
{
Form1 f = new Form1();
f.Show();
}
}
}
try='" + s + "'"; SQLiteDataReader s1 = db.select(str);
res.Add(Int32.Parse(s1["par"].ToString()));
}
db.close();
return res;
}
private void button3_Click(object sender, EventArgs e)
{
textBox3.Text = Client.count_clients(); textBox4.Text = Contract.count_contract(); textBox5.Text = Tour.avg_tour(); textBox6.Text = Contract.sum_contract(); List
{
list.Add(s);
}
List<int> str = graf();
// int [] mas_g = Convert.ToInt32(str.Split(' '));
//string[] m = {"Россия","Франция","Китай","Австралия","Грузия"};
this.chart1.Series["Посещение стран"].Points.DataBindXY(list, str);
}
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
if (richTextBox1.Text != "") e.Graphics.DrawString(richTextBox1.Text, new Font("Arial", 14), new
SolidBrush(Color.Black), new PointF(100, 100));
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (textBox1.Text != "")
dataGridView1.DataSource = loadClient(true, textBox1.Text);
else
dataGridView1.DataSource = loadClient(false, "");
}
private void button8_Click(object sender, EventArgs e)
{
List<Contract> l = Contract.load();
string str = "";
for (int i = 0; i < l.Count; i++)
{
str += l[i].id + ") " + l[i].data + " - " + l[i].country + " - " + l[i].city + " - " + l[i].sur_c +" - "+ l[i].summa + " руб. - " + "\n";
}
richTextBox1.Text = str;
}
private void button10_Click(object sender, EventArgs e)
{
if (printPreviewDialog1.ShowDialog() == DialogResult.OK) printDocument1.Print();
}
private void button11_Click(object sender, EventArgs e)
{
if (printPreviewDialog2.ShowDialog() == DialogResult.OK) printDocument2.Print();
}
private void printDocument2_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
if (richTextBox2.Text != "")
e.Graphics.DrawString(richTextBox2.Text, new Font("Arial", 14), new SolidBrush(Color.Black), new
PointF(100, 100));
}
public string
1 ... 11 12 13 14 15 16 17 18 19
get_name_tour()
{
Database db = Database.getInstance();
string s = "select c,cit from tour_view where id=" +Tour.id_t;
db.select(s);
SQLiteDataReader read = db.select(s);
string str = read["c"].ToString()+" " + read["cit"].ToString();
db.close();
return str;
}
private void button12_Click(object sender, EventArgs e)
{
List<Tour> l = Tour.load();
string str = "\t\t Список путёвок\n";
for (int i = 0; i < l.Count; i++)
{
str += l[i].id + ") " + l[i].country + " - " + l[i].city + " - " + l[i].transport + " - " + l[i].placement + " - " +
l[i].sum + " ру
б. - " + "\n";
}
richTextBox1.Text = str;
}
private void printDocument3_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
if (richTextBox1.Text != "")
e.Graphics.DrawString(richTextBox2.Text, new Font("Arial", 14), new SolidBrush(Color.Black), new
PointF(100, 100));
}
private void button13_Click(object sender, EventArgs e)
{
List
string str = "\t\t Список клиентов\n";
for (int i = 0; i < l.Count; i++)
{
str += l[i].id + ") " + l[i].surname + " - " + l[i].name + " - " + l[i].patronymic + " - " + l[i].phone + " - " +
l[i].passport+ "\n";
}
richTextBox1.Text = str;
}
private void Form3_FormClosed(object sender, FormClosedEventArgs e)
{
Form1 f = new Form1();
f.Show();
}
}
}
1 ... 11 12 13 14 15 16 17 18 19