Пример #1
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public int Update(Model.SatelliteSensor model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("UPDATE LHF.SATELLITE_SENSOR SET ");
            strSql.Append("SAT_ID=" + model.SAT_ID + ",");
            strSql.Append("SAT_NAME='" + model.SAT_NAME + "',");
            strSql.Append("SENSOR_TYPE=" + model.SENSOR_TYPE + ",");
            strSql.Append("APPLICATION='" + model.APPLICATION + "',");
            strSql.Append("FOV=" + model.FOV + ",");
            strSql.Append("SWATHWIDTH=" + model.SWATHWIDTH + ",");
            strSql.Append("ACROSSPOINTINGRANGE=" + model.ACROSSPOINTINGRANGE + ",");
            strSql.Append("ALONGPOINTINGRANGE=" + model.ALONGPOINTINGRANGE + ",");
            strSql.Append("LOCATIONACCURACY=" + model.LOCATIONACCURACY + ",");
            strSql.Append("NUMOFBANDS=" + model.NUMOFBANDS + ",");
            strSql.Append("BANDCATEGORIES='" + model.BANDCATEGORIES + "',");
            strSql.Append("ACCURACY='" + model.ACCURACY + "',");
            strSql.Append("REVISITTIME=" + model.REVISITTIME + ",");
            strSql.Append("INSTRUMENTDESCRIPTION='" + model.INSTRUMENTDESCRIPTION + "',");
            strSql.Append("DATA_ACCESS='" + model.DATA_ACCESS + "',");
            strSql.Append("DATA_FORMAT='" + model.DATA_FORMAT + "',");
            strSql.Append("INCLINATION=" + model.INCLINATION);
            strSql.Append(" WHERE SENSOR_ID=" + model.SENSOR_ID);

            return(DbHelperSQL.ExecuteSql(strSql.ToString()));
        }
Пример #2
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(Model.SatelliteSensor model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("INSERT INTO LHF.SATELLITE_SENSOR(");
            strSql.Append("SENSOR_ID,SENSOR_NAME,SAT_ID,SAT_NAME,SENSOR_TYPE,APPLICATION,FOV,SWATHWIDTH,ACROSSPOINTINGRANGE,ALONGPOINTINGRANGE,LOCATIONACCURACY,NUMOFBANDS,BANDCATEGORIES,ACCURACY,REVISITTIME,INSTRUMENTDESCRIPTION,DATA_ACCESS,DATA_FORMAT,MAXGSD,INCLINATION)");
            strSql.Append(" VALUES (");
            strSql.Append(model.SENSOR_ID + ",'" + model.SENSOR_NAME + "'," + model.SAT_ID + ",'" + model.SAT_NAME + "'," + model.SENSOR_TYPE + ",'" + model.APPLICATION + "'," + model.FOV + "," + model.SWATHWIDTH + "," + model.ACROSSPOINTINGRANGE + "," + model.ALONGPOINTINGRANGE + "," + model.LOCATIONACCURACY + "," + model.NUMOFBANDS + ",'" + model.BANDCATEGORIES + "','" + model.ACCURACY + "'," + model.REVISITTIME + ",'" + model.INSTRUMENTDESCRIPTION + "','" + model.DATA_ACCESS + "' , '" + model.DATA_FORMAT + "',-1," + model.INCLINATION + ")");
            return(DbHelperSQL.ExecuteSql(strSql.ToString()));
        }