Ejemplo n.º 1
0
        //提交按钮
        private void btn_submit_Click(object sender, EventArgs e)
        {
            Entity.FindBug fb = new Entity.FindBug();
            try
            {
                //字符串变量type接收问题类型
                int Type = -1;
                if (this.rad_type1.Checked)
                {
                    Type = 0;
                }
                else if (this.rad_type2.Checked)
                {
                    Type = 1;
                }
                else
                {
                    Type = 2;
                }

                fb.title = this.txt_bugTitle.Text;
                fb.type  = Type;
                fb.call  = this.txt_call.Text;
                fb.text  = this.txt_bugText.Text;
                if (BLL.FindBugBLL.SubQuestion(fb))
                {
                    Msg.Box.Show("感谢您的反馈,我们将会及时处理!");
                    this.Hide();
                }
            }
            catch (Entity.HrmException he)
            {
                Msg.Box.Show(he.Message);
            }
        }
Ejemplo n.º 2
0
 public static bool SubQuestion(Entity.FindBug fb)
 {
     if (DAL.FinBugDAL.SubQuestion(fb) > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 提交使用反馈
        /// </summary>
        /// <param name="fb"></param>
        /// <returns></returns>
        public static int SubQuestion(Entity.FindBug fb)
        {
            string sql = string.Format("insert into FindBug values('{0}',{1},'{2}','{3}')", fb.title, fb.type, fb.call, fb.text);

            return(DBHelper.GetLine(sql));
        }