예제 #1
0
        private void btn_gengxin_Click(object sender, EventArgs e)
        {
            //构造一个待办任务实例

            JJchangguiInfo ci = new JJchangguiInfo()
            {
                _renwumingcheng = tb_renwumingcheng.Text,
                //_jutiyaoqiu = tb_jutiyaoqiu.Text,
                //_jinzhanqingkuang = tb_jinzhan.Text,
                //_zerenren = tb_zerenren.Text,
                //_yanshouren = tb_yanshouren.Text
            };


            bool b = _mycontroller.UpdateTask(ci);

            if (b)
            {
                MessageBox.Show("更新数据成功!");
                this.DialogResult = DialogResult.OK;
            }
            ////刷新数据
            //int selectindex = dgv_data.SelectedRows[0].Index;
            //UCdaiban_Load(null, null);
            //dgv_data.Rows[0].Selected = false;
            //dgv_data.Rows[selectindex].Selected = true;
            //if (b) MessageBox.Show("更新数据成功!");
        }
예제 #2
0
        /// <summary>
        /// 更新常规事项的信息
        /// </summary>
        /// <param name="ci"></param>
        /// <returns></returns>
        public bool UpdateTask(JJchangguiInfo ci)
        {
            string str_sql = $"update 常规事项表 set 具体要求='{ci._xiangqing}',进展情况='{ci._jinzhanqingkuang}',责任人='{ci._fuzeren}',验收人='{ci._canjiaren}' where 任务名称='{ci._renwumingcheng}'";
            int    num     = mysqlhelper.ExecuteNonQuery(str_sql, null);

            return(num > 0 ? true : false);
        }
예제 #3
0
 /// <summary>
 /// 构造函数2
 /// </summary>
 /// <param name="renwuming">任务名称</param>
 public WFdaiban(JJchangguiInfo ci)
 {
     InitializeComponent();
     //获得任务详细信息,赋值到界面中
     tb_renwumingcheng.Text = ci._renwumingcheng;
     //tb_jutiyaoqiu.Text = ci._jutiyaoqiu;
     //tb_jinzhan.Text = ci._jinzhanqingkuang;
     //tb_zerenren.Text = ci._zerenren;
     //tb_yanshouren.Text = ci._yanshouren;
 }
예제 #4
0
        /// <summary>
        /// 验收已提交的任务
        /// </summary>
        /// <param name="renwumingcheng">任务名称</param>
        /// <param name="yanshouren">验收人</param>
        /// <returns></returns>
        public bool YanshouRenwu(JJchangguiInfo ci)
        {
            // string str_date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            string str_sql = string.Empty;

            // for (int i = 0; i < person.Count; i++)
            //{
            //str_sql = $"insert into jjtasksend values('{renwumingcheng}','{banliren}','{str_date}','已发送','{yanshouren}')";
            str_sql = $"update 常规事项表 set 状态='通过验收' where 任务名称='{ci._renwumingcheng}'";
            int num = mysqlhelper.ExecuteNonQuery(str_sql, null);

            return(num > 0 ? true : false);
        }
예제 #5
0
        private void btn_yanshou_Click(object sender, EventArgs e)
        {
            //将选中的任务构造jjchangguinifo实例
            JJchangguiInfo info = new JJchangguiInfo()
            {
                _renwumingcheng = tb_renwumingcheng.Text
            };
            //将任务名称和发送时间,办理人员存入数据库中jjtasksend
            bool b = _mycontroller.TijiaoYanshou(info);

            if (b)
            {
                MessageBox.Show("任务已提交验收!");
                this.DialogResult = DialogResult.OK;
            }
        }
예제 #6
0
        /// <summary>
        /// 点击通过验收按钮时触发的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_tongguoyanshou_Click(object sender, EventArgs e)
        {
            //将选中的任务构造jjchangguinifo实例
            JJchangguiInfo info = new JJchangguiInfo()
            {
                _renwumingcheng = tb_renwumingcheng.Text
            };
            //将任务名称和发送时间,办理人员存入数据库中jjtasksend
            bool b = mycontroller.YanshouRenwu(info);

            if (b)
            {
                //刷新数据
                //刷新数据
                int selectindex = dgv_data.SelectedRows[0].Index;
                UCdaiban_Load(null, null);
                dgv_data.Rows[0].Selected           = false;
                dgv_data.Rows[selectindex].Selected = true;
                MessageBox.Show("任务已通过验收!");
            }
        }
예제 #7
0
        /// <summary>
        /// 点击提交验收按钮时触发的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_yanshou_Click(object sender, EventArgs e)
        {
            //将选中的任务构造jjchangguinifo实例
            DataGridViewRow mydr = dgv_data.CurrentRow;
            JJchangguiInfo  info = new JJchangguiInfo()
            {
                _renwumingcheng = mydr.Cells["任务名称"].Value.ToString()
            };
            //将任务名称和发送时间,办理人员存入数据库中jjtasksend
            bool b = mycontroller.TijiaoYanshou(info);

            if (b)
            {
                //刷新数据
                int selectindex = dgv_data.SelectedRows[0].Index;
                UCdaiban_Load(null, null);
                dgv_data.Rows[0].Selected           = false;
                dgv_data.Rows[selectindex].Selected = true;


                MessageBox.Show("任务已提交验收!");
            }
        }