/// <summary>
        /// 点击保存按钮时触发的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lbl_baocun_Click(object sender, EventArgs e)
        {
            //构造qingjaiinfo
            JJTaskInfo myinfo = new JJTaskInfo()
            {
                _shiyou            = tb_shiyou.Text,
                _jinjichengdu      = rb_putong.Checked ? "普通" : "紧急",
                _qingjiatianshu    = Convert.ToInt32(tb_qingjaitianshu.Text),
                _qizhishijian      = $"{dtp_start.Value.ToString()}|{dtp_end.Value.ToString()}",
                _weituoduixiang    = tb_weituoren.Text,
                _shenherenyuan     = tb_shenherenyuan.Text,
                _shenheyijian      = tb_shenheyijian.Text,
                _xiaojiaqingkuang  = tb_xiaojiaqingkuang.Text,
                _chuangjianshijian = DateTime.Now.ToString(),
                _chuangjianren     = JJLoginInfo._shiming,
                _leixing           = "请休假单",
                _zhuangtai         = "保存"
            };

            //保存
            bool b = _mycontroller.SaveQingxiujia(myinfo);

            if (b)
            {
                JJMethod.a_checknewtask(null, null);

                MessageBox.Show("保存成功!");
                this.DialogResult = DialogResult.OK;
            }
        }
