//列表式
        void tsShowSingLe_Click(object sender, EventArgs e)
        {
            if (CardAndTable == 1)
            {
                dgvContent.CancelEdit();
                dgvContent.EndEdit();

                UI.Input_OldCJ.Input_CJOld.tsbtnSX.Enabled   = true;
                UI.Input_OldCJ.Input_CJOld.tsbtnQXSX.Enabled = true;
                UI.Input_OldCJ.Input_CJOld.tsmiSX.Enabled    = true;
                UI.Input_OldCJ.Input_CJOld.tsmiQXSX.Enabled  = true;
                //UI.Input_OldCJ.Input_CJOld.tsbtnList2.Checked = true;
                //UI.Input_OldCJ.Input_CJOld.tsbtnCard2.Checked = false;
                UI.Input_OldCJ.Input_CJOld.tsmiShowSingle.Checked = true;
                UI.Input_OldCJ.Input_CJOld.tsmiCard.Checked       = false;

                panelDgvContent.Visible = true;
                panelContent.Visible    = false;
                //panelDgvContent.Dock = DockStyle.Fill;
                //panelContent.Dock = DockStyle.Fill;

                ds = typeNum.getThirdTypeNumData(TopClassID, node.Text, ShowType);
                dgvContent.DataSource = ds.Tables[0];
                table          = ds.Tables[0];
                lbldgvNum.Text = "共有纪录数:" + Convert.ToString(dgvContent.Rows.Count);
                dgvContent.ClearSelection();
                txt行号dgv.Text = txt行号Card.Text;
                CardAndTable  = 0;
            }
        }
Ejemplo n.º 2
0
        //列表式
        void tsShowSingLe_Click(object sender, EventArgs e)
        {
            if (CardAndTable == 1)
            {
                dgvDoc.CancelEdit();
                dgvDoc.EndEdit();

                UI.Input_OldCJ.Input_CJOld.tsbtnSX.Enabled   = true;
                UI.Input_OldCJ.Input_CJOld.tsbtnQXSX.Enabled = true;
                UI.Input_OldCJ.Input_CJOld.tsmiSX.Enabled    = true;
                UI.Input_OldCJ.Input_CJOld.tsmiQXSX.Enabled  = true;
                //UI.Input_OldCJ.Input_CJOld.tsbtnList2.Checked = true;
                //UI.Input_OldCJ.Input_CJOld.tsbtnCard2.Checked = false;
                UI.Input_OldCJ.Input_CJOld.tsmiShowSingle.Checked = true;
                UI.Input_OldCJ.Input_CJOld.tsmiCard.Checked       = false;

                this.Visible        = false;
                panelDgvDoc.Visible = true;
                panelDoc.Visible    = false;
                panelDgvDoc.Dock    = DockStyle.Fill;
                panelDoc.Dock       = DockStyle.Fill;
                this.Visible        = true;

                ds = OldCJ_doc.getData(FileID);
                dgvDoc.DataSource = ds.Tables[0];
                table             = ds.Tables[0];

                lbldgvNum.Text = "共有纪录数:" + Convert.ToString(dgvDoc.Rows.Count - 1);
                dgvDoc.ClearSelection();
                txt行号dgv.Text = txt行号Card.Text;
                CardAndTable  = 0;
            }
        }
