示例#1
0
        private void 查看详情ToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            if (gridView4.RowCount <= 0)//判断是否选中要删除的行
            {
                MessageBox.Show("请选中行");
                return;
            }

            string zerenren           = gridView4.GetRowCellValue(this.gridView4.FocusedRowHandle, "完成责任人").ToString();
            string neirong            = gridView4.GetRowCellValue(this.gridView4.FocusedRowHandle, "纪要内容").ToString();
            string shijian            = gridView4.GetRowCellValue(this.gridView4.FocusedRowHandle, "会议时间").ToString();
            string id                 = gridView4.GetRowCellValue(this.gridView4.FocusedRowHandle, "id").ToString();
            string jiyaoshangchuanren = gridView4.GetRowCellValue(this.gridView4.FocusedRowHandle, "纪要上传人").ToString();

            string sql           = "select 关联责任人 from tb_xiangxi  where  id='" + id + "'";
            string shangchuanren = Convert.ToString(SQLhelp.ExecuteScalar(sql, CommandType.Text));


            if (shangchuanren != "")
            {
                FrZhishixaingchakan form = new FrZhishixaingchakan();
                form.jiyaoneirong       = neirong;
                form.shijian            = shijian;
                form.zerenren           = zerenren;
                form.dingwei            = id;
                form.yonghu             = yonghu;
                form.jiyaoshangchuanren = jiyaoshangchuanren;
                form.ShowDialog();
            }
            if (shangchuanren == "")
            {
                if (yonghu == "庄卫星")
                {
                    string sql12 = "update tb_xiangxi  set 更新 = '' where id='" + id + "'";
                    SQLhelp.ExecuteScalar(sql12, CommandType.Text);

                    Reload();
                    FrZhishixaingchakan form = new FrZhishixaingchakan();
                    form.jiyaoneirong       = neirong;
                    form.shijian            = shijian;
                    form.zerenren           = zerenren;
                    form.dingwei            = id;
                    form.yonghu             = yonghu;
                    form.jiyaoshangchuanren = jiyaoshangchuanren;
                    form.ShowDialog();
                }
                if (yonghu != "庄卫星")
                {
                    FrZhishixaingchakan form = new FrZhishixaingchakan();
                    form.jiyaoneirong       = neirong;
                    form.shijian            = shijian;
                    form.zerenren           = zerenren;
                    form.dingwei            = id;
                    form.yonghu             = yonghu;
                    form.jiyaoshangchuanren = jiyaoshangchuanren;
                    form.ShowDialog();
                }
            }
        }
示例#2
0
        private void dataGridViewX2_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridViewX2.Rows.Count <= 0)//判断是否选中要删除的行
            {
                MessageBox.Show("请选中行");
                return;
            }

            string zerenren           = dataGridViewX2.CurrentRow.Cells["完成责任人2"].Value.ToString();
            string neirong            = dataGridViewX2.CurrentRow.Cells["纪要内容2"].Value.ToString();
            string shijian            = dataGridViewX2.CurrentRow.Cells["会议时间2"].Value.ToString();
            string id                 = dataGridViewX2.CurrentRow.Cells["id2"].Value.ToString();
            string jiyaoshangchuanren = dataGridViewX2.CurrentRow.Cells["纪要上传人2"].Value.ToString();

            string sql           = "select 关联责任人 from tb_xiangxi  where  id='" + id + "'";
            string shangchuanren = Convert.ToString(SQLhelp.ExecuteScalar(sql, CommandType.Text));


            if (shangchuanren != "")
            {
                FrZhishixaingchakan form = new FrZhishixaingchakan();
                form.jiyaoneirong       = neirong;
                form.shijian            = shijian;
                form.zerenren           = zerenren;
                form.dingwei            = id;
                form.yonghu             = yonghu;
                form.jiyaoshangchuanren = jiyaoshangchuanren;
                form.ShowDialog();
            }
            if (shangchuanren == "")
            {
                if (yonghu == "庄卫星")
                {
                    string sql12 = "update tb_xiangxi  set 更新 = '' where id='" + id + "'";
                    SQLhelp.ExecuteScalar(sql12, CommandType.Text);

                    Reload();
                    FrZhishixaingchakan form = new FrZhishixaingchakan();
                    form.jiyaoneirong       = neirong;
                    form.shijian            = shijian;
                    form.zerenren           = zerenren;
                    form.dingwei            = id;
                    form.yonghu             = yonghu;
                    form.jiyaoshangchuanren = jiyaoshangchuanren;
                    form.ShowDialog();
                }


                if (yonghu != "庄卫星")
                {
                    FrZhishixaingchakan form = new FrZhishixaingchakan();
                    form.jiyaoneirong       = neirong;
                    form.shijian            = shijian;
                    form.zerenren           = zerenren;
                    form.dingwei            = id;
                    form.yonghu             = yonghu;
                    form.jiyaoshangchuanren = jiyaoshangchuanren;
                    form.ShowDialog();
                }
            }
        }