private void UpdataPartWord(string dataName, string dataValue, string instr) { string sql = "update partword set " + dataName + " = '" + dataValue + "' where uid in (" + instr + ")"; cmd.ExecuteNonQuery(sql); GetPartWordData(); }
private void delExpiredDbData_Elapsed(object sender, EventArgs e) { string SoftVer = !GlobalPars.GloPars.ContainsKey("SoftVer") ? "1" : GlobalPars.GloPars["SoftVer"].ToString(); if (SoftVer.Equals("3")) { string sql = "delete from ReleaseInfo where datetime(CollectDate) < datetime('now','-60 day');"; DataBaseServer.MySqlCmd dbobj = new DataBaseServer.MySqlCmd(); dbobj.ExecuteNonQuery(sql); } else if (SoftVer.Equals("2")) { string sql = "delete from ReleaseInfo where datetime(CollectDate) < datetime('now','-45 day');"; DataBaseServer.MySqlCmd dbobj = new DataBaseServer.MySqlCmd(); dbobj.ExecuteNonQuery(sql); } else { string sql = "delete from ReleaseInfo where datetime(CollectDate) < datetime('now','-30 day');"; DataBaseServer.MySqlCmd dbobj = new DataBaseServer.MySqlCmd(); dbobj.ExecuteNonQuery(sql); } }