Ejemplo n.º 3
0
        //列表式
        private void tsShowSingLe_Click(object sender, EventArgs e)
        {
            if (CardAndTable == 1)
            {
                dgvContent.CancelEdit();
                dgvContent.EndEdit();

                UI.Input.BZ_Input.tsbtnSX.Enabled   = true;
                UI.Input.BZ_Input.tsbtnQXSX.Enabled = true;
                UI.Input.BZ_Input.tsmiSX.Enabled    = true;
                UI.Input.BZ_Input.tsmiQXSX.Enabled  = true;
                //UI.Input.BZ_Input.tsbtnList2.Checked = true;
                //UI.Input.BZ_Input.tsbtnCard2.Checked = false;
                UI.Input.BZ_Input.tsmiShowSingle.Checked = true;
                UI.Input.BZ_Input.tsmiCard.Checked       = false;

                this.Visible            = false;
                panelDgvContent.Visible = true;
                panelContent.Visible    = false;
                panelDgvContent.Dock    = DockStyle.Fill;
                panelContent.Dock       = DockStyle.Fill;
                this.Visible            = true;

                ds = bz_content.getData(TopClassID);
                dgvContent.DataSource = ds.Tables[0];
                table          = ds.Tables[0];
                lbldgvNum.Text = Convert.ToString(dgvContent.Rows.Count - 1);
                dgvContent.ClearSelection();
                txt行号dgv.Text = txt行号Card.Text;
                CardAndTable  = 0;
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 切换为列表式录入
        /// </summary>
        public void ListInput()
        {
            if (CardAndTable == 1)
            {
                dgvProject.CancelEdit();
                dgvProject.EndEdit();

                this.Visible         = false;
                panelDgvFile.Visible = true;
                panelFile.Visible    = false;
                panelDgvFile.Dock    = DockStyle.Fill;
                panelFile.Dock       = DockStyle.Fill;

                ds = project.getData(TypeNumID, ShowType);
                dgvProject.DataSource = ds.Tables[0];
                table = ds.Tables[0];
                dgvProject.ClearSelection();

                this.Visible = true;

                lbldgvNum.Text    = "共有纪录数:" + Convert.ToString(dgvProject.Rows.Count - 1);
                txtFileIndex.Text = txtIndex.Text;
                int num = Convert.ToInt32(txtFileIndex.Text);
                publicDgv.DataGridView导航(dgvProject, num);

                CardAndTable = 0;
            }
        }
Ejemplo n.º 5
0
        //列表式
        void tsShowSingLe_Click(object sender, EventArgs e)
        {
            if (CardAndTable == 1)
            {
                dgvDoc.CancelEdit();
                dgvDoc.EndEdit();

                InputMain.tsbtnSX.Enabled   = true;
                InputMain.tsbtnQXSX.Enabled = true;
                InputMain.tsmiSX.Enabled    = true;
                InputMain.tsmiQXSX.Enabled  = true;
                //InputMain.tsbtnList2.Checked = true;
                //InputMain.tsbtnCard2.Checked = false;
                InputMain.tsmiShowSingle.Checked = true;
                InputMain.tsmiCard.Checked       = false;

                panelDgvDoc.Visible = true;
                panelDoc.Visible    = false;
                panelDgvDoc.Dock    = DockStyle.Fill;
                panelDoc.Dock       = DockStyle.Fill;

                ds = CJ_doc.GetData(FileID, ShowType);
                dgvDoc.DataSource = ds.Tables[0];
                table             = ds.Tables[0];

                lbldgvNum.Text = "共有纪录数:" + Convert.ToString(dgvDoc.Rows.Count - 1);
                dgvDoc.ClearSelection();
                txtDocIndex.Text = txtIndex.Text;
                int num = Convert.ToInt32(txtDocIndex.Text);
                publicDgv.DataGridView导航(dgvDoc, num);
                CardAndTable = 0;
            }
        }
Ejemplo n.º 6
0
        //列表式
        private void tsShowSingLe_Click(object sender, EventArgs e)
        {
            if (CardAndTable == 1)
            {
                dgvContent.CancelEdit();
                dgvContent.EndEdit();

                InputMain.tsbtnSX.Enabled   = true;
                InputMain.tsbtnQXSX.Enabled = true;
                InputMain.tsmiSX.Enabled    = true;
                InputMain.tsmiQXSX.Enabled  = true;
                //InputMain.tsbtnList2.Checked = true;
                //InputMain.tsbtnCard2.Checked = false;
                InputMain.tsmiShowSingle.Checked = true;
                InputMain.tsmiCard.Checked       = false;

                panelDgvContent.Visible = true;
                panelContent.Visible    = false;

                ds = typeNum.getSecondTypeNumData(TopClassID, node.Text, ShowType);
                dgvContent.DataSource = ds.Tables[0];
                table          = ds.Tables[0];
                lbldgvNum.Text = "共有纪录数:" + Convert.ToString(dgvContent.Rows.Count - 1);
                dgvContent.ClearSelection();
                txtDgvIndex.Text = txtIndex.Text;
                CardAndTable     = 0;
            }
        }
Ejemplo n.º 7
0
        //新增行
        private void tsnewrow_Click(object sender, EventArgs e)
        {
            txt行号.Text = Convert.ToString(dgvYj.Rows.Count);
            int rowsNum = dgvYj.Rows.Count;

            if (dgvYj.CurrentCell != null)
            {
                dgvYj.ClearSelection();
                dgvYj.Rows[rowsNum - 1].Selected = true;
                dgvYj.CurrentCell = dgvYj.Rows[rowsNum - 1].Cells[dgvYj.CurrentCell.ColumnIndex];
            }
        }
Ejemplo n.º 8
0
        //右键删除菜单
        private void dgvDetails_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                if (e.RowIndex != -1)
                {
                    dgvDetails.CancelEdit();
                    dgvDetails.EndEdit();

                    if (dgvDetails.SelectedRows.Count == 0)
                    {
                        dgvDetails.ClearSelection();
                        dgvDetails.Rows[e.RowIndex].Selected = true;
                    }

                    contextMenuStrip1.Show(MousePosition.X, MousePosition.Y);
                }
            }
        }
Ejemplo n.º 9
0
 //新纪录
 private void TsNewRow_Click(object sender, EventArgs e)
 {
     if (CardAndTable != 0)
     {
         txt行号Card.Text = Convert.ToString(dgvClass.Rows.Count);
         PageBtnClick(Convert.ToInt32(txt行号Card.Text));
     }
     else
     {
         txt行号Card.Text = Convert.ToString(dgvClass.Rows.Count);
         int num = dgvClass.Rows.Count;
         if (dgvClass.CurrentCell != null)
         {
             dgvClass.ClearSelection();
             dgvClass.Rows[num - 1].Selected = true;
             dgvClass.CurrentCell            = dgvClass.Rows[num - 1].Cells[dgvClass.CurrentCell.ColumnIndex];
         }
     }
 }