예제 #1
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (this.isModified) //  修改
            {
                DBUtil.ExecuteSQL("UPDATE project_plan SET plan_name ='" +
                                  this.jihuamingcheng.Text +
                                  "',start_time ='" + this.kaishishijian.Text +
                                  "' , end_time = '" + this.jieshushijian.Text +
                                  "' , emp_id = '" + EmpService.findEmpIdByName(this.empDtos, this.combo负责人.Text) + "'    WHERE    id = '" + planId + "'");
            }
            else
            {
                String uuid = System.Guid.NewGuid().ToString("N");

                //string str = this.dateEdit1.Text;
                //string str1 = this.dateEdit2.Text;

                DBUtil.ExecuteSQL("INSERT INTO project_plan(id,plan_name,start_time,end_time,emp_id)  " +
                                  " VALUES  ('" + uuid + "','" + this.jihuamingcheng.Text + "','" + this.kaishishijian.Text + "','" + this.jieshushijian.Text + "','"
                                  + EmpService.findEmpIdByName(this.empDtos, this.combo负责人.Text)
                                  + "')");
            }
            this.frmbiao.refreshPlan();
            this.Close();
        }
예제 #2
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(form.plid))
            {
            }
            else
            {
                DeclareDTO declareDTO = new DeclareDTO(System.Guid.NewGuid().ToString("N"), form.plid, this.biaoti.Text, EmpService.findEmpIdByName(this.empDtos, this.combo负责人.Text), EmpService.findEmpIdByName(this.empDtos, this.combo参与者.Text), this.neirong.Text, "0", this.textBox2.Text);
                PlanService.insertDeclare(declareDTO);
                MessageBox.Show("保存成功");

                //  刷新项目申报书
                this.form.refreshDeclare();
                this.Close();
            }
        }