实现了添加设备的弹出对话框,未完成对话框的内容

This commit is contained in:
2025-06-12 13:15:55 +08:00
parent bcfa3df3d3
commit ea15ea594a
10 changed files with 181 additions and 19 deletions

View File

@@ -9,21 +9,21 @@ public class DevicesRepositories:BaseRepositories
}
public async Task<int> Add(DbPLC dbPLC)
public async Task<int> Add(DbDevice dbDevice)
{
return await _db.Insertable<DbPLC>(dbPLC).ExecuteCommandAsync();
return await _db.Insertable<DbDevice>(dbDevice).ExecuteCommandAsync();
}
public async Task<List<DbPLC>> GetAll()
public async Task<List<DbDevice>> GetAll()
{
return await _db.Queryable<DbPLC>().ToListAsync();
return await _db.Queryable<DbDevice>().ToListAsync();
}
public async Task<DbPLC> GetById(int id)
public async Task<DbDevice> GetById(int id)
{
return await _db.Queryable<DbPLC>().FirstAsync(p=>p.id == id);
return await _db.Queryable<DbDevice>().FirstAsync(p=>p.Id == id);
}
public async Task<int> DeleteById(int id)
{
return await _db.Deleteable<DbPLC>(new DbPLC() { id = id }).ExecuteCommandAsync();
return await _db.Deleteable<DbDevice>(new DbDevice() { Id = id }).ExecuteCommandAsync();
}
}