public bool Ga_AddQRcode(Ga_qrcode qr) { StringBuilder SQLString = new StringBuilder(); SQLString.Append("INSERT INTO `ga_agv`.`ga_qrcode`(`qrInfo`, `qrX`, `qrY`, `qrStatus`, `qrRemark`) VALUES (@qrInfo, @qrX, @qrY, @qrStatus, @qrRemark)"); MySqlParameter[] cmdParms = { new MySqlParameter("@qrInfo", MySqlDbType.VarChar) { Value = qr.qrInfo }, new MySqlParameter("@qrX", MySqlDbType.Int32) { Value = qr.qrX }, new MySqlParameter("@qrY", MySqlDbType.Int32) { Value = qr.qrY }, new MySqlParameter("@qrStatus", MySqlDbType.Int32) { Value = qr.qrStatus }, new MySqlParameter("@qrRemark", MySqlDbType.VarChar) { Value = qr.qrRemark }, }; return(MySqlHelper.ExecuteNonQuery(SQLString.ToString(), cmdParms) > 0 ? true : false); }
public bool Ga_UpQRcode(Ga_qrcode qr) { StringBuilder SQLString = new StringBuilder(); SQLString.Append("UPDATE `ga_agv`.`ga_qrcode` SET `qrInfo` = @qrInfo, `qrX` = @qrX, `qrY` = @qrY, `qrStatus` = @qrStatus, `qrRemark` = @qrRemark WHERE `qrId` = @qrId"); MySqlParameter[] cmdParms = { new MySqlParameter("@qrId", MySqlDbType.Int32) { Value = qr.qrId }, new MySqlParameter("@qrInfo", MySqlDbType.VarChar) { Value = qr.qrInfo }, new MySqlParameter("@qrX", MySqlDbType.Int32) { Value = qr.qrX }, new MySqlParameter("@qrY", MySqlDbType.Int32) { Value = qr.qrY }, new MySqlParameter("@qrStatus", MySqlDbType.Int32) { Value = qr.qrStatus }, new MySqlParameter("@qrRemark", MySqlDbType.VarChar) { Value = qr.qrRemark }, }; return(MySqlHelper.ExecuteNonQuery(SQLString.ToString(), cmdParms) > 0 ? true : false); }
public JsonResult UpQRCode([FromBody] Ga_qrcode qrcode) { if (BLL.Ga_UpQRcodeBLL(qrcode)) { return(new JsonResult() { Message = "修改成功", Success = true }); } else { return(new JsonResult() { Message = "修改失败", Success = false }); } }
public bool Ga_UpQRcodeBLL(Ga_qrcode qr) { return(ga_qrcodeDAL.Ga_UpQRcode(qr)); }