Esempio n. 2
0
        private void lbl_baocun_Click(object sender, EventArgs e)
        {
            //构造一个jjtongzhiinfo
            JJTaskInfo myinfo = new JJTaskInfo
            {
                _biaoti            = tb_biaoti.Text,
                _chuangjianren     = JJLoginInfo._shiming,
                _fankuiduixiang    = tb_fankuiduixiang.Text,
                _neirong           = tb_neirong.Text,
                _chuangjianshijian = DateTime.Now.ToString(),
                _jinjichengdu      = rb_jinji.Checked == true ? "紧急" : "普通",
                _chuliyijian       = tb_chuliyijian.Text,
                _leixing           = "意见建议",
                _zhuangtai         = "保存"
            };
            //保存jjtonzhiinfo
            bool b = _mycontroller.SaveYijian(myinfo);

            if (b)
            {
                JJMethod.a_checknewtask(null, null);

                MessageBox.Show("保存成功!");
            }
        }
        /// <summary>
        /// 点击发送办理按钮时触发的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void label10_Click(object sender, EventArgs e)
        {
            //再发送之前先保存任务信息

            //构造qingjaiinfo
            JJTaskInfo myinfo = new JJTaskInfo()
            {
                _shiyou            = tb_shiyou.Text,
                _jinjichengdu      = rb_putong.Checked ? "普通" : "紧急",
                _qingjiatianshu    = Convert.ToInt32(tb_qingjaitianshu.Text),
                _qizhishijian      = $"{dtp_start.Value.ToString()}|{dtp_end.Value.ToString()}",
                _weituoduixiang    = tb_weituoren.Text,
                _shenherenyuan     = tb_shenherenyuan.Text,
                _shenheyijian      = tb_shenheyijian.Text,
                _xiaojiaqingkuang  = tb_xiaojiaqingkuang.Text,
                _chuangjianshijian = DateTime.Now.ToString(),
                _chuangjianren     = JJLoginInfo._shiming,
                _leixing           = "请休假单",
                _zhuangtai         = "保存"
            };

            //保存
            bool b = _mycontroller.SaveQingxiujia(myinfo);

            //分解委托对象
            string[] arr_weituoduixiang = Regex.Split(tb_weituoren.Text, ",");
            //分解审核人员
            string[] arr_shenherenyuan = Regex.Split(tb_shenherenyuan.Text, ",");
            foreach (string weituoren in arr_weituoduixiang)
            {
                foreach (string shenheduixiang in arr_shenherenyuan)
                {
                    //构造一个jjtongzhiinfo
                    JJTaskInfo info = new JJTaskInfo
                    {
                        _shiyou           = tb_shiyou.Text,
                        _jinjichengdu     = rb_putong.Checked ? "普通" : "紧急",
                        _qingjiatianshu   = Convert.ToInt32(tb_qingjaitianshu.Text),
                        _qizhishijian     = $"{dtp_start.Value.ToString()}|{dtp_end.Value.ToString()}",
                        _weituoduixiang   = weituoren,
                        _shenherenyuan    = shenheduixiang,
                        _shenheyijian     = tb_shenheyijian.Text,
                        _xiaojiaqingkuang = tb_xiaojiaqingkuang.Text,
                        _fasongshijian    = DateTime.Now.ToString(),
                        _fasongren        = JJLoginInfo._shiming,
                        _leixing          = "请休假单",
                        _zhuangtai        = "未读"
                    };
                    //拆解反馈对象,对每一个对象,向任务信息表中插入一条jjtaskinfo
                    b = _mycontroller.FasongBanli(info);
                }
            }
            JJMethod.a_checknewtask(null, null);
            MessageBox.Show("发送办理成功!");
        }
        /// <summary>
        /// 点击发送办理按钮时触发的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_fasongbanli_Click(object sender, EventArgs e)
        {
            //发送任务之前,需要先保存任务信息,方便打开的时候调用
            //构造一个jjtongzhiinfo
            JJTaskInfo myinfo = new JJTaskInfo
            {
                _mingcheng         = tb_renwumingcheng.Text,
                _jinjichengdu      = rb_jinji.Checked == true ? "紧急" : "普通",
                _jutiyaoqiu        = tb_jutiyaoqiu.Text,
                _fujian            = string.Join("|", uCfujian1.list_fujian),
                _shixian           = dtp_shixian.Value.ToString("yyyy-MM-dd hh:mm:ss"),
                _banliyijian       = tb_banliyijian.Text,
                _banlirenyuan      = tb_banlirenyuan.Text,
                _jinzhanqingkuang  = tb_jinzhanqingkuang.Text,
                _chuangjianshijian = DateTime.Now.ToString(),
                _chuangjianren     = JJLoginInfo._shiming,
                _leixing           = "常规事项",
                _zhuangtai         = "保存"
            };

            //添加任务
            bool b = mycontroller.AddTask(myinfo);

            //分解办理人员
            string[] arr_banlirenyuan = Regex.Split(tb_banlirenyuan.Text, ",");
            foreach (string s in arr_banlirenyuan)
            {
                //构造一个jjtongzhiinfo
                myinfo = new JJTaskInfo
                {
                    _mingcheng        = tb_renwumingcheng.Text,
                    _jinjichengdu     = rb_jinji.Checked == true ? "紧急" : "普通",
                    _jutiyaoqiu       = tb_jutiyaoqiu.Text,
                    _fujian           = string.Join("|", uCfujian1.list_fujian),
                    _shixian          = dtp_shixian.Value.ToString("yyyy-MM-dd hh:mm:ss"),
                    _banliyijian      = tb_banliyijian.Text,
                    _banlirenyuan     = s,
                    _jinzhanqingkuang = tb_jinzhanqingkuang.Text,
                    _fasongshijian    = DateTime.Now.ToString(),
                    _fasongren        = JJLoginInfo._shiming,
                    _leixing          = "常规事项",
                    _zhuangtai        = "未读"
                };
                //拆解反馈对象,对每一个对象,向任务信息表中插入一条jjtaskinfo
                b = mycontroller.FasongBanli(myinfo);
            }
            JJMethod.a_checknewtask(null, null);
            MessageBox.Show("发送办理成功!");
        }
        private void btn_baocun_Click(object sender, EventArgs e)
        {
            //判断信息是否为空
            bool b1 = tb_renwumingcheng.Text.Trim().Equals(string.Empty);
            bool b2 = tb_jutiyaoqiu.Text.Trim().Equals(string.Empty);

            if (b1)
            {
                MessageBox.Show("任务名称未填写!");
                return;
            }
            if (b2)
            {
                MessageBox.Show("详情未填写!");
                return;
            }
            //构造一个jjtongzhiinfo
            JJTaskInfo myinfo = new JJTaskInfo
            {
                _mingcheng         = tb_renwumingcheng.Text,
                _jinjichengdu      = rb_jinji.Checked == true ? "紧急" : "普通",
                _jutiyaoqiu        = tb_jutiyaoqiu.Text,
                _fujian            = string.Join("|", uCfujian1.list_fujian),
                _shixian           = dtp_shixian.Value.ToString("yyyy-MM-dd hh:mm:ss"),
                _banliyijian       = tb_banliyijian.Text,
                _banlirenyuan      = tb_banlirenyuan.Text,
                _jinzhanqingkuang  = tb_jinzhanqingkuang.Text,
                _chuangjianshijian = DateTime.Now.ToString(),
                _chuangjianren     = JJLoginInfo._shiming,
                _leixing           = "常规事项",
                _zhuangtai         = "保存"
            };

            //添加任务
            bool b = mycontroller.AddTask(myinfo);

            if (b)
            {
                JJMethod.a_checknewtask(null, null);

                MessageBox.Show("保存成功!");
                mytask            = myinfo;
                this.DialogResult = DialogResult.OK;
            }
        }
