modified all admin UIs to position action buttons on the left side of grids and implemented ActionDialog throughout rather than dedicated delete components

This commit is contained in:
Shaun Walker
2019-11-04 23:29:35 -05:00
parent 156f5b5f94
commit ab564f7244
32 changed files with 737 additions and 732 deletions

View File

@ -0,0 +1,49 @@
using System.Collections.Generic;
using System.Linq;
using Oqtane.Models;
using Microsoft.EntityFrameworkCore;
using System;
namespace Oqtane.Repository
{
public class ScheduleLogRepository : IScheduleLogRepository
{
private MasterDBContext db;
public ScheduleLogRepository(MasterDBContext context)
{
db = context;
}
public IEnumerable<ScheduleLog> GetScheduleLogs()
{
return db.ScheduleLog.ToList();
}
public ScheduleLog AddScheduleLog(ScheduleLog ScheduleLog)
{
db.ScheduleLog.Add(ScheduleLog);
db.SaveChanges();
return ScheduleLog;
}
public ScheduleLog UpdateScheduleLog(ScheduleLog ScheduleLog)
{
db.Entry(ScheduleLog).State = EntityState.Modified;
db.SaveChanges();
return ScheduleLog;
}
public ScheduleLog GetScheduleLog(int ScheduleLogId)
{
return db.ScheduleLog.Find(ScheduleLogId);
}
public void DeleteScheduleLog(int ScheduleLogId)
{
ScheduleLog schedulelog = db.ScheduleLog.Find(ScheduleLogId);
db.ScheduleLog.Remove(schedulelog);
db.SaveChanges();
}
}
}