コード例 #1
0
        private void MainGridUpdate(DuringPeriodForm duringPeriodForm)
        {
            duringPeriodForm__ = duringPeriodForm;
            var       l     = UltrasonicControlProducts.IDProtocolsTable(duringPeriodForm.from, duringPeriodForm.to);
            DataTable table = new DataTable();

            table.Columns.Add().DataType = typeof(int);
            table.Columns.Add().DataType = typeof(long);
            table.Columns.Add().DataType = typeof(DateTime);

            table.Columns.Add().DataType = typeof(string);

            table.Columns.Add().DataType = typeof(int);
            table.Columns.Add().DataType = typeof(string);


            table.Columns.Add().DataType = typeof(string);
            table.Columns.Add().DataType = typeof(string);
            table.Columns.Add().DataType = typeof(string);
            table.Columns.Add().DataType = typeof(string);
            table.Columns.Add().DataType = typeof(string);
            table.Columns.Add().DataType = typeof(string);

            table.Columns[0].ColumnName = "ID";
            table.Columns[1].ColumnName = "№ протокола";
            table.Columns[2].ColumnName = "Время";
            table.Columns[3].ColumnName = "№ партии";
            table.Columns[4].ColumnName = "Количество труб";
            table.Columns[5].ColumnName = "Оператор";

            table.Columns[6].ColumnName   = "Сплав";
            table.Columns[7].ColumnName   = "Состояние поставки";
            table.Columns[8].ColumnName   = "Нормативный документ";
            table.Columns[9].ColumnName   = "Смена";
            table.Columns[10].ColumnName  = "Шифр изделия";
            table.Columns[11].ColumnName  = "№СОП";
            MainGridView.DataSource       = null;
            MainGridView.DataSource       = table;
            MainGridView.Columns[0].Width = 0;

            for (int i = 0; i < MainGridView.Columns.Count; ++i)
            {
                MainGridView.Columns[i].ReadOnly = true;
            }

            foreach (var i in l)
            {
                table.Rows.Add(i.ID, i.NumberProtocol, i.TteTme
                               , i.NumberPacket
                               , i.Count, i.Operator
                               , i.Alloy
                               , i.DeliveryStatus
                               , i.NormativeDocument
                               , i.Gang
                               , i.ProductCodeNumber
                               , i.Standart
                               );
            }
            MainGridView.Update();
        }
コード例 #2
0
        private void UltrasonicControlProductsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DuringPeriodForm duringPeriodForm = new DuringPeriodForm();

            duringPeriodForm.ShowDialog();
            if (duringPeriodForm.DialogResult == DialogResult.OK)
            {
                MainGridUpdate(duringPeriodForm);
                doProc = SelectProtocolListTubes;
            }
        }