Exemplo n.º 1
0
        public bool manadd(Model.Wish model)
        {
            bool panduan = false;

            if (wish.manadd(model) == true)
            {
                panduan = true;
            }
            return(panduan);
        }
Exemplo n.º 2
0
        private void man_fenpei_Click_1(object sender, EventArgs e)
        {
            Model.Wish model = new Model.Wish();
            model.UserName = textBox10.Text;
            model.Result   = textBox9.Text;

            BLL.Wish wish = new BLL.Wish();
            if (wish.manadd(model) == true)
            {
                MessageBox.Show("添加成功");
            }
            else
            {
                MessageBox.Show("添加失败");
            }
        }
Exemplo n.º 3
0
        public bool manadd(Model.Wish model)
        {
            string sql = "update tb_wish set tb_result=@tb_result where username='******'";

            MySqlParameter[] parameters =
            {
                new MySqlParameter("@tb_result", MySqlDbType.VarChar, 50)
            };
            parameters[0].Value = model.Result;

            int n = SqlDbHelper.ExecuteNonQuery(sql, CommandType.Text, parameters);

            if (n > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 4
0
 public int CalculateMonth(Model.Wish W)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 5
0
 public void Delete(Model.Wish W)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 6
0
 public void Add(Model.Wish W)
 {
     _dbContext.Wishes.Add(W);
     _dbContext.SaveChanges();
 }