全局处理问题:public static Model.SGGLDB db = Funs.DB;
This commit is contained in:
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public static class DepartService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
|
||||
public static class LogService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加操作日志
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public static class RoleItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取角色明细信息
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
public static class RoleService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取角色信息
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BLL
|
||||
|
||||
public static class SysHttplogService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
|
||||
#region 获取列表
|
||||
@@ -25,6 +25,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Sys_HttpLog> GetSys_HttpLogByModle(Model.Sys_HttpLog table)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = from x in db.Sys_HttpLog
|
||||
where
|
||||
(string.IsNullOrEmpty(table.HttpLogId) || x.HttpLogId.Contains(table.HttpLogId)) &&
|
||||
@@ -74,13 +75,14 @@ namespace BLL
|
||||
|
||||
public static Model.Sys_HttpLog GetSys_HttpLogById(string HttpLogId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return db.Sys_HttpLog.FirstOrDefault(x => x.HttpLogId == HttpLogId);
|
||||
}
|
||||
|
||||
|
||||
public static void AddSys_HttpLog(Model.Sys_HttpLog newtable)
|
||||
{
|
||||
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Sys_HttpLog table = new Model.Sys_HttpLog
|
||||
{
|
||||
HttpLogId = newtable.HttpLogId,
|
||||
@@ -96,7 +98,7 @@ namespace BLL
|
||||
|
||||
public static void AddBulkSys_HttpLog(List<Model.Sys_HttpLog> newtables)
|
||||
{
|
||||
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
db.Sys_HttpLog.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -104,7 +106,7 @@ namespace BLL
|
||||
|
||||
public static void UpdateSys_HttpLog(Model.Sys_HttpLog newtable)
|
||||
{
|
||||
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Sys_HttpLog table = db.Sys_HttpLog.FirstOrDefault(x => x.HttpLogId == newtable.HttpLogId);
|
||||
if (table != null)
|
||||
{
|
||||
@@ -120,7 +122,7 @@ namespace BLL
|
||||
}
|
||||
public static void DeleteSys_HttpLogById(string HttpLogId)
|
||||
{
|
||||
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Sys_HttpLog table = db.Sys_HttpLog.FirstOrDefault(x => x.HttpLogId == HttpLogId);
|
||||
if (table != null)
|
||||
{
|
||||
@@ -132,6 +134,7 @@ namespace BLL
|
||||
|
||||
public static void DeleteALLSys_HttpLog()
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
if (db.Sys_HttpLog != null)
|
||||
{
|
||||
db.Sys_HttpLog.DeleteAllOnSubmit(db.Sys_HttpLog);
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public static class SysMenuService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据MenuId获取菜单名称项
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class UnitService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取单位信息
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
|
||||
public static class UserService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户信息
|
||||
|
||||
Reference in New Issue
Block a user