Exemple #1
0
        private void UpdataPartWord(string dataName, string dataValue, string instr)
        {
            string sql = "update partword set " + dataName + " = '" + dataValue + "' where uid in (" + instr + ")";

            cmd.ExecuteNonQuery(sql);
            GetPartWordData();
        }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
 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);
     }
 }