Esempio n. 6
0
        /// <summary>
        /// 点击发送办理按钮时触发的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lbl_fasongbanli_Click(object sender, EventArgs e)
        {
            //再发送之前,先保存本任务
            //构造一个jjtongzhiinfo
            JJTaskInfo myinfo = new JJTaskInfo
            {
                _biaoti            = tb_biaoti.Text,
                _chuangjianren     = JJLoginInfo._shiming,
                _fankuiduixiang    = tb_fankuiduixiang.Text,
                _neirong           = tb_neirong.Text,
                _chuangjianshijian = DateTime.Now.ToString(),
                _jinjichengdu      = rb_jinji.Checked == true ? "紧急" : "普通",
                _chuliyijian       = tb_chuliyijian.Text,
                _leixing           = "意见建议",
                _zhuangtai         = "保存"
            };
            //保存jjtonzhiinfo
            bool b = _mycontroller.SaveYijian(myinfo);

            //分解反馈对象
            string[] arr = Regex.Split(tb_fankuiduixiang.Text, ",");
            foreach (string s in arr)
            {
                //构造一个jjtongzhiinfo
                myinfo = new JJTaskInfo
                {
                    _biaoti         = tb_biaoti.Text,
                    _fasongren      = JJLoginInfo._shiming,
                    _fankuiduixiang = s,
                    _neirong        = tb_neirong.Text,
                    _fasongshijian  = DateTime.Now.ToString(),
                    _jinjichengdu   = rb_jinji.Checked == true ? "紧急" : "普通",
                    _chuliyijian    = tb_chuliyijian.Text,
                    _leixing        = "意见建议",
                    _zhuangtai      = "未读"
                };            //拆解反馈对象,对每一个对象,向任务信息表中插入一条jjtaskinfo
                b = _mycontroller.FasongBanli(myinfo);
            }
            JJMethod.a_checknewtask(null, null);
        }
Esempio n. 7
0
        /// <summary>
        /// 点击保存按钮时触发的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lbl_baocun_Click(object sender, EventArgs e)
        {
            List <JJchengguoInfo> list = new List <JJchengguoInfo>();

            foreach (UCchengguo item in panel_my.Controls)
            {
                item.myinfo._fujian = string.Join("|", item.uCfujian1.list_fujian);
                list.Add(item.myinfo);
            }
            //序列化chengguoji
            JJchengguoji chengguoji = new JJchengguoji()
            {
                _list_chengguo = list
            };

            //构造一个jjtongzhiinfo
            JJTaskInfo myinfo = new JJTaskInfo
            {
                _mingcheng         = tb_renwumingcheng.Text,
                _mubiao            = tb_mubiao.Text,
                _zongtiyanshouren  = tb_zongtiyanshouren.Text,
                _chuangjianshijian = DateTime.Now.ToString(),
                _jinjichengdu      = rb_jinji.Checked == true ? "紧急" : "普通",
                _chuangjianren     = JJLoginInfo._shiming,
                _leixing           = "OKR事项",
                _zhuangtai         = "保存",
                _chengguoji        = JsonConvert.SerializeObject(chengguoji)
            };

            //保存信息
            bool b = _mycontroller.SaveOkrshixiang(myinfo);

            if (b)
            {
                JJMethod.a_checknewtask(null, null);

                MessageBox.Show("保存okr事项成功!");
                //this.DialogResult = DialogResult.OK;
            }
        }
