Esempio n. 1
0
        /// <summary>
        /// 提交自评
        /// </summary>
        /// <param name="ap"></param>
        /// <returns></returns>
        public static int gets(Entity.Appraise ap)
        {
            string sqlstr = "insert into Appraise values('" + ap.pID + "','" + ap.aTIme + "','待审核','" + ap.aText + "','员工自评','" + ap.aRate + "')";
            int    i      = DBHelper.GetLine(sqlstr);

            return(i);
        }
Esempio n. 2
0
        private void btn_sub_Click(object sender, EventArgs e)
        {
            if (this.textBox1.Text == "")
            {
                MessageBox.Show("请您填写自评内容!");
                return;
            }
            if (this.comboBox1.Text == "")
            {
                MessageBox.Show("请您选择自评等级!");
                return;
            }

            Entity.Appraise ap = new Entity.Appraise();
            ap.pID   = p.pID;
            ap.aTIme = DateTime.Now;
            ap.aText = this.textBox1.Text;
            ap.aRate = this.comboBox1.Text;
            if (EBLL.GoodsBLL.gets(ap) == true)
            {
                MessageBox.Show("恭喜您,自评提交成功");
                this.textBox1.Clear();
            }
            else
            {
                MessageBox.Show("抱歉,自评提交失败");
                return;
            }
        }
Esempio n. 3
0
 /// <summary>
 /// 提交自评
 /// </summary>
 /// <param name="ap"></param>
 /// <returns></returns>
 public static bool gets(Entity.Appraise ap)
 {
     if (EDAL.GoodsDAL.gets(ap) > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Esempio n. 4
0
        private void button2_Click(object sender, EventArgs e)
        {
            Entity.Appraise ap = new Entity.Appraise();
            try
            {
                ap.pID   = int.Parse(this.textBox1.Text);
                ap.aTIme = this.dateTimePicker1.Value;
                ap.ABoss = users.uName;
                ap.aRate = this.comboBox1.Text;;
                ap.aText = this.textBox3.Text;
                ap.aType = "高层直评";
            }
            catch (Exception he)
            {
                Msg.Box.Show(he.Message);
                return;
            }

            try
            {
                if (BLL.AppraiseBLL.Appraise1(ap) == true)
                {
                    Msg.Box.Show("恭喜您,添加成功");
                }
            }
            catch (Exception)
            {
                Msg.Box.Show("您输入的工号有误!");
                return;
            }



            //清空
            this.textBox1.Text = this.textBox2.Text = this.textBox3.Text = this.comboBox1.Text = "";
        }