public bool manadd(Model.Wish model) { bool panduan = false; if (wish.manadd(model) == true) { panduan = true; } return(panduan); }
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("添加失败"); } }
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); } }
public int CalculateMonth(Model.Wish W) { throw new NotImplementedException(); }
public void Delete(Model.Wish W) { throw new NotImplementedException(); }
public void Add(Model.Wish W) { _dbContext.Wishes.Add(W); _dbContext.SaveChanges(); }