Example #1
0
        /// <summary>
        /// 查看详细合同文本
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void showDeatilTxtBtn_Click(object sender, EventArgs e)
        {
            DataGridView dgv = null;

            if (tabControl1.SelectedIndex == 0)
            {
                dgv = showDataGridView;
            }
            else if (tabControl1.SelectedIndex == 1)
            {
                dgv = searchDataGridView1;
            }

            if (dgv == null || dgv.SelectedRows.Count != 1)
            {
                statusLab.Text = "无法在选择多行时查看合同文本,请双击行头选择一行时查看相应信息!";
                return;
            }

            int i = dgv.SelectedRows[0].Index;

            Contract con = ContractUtil.getContractFromRow(((DataSet)dgv.DataSource).Tables[0].Rows[i]);

            TxtForm tf = new TxtForm("查看合同文本", con, true);

            tf.Show();
        }
Example #2
0
        /// <summary>
        /// 查看详细合同文本
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void showDeatilTxtBtn_Click(object sender, EventArgs e)
        {
            DataGridView dgv = null;
            if (tabControl1.SelectedIndex == 0)
            {
                dgv = showDataGridView;
            }
            else if (tabControl1.SelectedIndex == 1)
            {
                dgv = searchDataGridView1;
            }

            if (dgv == null || dgv.SelectedRows.Count != 1)
            {
                statusLab.Text = "无法在选择多行时查看合同文本,请双击行头选择一行时查看相应信息!";
                return;
            }

            int i = dgv.SelectedRows[0].Index;

            Contract con = ContractUtil.getContractFromRow(((DataSet)dgv.DataSource).Tables[0].Rows[i]);

            TxtForm tf = new TxtForm("查看合同文本", con, true);
            tf.Show();
        }