Esempio n. 8
0
        private void lbl_fasongbanli_Click(object sender, EventArgs e)
        {
            //发送办理之前先保存任务信息
            List <JJchengguoInfo> list = new List <JJchengguoInfo>();

            foreach (UCchengguo item in panel_my.Controls)
            {
                item.myinfo._fujian = string.Join("|", item.uCfujian1.list_fujian);
                list.Add(item.myinfo);
            }
            //序列化chengguoji
            JJchengguoji chengguoji = new JJchengguoji()
            {
                _list_chengguo = list
            };

            //构造一个jjtongzhiinfo
            JJTaskInfo myinfo = new JJTaskInfo
            {
                _mingcheng         = tb_renwumingcheng.Text,
                _mubiao            = tb_mubiao.Text,
                _zongtiyanshouren  = tb_zongtiyanshouren.Text,
                _chuangjianshijian = DateTime.Now.ToString(),
                _jinjichengdu      = rb_jinji.Checked == true ? "紧急" : "普通",
                _chuangjianren     = JJLoginInfo._shiming,
                _leixing           = "OKR事项",
                _zhuangtai         = "保存",
                _chengguoji        = JsonConvert.SerializeObject(chengguoji)
            };

            //保存信息
            bool b = _mycontroller.SaveOkrshixiang(myinfo);



            //开始发送办理,先形成成果集
            list = new List <JJchengguoInfo>();
            foreach (UCchengguo item in panel_my.Controls)
            {
                item.myinfo._fujian = string.Join("|", item.uCfujian1.list_fujian);
                list.Add(item.myinfo);
            }
            //序列化chengguoji
            chengguoji = new JJchengguoji()
            {
                _list_chengguo = list
            };

            //分解总体验收人,获得所有的办理人员

            List <string> list_yanshouren = Regex.Split(tb_zongtiyanshouren.Text, ",").ToList();

            List <string> list_banliren = new List <string>();

            foreach (Control c in panel_my.Controls)
            {
                UCchengguo    cc        = c as UCchengguo;
                List <string> list_temp = Regex.Split(cc.myinfo._banlirenyuan, ",").ToList();
                foreach (string str in list_temp)
                {
                    if (!list_banliren.Contains(str))
                    {
                        list_banliren.Add(str);
                    }
                }
            }
            //循环添加记录
            foreach (string yanshouren in list_yanshouren)
            {
                foreach (string banliren in list_banliren)
                {
                    //构造一个jjtongzhiinfo
                    myinfo = new JJTaskInfo
                    {
                        _mingcheng        = tb_renwumingcheng.Text,
                        _mubiao           = tb_mubiao.Text,
                        _zongtiyanshouren = yanshouren,
                        _fasongshijian    = DateTime.Now.ToString(),
                        _banlirenyuan     = banliren,
                        _jinjichengdu     = rb_jinji.Checked == true ? "紧急" : "普通",
                        _fasongren        = JJLoginInfo._shiming,
                        _leixing          = "OKR事项",
                        _zhuangtai        = "未读",
                        _chengguoji       = JsonConvert.SerializeObject(chengguoji),
                    };
                    b = _mycontroller.FasongBanli(myinfo);
                }
            }

            JJMethod.a_checknewtask(null, null);
            MessageBox.Show("发送办理成功!");
        }