private void отчётТекущегоОператораЗаПериодToolStripMenuItem_Click(object sender, EventArgs e) { if (Statistics.Columns != null) { Statistics.Columns.Clear(); } DatePeriod f3 = new DatePeriod(); f3.ShowDialog(); label18.Text = ""; label19.Text = "Отчёт текущего оператора за период с " + f3.StartDate.ToString("dd.MM.yyyy") + " по " + f3.EndDate.ToString("dd.MM.yyyy") + ": "; DBGeneral dbg = new DBGeneral(); try { Statistics.DataSource = dbg.GetOprReport(f3.StartDate, f3.EndDate, this.EmpID); } catch (Exception ex) { MessageBox.Show(ex.Message); Statistics.Columns.Clear(); return; } autoinc(Statistics); Statistics.Columns[0].HeaderText = "№№"; Statistics.Columns[1].Width = 250; Statistics.Columns[1].HeaderText = "Наименование"; Statistics.Columns[2].HeaderText = "Количество"; Statistics.Columns[2].Width = 200; autoinc(Statistics); }
private void списокДействийОператораЗаПериодToolStripMenuItem_Click(object sender, EventArgs e) { if (Statistics.Columns != null) { Statistics.Columns.Clear(); } DatePeriod f3 = new DatePeriod(); f3.ShowDialog(); label18.Text = ""; label19.Text = ""; label19.Text = "Список действий оператора за период с " + f3.StartDate.ToString("dd.MM.yyyy") + " по " + f3.EndDate.ToString("dd.MM.yyyy") + ": "; DBGeneral dbg = new DBGeneral(); try { Statistics.DataSource = dbg.GetOperatorActions(f3.StartDate, f3.EndDate, EmpID); } catch (Exception ex) { MessageBox.Show(ex.Message); Statistics.Columns.Clear(); return; } autoinc(Statistics); Statistics.Columns[0].HeaderText = "№№"; Statistics.Columns[1].Width = 250; Statistics.Columns[1].HeaderText = "Действие"; Statistics.Columns[2].HeaderText = "Дата"; Statistics.Columns[2].Width = 200; autoinc(Statistics); }
private void ����������������������������������������������������������������ToolStripMenuItem_Click(object sender, EventArgs e) { DatePeriod f3 = new DatePeriod(); f3.ShowDialog(); Conn.SQLDA.SelectCommand.CommandText = "select IDREADER,DATE_PROLONG from Reservation_R..ISSUED " + " where DATE_PROLONG between '" + f3.StartDate.ToString("yyyyMMdd") + "' and '" + f3.EndDate.ToString("yyyyMMdd") + "' " + " group by DATE_PROLONG,IDREADER"; DataSet DS = new DataSet(); int i = Conn.SQLDA.Fill(DS, "t"); MessageBox.Show("���������� ���������, ���������� ���� ������������� ���������� �� ��������� ������, ��������� " + i.ToString(), "����������", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void ������������������������������������������ToolStripMenuItem_Click(object sender, EventArgs e) { DatePeriod f3 = new DatePeriod(); f3.ShowDialog(); Statistics.Columns.Clear(); Statistics.Columns.Add("NN", "� �/�"); label19.Text = "������ ����������� ������ ����������� ���������� �� ����� ����������, ������� ����������, �� " + DateTime.Now.ToShortDateString() + " :"; label18.Text = ""; //DataSet StatDS = dbw.GetDebtors(); try { Statistics.DataSource = dbw.GetDebtorsFCT(f3.StartDate, f3.EndDate);//StatDS.Tables[0]; } catch (IndexOutOfRangeException ev) { string s = ev.Message; MessageBox.Show("����������� ���!", "����������.", MessageBoxButtons.OK, MessageBoxIcon.Information); Statistics.Columns.Clear(); return; } autoinc(Statistics); Statistics.Columns[1].HeaderText = "���� ��������"; Statistics.Columns[2].HeaderText = "����� ������"; Statistics.Columns[3].HeaderText = "�������"; Statistics.Columns[3].Width = 100; Statistics.Columns[4].HeaderText = "���"; Statistics.Columns[4].Width = 90; Statistics.Columns[5].HeaderText = "��������"; Statistics.Columns[5].Width = 110; Statistics.Columns[6].HeaderText = "��������"; Statistics.Columns[6].Width = 170; Statistics.Columns[7].HeaderText = "�����"; Statistics.Columns[7].Width = 130; Statistics.Columns[8].Visible = false; Statistics.Columns[9].Visible = false; Statistics.Columns[10].Visible = false; Sorting.WhatStat = Stats.Debtors; Sorting.AuthorSort = SortDir.None; Sorting.ZagSort = SortDir.None; foreach (DataGridViewRow r in Statistics.Rows) { if (r.Cells[10].Value.ToString() == "true") { r.DefaultCellStyle.BackColor = Color.LightYellow; } } //DataGridViewColumn col = new DataGridViewColumn(); //col.HeaderText = "�/�"; //Statistics.Columns }
private void �������������������������������������ToolStripMenuItem_Click(object sender, EventArgs e) { if (Statistics.Columns != null) Statistics.Columns.Clear(); DatePeriod f3 = new DatePeriod(); f3.ShowDialog(); label18.Text = ""; label19.Text = ""; //label19.Text = "���������� �������� ����������, �� ������ �" + f3.StartDate.ToString("yyyyMMdd") + " �� " + f3.EndDate.ToString("yyyyMMdd") + ": "; string cntISSBOOK = dbw.GetBooksCount(f3.StartDate, f3.EndDate); MyDateSpan = new Span(); MyDateSpan.start = f3.StartDate; MyDateSpan.end = f3.EndDate; //���������� ��������� ��������� ���������� Conn.SQLDA.SelectCommand.CommandText = "select IDREADER,DATE_FACT_VOZV from Reservation_R..ISSUED " + " where DATE_FACT_VOZV between '" + f3.StartDate.ToString("yyyyMMdd") + "' and '" + f3.EndDate.ToString("yyyyMMdd") + "' " + " group by DATE_FACT_VOZV,IDREADER"; DataSet DS = new DataSet(); string cntRETRDR = Conn.SQLDA.Fill(DS, "t").ToString(); //���������� ��������� ������� ����������(������ ����������) Conn.SQLDA.SelectCommand.CommandText = "select IDREADER,DATE_ISSUE from Reservation_R..ISSUED " + " where DATE_ISSUE between '" + f3.StartDate.ToString("yyyyMMdd") + "' and '" + f3.EndDate.ToString("yyyyMMdd") + "' " + " group by DATE_ISSUE,IDREADER"; DS = new DataSet(); string cntISSRDR = Conn.SQLDA.Fill(DS, "t").ToString(); //���������� ��������� ���������� ���� ����������� ���������� Conn.SQLDA.SelectCommand.CommandText = "select IDREADER,DATE_PROLONG from Reservation_R..ISSUED " + " where DATE_PROLONG between '" + f3.StartDate.ToString("yyyyMMdd") + "' and '" + f3.EndDate.ToString("yyyyMMdd") + "' " + " group by DATE_PROLONG,IDREADER"; DS = new DataSet(); string cntPROLONGRDR = Conn.SQLDA.Fill(DS, "t").ToString(); //���������� ����������� ��������� Conn.SQLDA.SelectCommand.CommandText = "with A as ( " + "select IDREADER,DATE_ISSUE " + "from Reservation_R..ISSUED " + "where DATE_ISSUE between '" + f3.StartDate.ToString("yyyyMMdd") + "' and '" + f3.EndDate.ToString("yyyyMMdd") + "' " + "group by DATE_ISSUE,IDREADER " + "), " + "B as ( " + "select IDREADER,DATE_FACT_VOZV " + "from Reservation_R..ISSUED " + "where DATE_FACT_VOZV between '" + f3.StartDate.ToString("yyyyMMdd") + "' and '" + f3.EndDate.ToString("yyyyMMdd") + "' " + "group by DATE_FACT_VOZV,IDREADER " + "), " + "C as ( " + "select IDREADER,DATE_PROLONG " + "from Reservation_R..ISSUED " + "where DATE_PROLONG between '" + f3.StartDate.ToString("yyyyMMdd") + "' and '" + f3.EndDate.ToString("yyyyMMdd") + "' " + "group by DATE_PROLONG,IDREADER " + ") " + "select * from A " + "union " + "select * from B " + "union " + "select * from C"; DS = new DataSet(); string cntSRVRDR = Conn.SQLDA.Fill(DS, "t").ToString(); Statistics.Columns.Clear(); //Statistics.Rows.Clear(); Statistics.DataSource = null; Statistics.Columns.Add("NN", "��"); Statistics.Columns.Add("spravka", "�������"); Statistics.Columns[1].Width = 500; Statistics.Columns.Add("kolvo", "����������"); string[] row = { "1", "������ ����������", cntISSBOOK }; Statistics.Rows.Add(row); row = new string[] { "2", "���������� ��������� ��������� ����������", cntRETRDR }; Statistics.Rows.Add(row); row = new string[] { "3", "���������� ��������� ������� ���������� (������ ����������)", cntISSRDR }; Statistics.Rows.Add(row); row = new string[] { "4", "���������� ��������� ���������� ���� ����������� ���������", cntPROLONGRDR }; Statistics.Rows.Add(row); row = new string[] { "5", "���������� ����������� ���������", cntSRVRDR }; Statistics.Rows.Add(row); button12.Enabled = true; }
private void �������������������������������ToolStripMenuItem_Click(object sender, EventArgs e) { if (Statistics.Columns != null) Statistics.Columns.Clear(); DatePeriod f3 = new DatePeriod(); f3.ShowDialog(); label18.Text = ""; label19.Text = ""; label19.Text = "������ �������� ��������� �� ������ � " + f3.StartDate.ToString("dd.MM.yyyy") + " �� " + f3.EndDate.ToString("dd.MM.yyyy") + ": "; DBGeneral dbg = new DBGeneral(); try { Statistics.DataSource = dbg.GetOperatorActions(f3.StartDate, f3.EndDate, EmpID); } catch (Exception ex) { MessageBox.Show(ex.Message); Statistics.Columns.Clear(); return; } autoinc(Statistics); Statistics.Columns[0].HeaderText = "��"; Statistics.Columns[1].Width = 250; Statistics.Columns[1].HeaderText = "��������"; Statistics.Columns[2].HeaderText = "����"; Statistics.Columns[2].Width = 200; autoinc(Statistics); }
private void ������������������������ToolStripMenuItem_Click(object sender, EventArgs e) { Statistics.Columns.Clear(); Statistics.Columns.Add("NN", "� �/�"); Statistics.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells; Statistics.RowTemplate.DefaultCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True; Statistics.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; DatePeriod f3 = new DatePeriod(); f3.ShowDialog(); label19.Text = "������ �������� ���������� c " + f3.StartDate.ToShortDateString() + " �� " + f3.EndDate.ToShortDateString() + " :"; label18.Text = ""; Statistics.DataSource = dbw.GetIssuedBooks(f3.StartDate, f3.EndDate); //StatDS.Tables[0]; if (this.Statistics.Rows.Count == 0) { this.Statistics.Columns.Clear(); MessageBox.Show("��� �������� ����!"); return; } autoinc(Statistics); Statistics.Columns[0].Width = 40; Statistics.Columns[1].HeaderText = "��������"; Statistics.Columns[1].Width = 280; Statistics.Columns[2].HeaderText = "�����"; Statistics.Columns[2].Width = 150; Statistics.Columns[9].Visible = false; Statistics.Columns[4].HeaderText = "��������������"; Statistics.Columns[4].Width = 150; Statistics.Columns[4].Visible = false; Statistics.Columns[5].Visible = false; Statistics.Columns[6].Visible = false; Statistics.Columns[7].HeaderText = "����� ������ ������� ������"; Statistics.Columns[7].Width = 70; Statistics.Columns[8].HeaderText = "���"; Statistics.Columns[8].Width = 100; Statistics.Columns[3].HeaderText = "���. �����"; Statistics.Columns[3].Width = 100; Statistics.Columns[10].HeaderText = "���� ������"; Statistics.Columns[10].ValueType = typeof(DateTime); Statistics.Columns[10].Width = 85; Statistics.Columns[11].HeaderText = "������ �������� ���� ��������"; Statistics.Columns[11].Width = 85; Sorting.WhatStat = Stats.IssuedBooks; Sorting.AuthorSort = SortDir.None; Sorting.ZagSort = SortDir.None; button12.Enabled = true; }
private void toolStripMenuItem5_Click(object sender, EventArgs e) { Statistics.Columns.Clear(); DatePeriod f3 = new DatePeriod(); f3.ShowDialog(); //label17.Text = "���������� �������� ����������, �� ������ �" + f3.StartDate.ToString("dd.MM.yyyy") + " �� " + f3.EndDate.ToString("dd.MM.yyyy") + ": " + dbw.GetBooksCount(f3.StartDate, f3.EndDate); label19.Text = "���-�� �������� ����������, �� ������ � " + f3.StartDate.ToString("dd.MM.yyyy") + " �� " + f3.EndDate.ToString("dd.MM.yyyy") + ": "; label18.Text = dbw.GetBooksCount(f3.StartDate, f3.EndDate); }
private void toolStripMenuItem4_Click(object sender, EventArgs e) { Statistics.Columns.Clear(); DatePeriod f3 = new DatePeriod(); f3.ShowDialog(); label19.Text = "���������� ���������, �� ������ �" + f3.StartDate.ToString("yyyyMMdd") + " �� " + f3.EndDate.ToString("yyyyMMdd") + ": "; label18.Text = dbw.GetReaderCount(f3.StartDate, f3.EndDate); }