Файл: т у р и с т и ч е ск ая ф ир ма.docx

ВУЗ: Не указан

Категория: Не указан

Дисциплина: Не указана

Добавлен: 08.11.2023

Просмотров: 232

Скачиваний: 3

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.
typeof(string));

dt.Columns.Add(dc);

dc = new DataColumn("Сумма", typeof(int));

dt.Columns.Add(dc);

for (int i = 0; i < l.Count; i++)

dt.Rows.Add(new Object[] { l[i].id, l[i].data, l[i].sur_c, l[i].name_e, l[i].country, l[i].city, l[i].summa });

}

dataGridView4.DataSource = dt;

}
private DataTable loadClient(bool search, string par)

{Listlient> l = Client.load_client_search(search, par); DataTable dt = new DataTable();

DataColumn dc = new DataColumn("№", typeof(int));

dt.Columns.Add(dc);

dc = new DataColumn("Фамилия", typeof(string));

dt.Columns.Add(dc);

dc = new DataColumn("Имя", typeof(string));

dt.Columns.Add(dc);

dc = new DataColumn("Отчество", typeof(string));

dt.Columns.Add(dc);

dc = new DataColumn("Телефон", typeof(string));

dt.Columns.Add(dc);

dc = new DataColumn("Паспортные данные", typeof(string));

dt.Columns.Add(dc);

for (int i = 0; i < l.Count; i++)

{

dt.Rows.Add(new Object[] { l[i].id, l[i].surname, l[i].name, l[i].patronymic, l[i].phone, l[i].passport });

}

return dt;

}

private void button7_Click(object sender, EventArgs e)

{
string data_cont = dateTimePicker1.Text; int summa = Contract.getSum(); textBox12.Text = summa.ToString(); textBox10.Text = Client.getFIO(); textBox11.Text = getFIO();

}

private void button2_Click(object sender, EventArgs e)

{

int rowindex1 = dataGridView1.CurrentCell.RowIndex;

int id = Int16.Parse(dataGridView1.Rows[rowindex1].Cells[0].Value.ToString()); Client.id_c = id;

int id_r = Request.search(id);

Database db = Database.getInstance();
string s = "INSERT INTO orders(id_request,id_employee) VALUES(" + id_r + "," + user.id + ")";

string s2 = "SELECT id from orders WHERE id_request=" + id_r;

//MessageBox.Show(id_r.ToString() + ", " + user.id.ToString());

db.query(s);

SQLiteDataReader read = db.select(s2);
while (read.Read())

{
Contract.ord = Int16.Parse(read["id"].ToString());
} db.close(); load_order();

MessageBox.Show("Клиент выбран!");

}
private void button1_Click(object sender, EventArgs e)

{

string g = comboBox1.SelectedItem.ToString(); List<To
1   ...   11   12   13   14   15   16   17   18   19

ur> l1 = Tour.filtr_tour(g);

DataTable dt = new DataTable(); DataColumn dc;

dc = new DataColumn("№", typeof(string));

dt.Columns.Add(dc);

dc = new DataColumn("Страна", typeof(string));

dt.Columns.Add(dc);

dc = new DataColumn("Город", typeof(string));

dt.Columns.Add(dc);

dc = new DataColumn("Транспорт", typeof(string));

dt.Columns.Add(dc);
dc = new DataColumn("Место размещения", typeof(string));

dt.Columns.Add(dc);

dc = new DataColumn("Сумма", typeof(string));

dt.Columns.Add(dc);

for (int i = 0; i < l1.Count; i++)

{

dt.Rows.Add

(new Object[] { l1[i].id, l1[i].country, l1[i].city, l1[i].transport, l1[i].placement, l1[i].sum });

}

dataGridView2.DataSource = dt;
}
private void button5_Click(object sender, EventArgs e)

{

int rowindex1 = dataGridView2.CurrentCell.RowIndex;

int id = Int32.Parse(dataGridView2.Rows[rowindex1].Cells[0].Value.ToString()); Tour.id_t = id;

// textBox2.Text = Tour.id_t.ToString();

if (Tour.id_t.ToString() != "")

{ MessageBox.Show(утёвка успешно выбрана!"); }

}
private void
button4_Click(object sender, EventArgs e)

{

loadTour();

}
private void button9_Click(object sender, EventArgs e)

{

string data_cont = dateTimePicker1.Text; int summa = Contract.getSum(); textBox12.Text = summa.ToString();

Contract contr = new Contract(data_cont, summa, Contract.ord, Tour.id_t);

contr.save();

loadContract();
richTextBox2.Text = "\t Договор \n" + "Дата: " + dateTimePicker1.Text + "\n" + "Клиент: " + textBox10.Text + "\n" + "Сотрудник: " + textBox11.Text + "\n" + "Сумма: " + textBox12.Text+"\n"+"Место поездки:
"+ get_name_tour()+"\n ";
richTextBox2.Text += "_ \n Dream tour,2017";

}
public List<int> graf()

{

int[] mas = null;

int i = -1, j = 0;

List<int> res = new List<int>(); Database db = Database.getInstance(); foreach (string s in comboBox1.Items)

{

// string str = "select count(tour.id_travel_location) as kol from tour,travel_location,destination where tour.id_travel_location = travel_location.id and travel_location.id_destination = destination.id and destination.country

='"+s+"'";

string str = "select count(