数据库变更CNPC_XJYJ

This commit is contained in:
2025-08-04 18:04:41 +08:00
parent bafbf97359
commit 79a7f35e22
679 changed files with 5590 additions and 3465 deletions
+5 -5
View File
@@ -9,10 +9,10 @@ namespace BLL
/// </summary>
public class WeatherService
{
public static Model.SGGLDB db = Funs.DB;
public static Model.CNPCDB db = Funs.DB;
/// <summary>
/// 根据主键获取SGGLDB
/// 根据主键获取CNPCDB
/// </summary>
/// <param name="weatherId"></param>
/// <returns></returns>
@@ -27,7 +27,7 @@ namespace BLL
/// <param name="weather"></param>
public static void AddWeather(Model.Weather weather)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
{
Model.Weather newWeather = new Model.Weather
{
@@ -49,7 +49,7 @@ namespace BLL
/// <param name="weatherId"></param>
public static void DeleteWeatherById(string weatherId)
{
Model.SGGLDB db = Funs.DB;
Model.CNPCDB db = Funs.DB;
Model.Weather weather = db.Weather.FirstOrDefault(e => e.WeatherId == weatherId);
if (weather != null)
{
@@ -65,7 +65,7 @@ namespace BLL
{
try
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
{
Model.Weather getWeather = new Model.Weather();
string appkey = "7416f4dd68c9352e02be31b12f15d74f"; //配置您申请的appkey