Esempio n. 1
0
        // 设置Viewer的格式


        private void InitializeStyleEditor()
        {
            this.m_dtgEditor.DataSource = null;

            this.m_dtgEditor.Columns.Clear();
            DataGridViewDateTimeColumn dtColumn = new DataGridViewDateTimeColumn();

            dtColumn.DataPropertyName = "date";
            dtColumn.HeaderText       = "日期";
            dtColumn.Name             = "date";
            dtColumn.SortMode         = DataGridViewColumnSortMode.NotSortable;
            m_dtgEditor.Columns.Add(dtColumn);

            foreach (clsLisQCConcentrationVO con in m_objBatch.GetConcentrations())
            {
                DataGridViewTextBoxColumn txtColumn = new DataGridViewTextBoxColumn();
                txtColumn.Name             = con.m_intConcentrationSeq.ToString();
                txtColumn.DataPropertyName = con.m_intConcentrationSeq.ToString();
                txtColumn.HeaderText       = con.m_strConcentration;
                txtColumn.SortMode         = DataGridViewColumnSortMode.NotSortable;
                m_dtgEditor.Columns.Add(txtColumn);

                DataGridViewTextBoxColumn txtColumnCopy = new DataGridViewTextBoxColumn();
                txtColumnCopy.Name             = con.m_intConcentrationSeq.ToString();
                txtColumnCopy.DataPropertyName = con.m_intConcentrationSeq.ToString() + "obj";
                txtColumnCopy.HeaderText       = con.m_strConcentration + "VO";
                // == 设置 ==
                txtColumnCopy.Visible  = false;
                txtColumnCopy.ReadOnly = true;
                txtColumnCopy.SortMode = DataGridViewColumnSortMode.NotSortable;
                m_dtgEditor.Columns.Add(txtColumnCopy);
            }
        }
Esempio n. 2
0
        private void InitializeStyleEditor()
        {
            this.m_dtgEditor.DataSource = null;

            this.m_dtgEditor.Columns.Clear();
            DataGridViewDateTimeColumn dtColumn = new DataGridViewDateTimeColumn();

            dtColumn.DataPropertyName = "date";
            dtColumn.HeaderText       = "日期";
            dtColumn.Name             = "date";
            dtColumn.Visible          = false;
            dtColumn.SortMode         = DataGridViewColumnSortMode.NotSortable;
            m_dtgEditor.Columns.Add(dtColumn);

            dtColumn = new DataGridViewDateTimeColumn();
            dtColumn.DataPropertyName = "strdate";
            dtColumn.HeaderText       = "日期";
            dtColumn.Name             = "strdate";
            dtColumn.ReadOnly         = true;
            dtColumn.SortMode         = DataGridViewColumnSortMode.NotSortable;
            this.m_dtgEditor.Columns.Add(dtColumn);

            foreach (clsLisQCBatchVO objBatch in m_objBatch.GetQCBatchSet())
            {
                DataGridViewTextBoxColumn txtColumn = new DataGridViewTextBoxColumn();
                txtColumn.Name             = objBatch.m_intSeq.ToString();
                txtColumn.DataPropertyName = objBatch.m_intSeq.ToString();
                txtColumn.HeaderText       = objBatch.m_strCheckItemName;
                txtColumn.SortMode         = DataGridViewColumnSortMode.NotSortable;
                m_dtgEditor.Columns.Add(txtColumn);

                DataGridViewTextBoxColumn txtColumn1 = new DataGridViewTextBoxColumn();
                txtColumn1.Name             = objBatch.m_intSeq.ToString() + "1";
                txtColumn1.DataPropertyName = objBatch.m_intSeq.ToString() + "1";
                txtColumn1.HeaderText       = objBatch.m_strCheckItemName;
                txtColumn1.SortMode         = DataGridViewColumnSortMode.NotSortable;
                m_dtgEditor.Columns.Add(txtColumn1);

                DataGridViewTextBoxColumn txtColumn2 = new DataGridViewTextBoxColumn();
                txtColumn2.Name             = objBatch.m_intSeq.ToString() + "2";
                txtColumn2.DataPropertyName = objBatch.m_intSeq.ToString() + "2";
                txtColumn2.HeaderText       = objBatch.m_strCheckItemName;
                txtColumn2.SortMode         = DataGridViewColumnSortMode.NotSortable;
                m_dtgEditor.Columns.Add(txtColumn2);

                DataGridViewTextBoxColumn txtColumnCopy = new DataGridViewTextBoxColumn();
                txtColumnCopy.Name             = objBatch.m_intSeq.ToString() + "obj";
                txtColumnCopy.DataPropertyName = objBatch.m_intSeq.ToString() + "obj";
                txtColumnCopy.HeaderText       = objBatch.m_intSeq + "VO";
                // == 设置 ==
                txtColumnCopy.Visible  = false;
                txtColumnCopy.ReadOnly = true;
                txtColumnCopy.SortMode = DataGridViewColumnSortMode.NotSortable;
                m_dtgEditor.Columns.Add(txtColumnCopy);

                DataGridViewTextBoxColumn txtColumnCopy1 = new DataGridViewTextBoxColumn();
                txtColumnCopy1.Name             = objBatch.m_intSeq.ToString() + "1" + "obj";
                txtColumnCopy1.DataPropertyName = objBatch.m_intSeq.ToString() + "1" + "obj";
                txtColumnCopy.HeaderText        = objBatch.m_intSeq + "VO";
                // == 设置 ==
                txtColumnCopy1.Visible  = false;
                txtColumnCopy1.ReadOnly = true;
                txtColumnCopy1.SortMode = DataGridViewColumnSortMode.NotSortable;
                m_dtgEditor.Columns.Add(txtColumnCopy1);

                DataGridViewTextBoxColumn txtColumnCopy2 = new DataGridViewTextBoxColumn();
                txtColumnCopy2.Name             = objBatch.m_intSeq.ToString() + "2" + "obj";
                txtColumnCopy2.DataPropertyName = objBatch.m_intSeq.ToString() + "2" + "obj";
                txtColumnCopy2.HeaderText       = objBatch.m_intSeq + "VO";
                // == 设置 ==
                txtColumnCopy2.Visible  = false;
                txtColumnCopy2.ReadOnly = true;
                txtColumnCopy2.SortMode = DataGridViewColumnSortMode.NotSortable;
                m_dtgEditor.Columns.Add(txtColumnCopy2);
            }
        }