添加业务层
This commit is contained in:
91
CleanMachine.BLL/CleanModeBLL.cs
Normal file
91
CleanMachine.BLL/CleanModeBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\CleanModeBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CleanModeBLL
|
||||
{
|
||||
|
||||
public CleanModeBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string CleanModeId)
|
||||
{
|
||||
return new CleanModeDAL().Exists(CleanModeId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.CleanMode model)
|
||||
{
|
||||
return new CleanModeDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.CleanMode model)
|
||||
{
|
||||
return new CleanModeDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new CleanModeDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string CleanModeId)
|
||||
{
|
||||
return new CleanModeDAL().Delete(CleanModeId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.CleanMode> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new CleanModeDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.CleanMode GetModel(string CleanModeId)
|
||||
{
|
||||
return new CleanModeDAL().GetModel(CleanModeId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.CleanMode> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new CleanModeDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/ContaminationDtlBLL.cs
Normal file
91
CleanMachine.BLL/ContaminationDtlBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\ContaminationDtlBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ContaminationDtlBLL
|
||||
{
|
||||
|
||||
public ContaminationDtlBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string ContaminationDtlId)
|
||||
{
|
||||
return new ContaminationDtlDAL().Exists(ContaminationDtlId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.ContaminationDtl model)
|
||||
{
|
||||
return new ContaminationDtlDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.ContaminationDtl model)
|
||||
{
|
||||
return new ContaminationDtlDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new ContaminationDtlDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string ContaminationDtlId)
|
||||
{
|
||||
return new ContaminationDtlDAL().Delete(ContaminationDtlId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.ContaminationDtl> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new ContaminationDtlDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.ContaminationDtl GetModel(string ContaminationDtlId)
|
||||
{
|
||||
return new ContaminationDtlDAL().GetModel(ContaminationDtlId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.ContaminationDtl> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new ContaminationDtlDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/ContaminationTypeBLL.cs
Normal file
91
CleanMachine.BLL/ContaminationTypeBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\ContaminationTypeBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ContaminationTypeBLL
|
||||
{
|
||||
|
||||
public ContaminationTypeBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string ContaminationTypeId)
|
||||
{
|
||||
return new ContaminationTypeDAL().Exists(ContaminationTypeId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.ContaminationType model)
|
||||
{
|
||||
return new ContaminationTypeDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.ContaminationType model)
|
||||
{
|
||||
return new ContaminationTypeDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new ContaminationTypeDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string ContaminationTypeId)
|
||||
{
|
||||
return new ContaminationTypeDAL().Delete(ContaminationTypeId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.ContaminationType> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new ContaminationTypeDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.ContaminationType GetModel(string ContaminationTypeId)
|
||||
{
|
||||
return new ContaminationTypeDAL().GetModel(ContaminationTypeId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.ContaminationType> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new ContaminationTypeDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/LanguageBLL.cs
Normal file
91
CleanMachine.BLL/LanguageBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\LanguageBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LanguageBLL
|
||||
{
|
||||
|
||||
public LanguageBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string LanguageId)
|
||||
{
|
||||
return new LanguageDAL().Exists(LanguageId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.Language model)
|
||||
{
|
||||
return new LanguageDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.Language model)
|
||||
{
|
||||
return new LanguageDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new LanguageDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string LanguageId)
|
||||
{
|
||||
return new LanguageDAL().Delete(LanguageId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.Language> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new LanguageDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.Language GetModel(string LanguageId)
|
||||
{
|
||||
return new LanguageDAL().GetModel(LanguageId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.Language> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new LanguageDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/LanguageControlBLL.cs
Normal file
91
CleanMachine.BLL/LanguageControlBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\LanguageControlBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LanguageControlBLL
|
||||
{
|
||||
|
||||
public LanguageControlBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string LanguageControlId)
|
||||
{
|
||||
return new LanguageControlDAL().Exists(LanguageControlId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.LanguageControl model)
|
||||
{
|
||||
return new LanguageControlDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.LanguageControl model)
|
||||
{
|
||||
return new LanguageControlDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new LanguageControlDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string LanguageControlId)
|
||||
{
|
||||
return new LanguageControlDAL().Delete(LanguageControlId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.LanguageControl> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new LanguageControlDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.LanguageControl GetModel(string LanguageControlId)
|
||||
{
|
||||
return new LanguageControlDAL().GetModel(LanguageControlId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.LanguageControl> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new LanguageControlDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/LastPattleNumBLL.cs
Normal file
91
CleanMachine.BLL/LastPattleNumBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\LastPattleNumBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LastPattleNumBLL
|
||||
{
|
||||
|
||||
public LastPattleNumBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string Key)
|
||||
{
|
||||
return new LastPattleNumDAL().Exists(Key);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.LastPattleNum model)
|
||||
{
|
||||
return new LastPattleNumDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.LastPattleNum model)
|
||||
{
|
||||
return new LastPattleNumDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new LastPattleNumDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string Key)
|
||||
{
|
||||
return new LastPattleNumDAL().Delete(Key);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.LastPattleNum> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new LastPattleNumDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.LastPattleNum GetModel(string Key)
|
||||
{
|
||||
return new LastPattleNumDAL().GetModel(Key);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.LastPattleNum> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new LastPattleNumDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/LogBLL.cs
Normal file
91
CleanMachine.BLL/LogBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\LogBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LogBLL
|
||||
{
|
||||
|
||||
public LogBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string SysLogId)
|
||||
{
|
||||
return new LogDAL().Exists(SysLogId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.Log model)
|
||||
{
|
||||
return new LogDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.Log model)
|
||||
{
|
||||
return new LogDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new LogDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string SysLogId)
|
||||
{
|
||||
return new LogDAL().Delete(SysLogId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.Log> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new LogDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.Log GetModel(string SysLogId)
|
||||
{
|
||||
return new LogDAL().GetModel(SysLogId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.Log> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new LogDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/MenuBLL.cs
Normal file
91
CleanMachine.BLL/MenuBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\MenuBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MenuBLL
|
||||
{
|
||||
|
||||
public MenuBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string MenuId)
|
||||
{
|
||||
return new MenuDAL().Exists(MenuId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.Menu model)
|
||||
{
|
||||
return new MenuDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.Menu model)
|
||||
{
|
||||
return new MenuDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new MenuDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string MenuId)
|
||||
{
|
||||
return new MenuDAL().Delete(MenuId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.Menu> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new MenuDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.Menu GetModel(string MenuId)
|
||||
{
|
||||
return new MenuDAL().GetModel(MenuId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.Menu> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new MenuDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/ParameterBLL.cs
Normal file
91
CleanMachine.BLL/ParameterBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\ParameterBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ParameterBLL
|
||||
{
|
||||
|
||||
public ParameterBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string ParameterId)
|
||||
{
|
||||
return new ParameterDAL().Exists(ParameterId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.Parameter model)
|
||||
{
|
||||
return new ParameterDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.Parameter model)
|
||||
{
|
||||
return new ParameterDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new ParameterDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string ParameterId)
|
||||
{
|
||||
return new ParameterDAL().Delete(ParameterId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.Parameter> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new ParameterDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.Parameter GetModel(string ParameterId)
|
||||
{
|
||||
return new ParameterDAL().GetModel(ParameterId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.Parameter> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new ParameterDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/PlcItemBLL.cs
Normal file
91
CleanMachine.BLL/PlcItemBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\PlcItemBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class PlcItemBLL
|
||||
{
|
||||
|
||||
public PlcItemBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string PlcItemId)
|
||||
{
|
||||
return new PlcItemDAL().Exists(PlcItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.PlcItem model)
|
||||
{
|
||||
return new PlcItemDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.PlcItem model)
|
||||
{
|
||||
return new PlcItemDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new PlcItemDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string PlcItemId)
|
||||
{
|
||||
return new PlcItemDAL().Delete(PlcItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.PlcItem> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new PlcItemDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.PlcItem GetModel(string PlcItemId)
|
||||
{
|
||||
return new PlcItemDAL().GetModel(PlcItemId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.PlcItem> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new PlcItemDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/RoleBLL.cs
Normal file
91
CleanMachine.BLL/RoleBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\RoleBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class RoleBLL
|
||||
{
|
||||
|
||||
public RoleBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string RoleId)
|
||||
{
|
||||
return new RoleDAL().Exists(RoleId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.Role model)
|
||||
{
|
||||
return new RoleDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.Role model)
|
||||
{
|
||||
return new RoleDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new RoleDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string RoleId)
|
||||
{
|
||||
return new RoleDAL().Delete(RoleId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.Role> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new RoleDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.Role GetModel(string RoleId)
|
||||
{
|
||||
return new RoleDAL().GetModel(RoleId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.Role> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new RoleDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/RoleMenuPermissionBLL.cs
Normal file
91
CleanMachine.BLL/RoleMenuPermissionBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\RoleMenuPermissionBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class RoleMenuPermissionBLL
|
||||
{
|
||||
|
||||
public RoleMenuPermissionBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string RoleMenuPermissionId)
|
||||
{
|
||||
return new RoleMenuPermissionDAL().Exists(RoleMenuPermissionId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.RoleMenuPermission model)
|
||||
{
|
||||
return new RoleMenuPermissionDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.RoleMenuPermission model)
|
||||
{
|
||||
return new RoleMenuPermissionDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new RoleMenuPermissionDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string RoleMenuPermissionId)
|
||||
{
|
||||
return new RoleMenuPermissionDAL().Delete(RoleMenuPermissionId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.RoleMenuPermission> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new RoleMenuPermissionDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.RoleMenuPermission GetModel(string RoleMenuPermissionId)
|
||||
{
|
||||
return new RoleMenuPermissionDAL().GetModel(RoleMenuPermissionId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.RoleMenuPermission> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new RoleMenuPermissionDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/ScheduleDtlBLL.cs
Normal file
91
CleanMachine.BLL/ScheduleDtlBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\ScheduleDtlBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ScheduleDtlBLL
|
||||
{
|
||||
|
||||
public ScheduleDtlBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string ScheduleDtlId)
|
||||
{
|
||||
return new ScheduleDtlDAL().Exists(ScheduleDtlId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.ScheduleDtl model)
|
||||
{
|
||||
return new ScheduleDtlDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.ScheduleDtl model)
|
||||
{
|
||||
return new ScheduleDtlDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new ScheduleDtlDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string ScheduleDtlId)
|
||||
{
|
||||
return new ScheduleDtlDAL().Delete(ScheduleDtlId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.ScheduleDtl> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new ScheduleDtlDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.ScheduleDtl GetModel(string ScheduleDtlId)
|
||||
{
|
||||
return new ScheduleDtlDAL().GetModel(ScheduleDtlId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.ScheduleDtl> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new ScheduleDtlDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/SheetTypeBLL.cs
Normal file
91
CleanMachine.BLL/SheetTypeBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\SheetTypeBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class SheetTypeBLL
|
||||
{
|
||||
|
||||
public SheetTypeBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string SheetTypeId)
|
||||
{
|
||||
return new SheetTypeDAL().Exists(SheetTypeId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.SheetType model)
|
||||
{
|
||||
return new SheetTypeDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.SheetType model)
|
||||
{
|
||||
return new SheetTypeDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new SheetTypeDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string SheetTypeId)
|
||||
{
|
||||
return new SheetTypeDAL().Delete(SheetTypeId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.SheetType> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new SheetTypeDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.SheetType GetModel(string SheetTypeId)
|
||||
{
|
||||
return new SheetTypeDAL().GetModel(SheetTypeId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.SheetType> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new SheetTypeDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/UserBLL.cs
Normal file
91
CleanMachine.BLL/UserBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\UserBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserBLL
|
||||
{
|
||||
|
||||
public UserBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string UserId)
|
||||
{
|
||||
return new UserDAL().Exists(UserId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.User model)
|
||||
{
|
||||
return new UserDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.User model)
|
||||
{
|
||||
return new UserDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new UserDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string UserId)
|
||||
{
|
||||
return new UserDAL().Delete(UserId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.User> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new UserDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.User GetModel(string UserId)
|
||||
{
|
||||
return new UserDAL().GetModel(UserId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.User> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new UserDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/WarningBLL.cs
Normal file
91
CleanMachine.BLL/WarningBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\WarningBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class WarningBLL
|
||||
{
|
||||
|
||||
public WarningBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string WarningId)
|
||||
{
|
||||
return new WarningDAL().Exists(WarningId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.Warning model)
|
||||
{
|
||||
return new WarningDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.Warning model)
|
||||
{
|
||||
return new WarningDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new WarningDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string WarningId)
|
||||
{
|
||||
return new WarningDAL().Delete(WarningId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.Warning> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new WarningDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.Warning GetModel(string WarningId)
|
||||
{
|
||||
return new WarningDAL().GetModel(WarningId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.Warning> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new WarningDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/WarningLogBLL.cs
Normal file
91
CleanMachine.BLL/WarningLogBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\WarningLogBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class WarningLogBLL
|
||||
{
|
||||
|
||||
public WarningLogBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string WarningLogId)
|
||||
{
|
||||
return new WarningLogDAL().Exists(WarningLogId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.WarningLog model)
|
||||
{
|
||||
return new WarningLogDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.WarningLog model)
|
||||
{
|
||||
return new WarningLogDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new WarningLogDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string WarningLogId)
|
||||
{
|
||||
return new WarningLogDAL().Delete(WarningLogId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.WarningLog> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new WarningLogDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.WarningLog GetModel(string WarningLogId)
|
||||
{
|
||||
return new WarningLogDAL().GetModel(WarningLogId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.WarningLog> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new WarningLogDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/WorkingPalletBLL.cs
Normal file
91
CleanMachine.BLL/WorkingPalletBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\WorkingPalletBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class WorkingPalletBLL
|
||||
{
|
||||
|
||||
public WorkingPalletBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string WorkingPalletId)
|
||||
{
|
||||
return new WorkingPalletDAL().Exists(WorkingPalletId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.WorkingPallet model)
|
||||
{
|
||||
return new WorkingPalletDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.WorkingPallet model)
|
||||
{
|
||||
return new WorkingPalletDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new WorkingPalletDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string WorkingPalletId)
|
||||
{
|
||||
return new WorkingPalletDAL().Delete(WorkingPalletId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.WorkingPallet> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new WorkingPalletDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.WorkingPallet GetModel(string WorkingPalletId)
|
||||
{
|
||||
return new WorkingPalletDAL().GetModel(WorkingPalletId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.WorkingPallet> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new WorkingPalletDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
91
CleanMachine.BLL/WorkingPalletDtlBLL.cs
Normal file
91
CleanMachine.BLL/WorkingPalletDtlBLL.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"BLL\\WorkingPalletDtlBLL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using CleanMachine.DAL;
|
||||
|
||||
namespace CleanMachine.BLL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class WorkingPalletDtlBLL
|
||||
{
|
||||
|
||||
public WorkingPalletDtlBLL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string WorkingPalletDtlId)
|
||||
{
|
||||
return new WorkingPalletDtlDAL().Exists(WorkingPalletDtlId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.WorkingPalletDtl model)
|
||||
{
|
||||
return new WorkingPalletDtlDAL().Add(model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.WorkingPalletDtl model)
|
||||
{
|
||||
return new WorkingPalletDtlDAL().Update(model);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
return new WorkingPalletDtlDAL().Delete(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string WorkingPalletDtlId)
|
||||
{
|
||||
return new WorkingPalletDtlDAL().Delete(WorkingPalletDtlId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.WorkingPalletDtl> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
return new WorkingPalletDtlDAL().GetList(strWhere,Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.WorkingPalletDtl GetModel(string WorkingPalletDtlId)
|
||||
{
|
||||
return new WorkingPalletDtlDAL().GetModel(WorkingPalletDtlId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.WorkingPalletDtl> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// return new WorkingPalletDtlDAL().GetModelList(rule);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/CleanModeDAL.cs
Normal file
112
CleanMachine.DAL/CleanModeDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\CleanModeDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CleanModeDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public CleanModeDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string CleanModeId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from BAS_CLEAN_MODE WHERE CLEAN_MODE_ID=@CleanModeId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { CleanModeId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.CleanMode model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO BAS_CLEAN_MODE
|
||||
(CLEAN_MODE_ID,CLEAN_MODE_CODE,CLEAN_MODE_NAME,USED_FLAG,DEL_FLAG,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@CleanModeId,@CleanModeCode,@CleanModeName,@UsedFlag,@DelFlag,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.CleanMode model)
|
||||
{
|
||||
string strSql = $@"UPDATE BAS_CLEAN_MODE SET
|
||||
CLEAN_MODE_CODE=@CleanModeCode,CLEAN_MODE_NAME=@CleanModeName,USED_FLAG=@UsedFlag,DEL_FLAG=@DelFlag,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE CLEAN_MODE_ID=@CleanModeId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM BAS_CLEAN_MODE ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string CleanModeId)
|
||||
{
|
||||
return this.Delete("CLEAN_MODE_ID=@CleanModeId ", new { CleanModeId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.CleanMode> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM BAS_CLEAN_MODE ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.CleanMode>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.CleanMode GetModel(string CleanModeId)
|
||||
{
|
||||
return this.GetList("CLEAN_MODE_ID=@CleanModeId", new { CleanModeId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.CleanMode> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/ContaminationDtlDAL.cs
Normal file
112
CleanMachine.DAL/ContaminationDtlDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\ContaminationDtlDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ContaminationDtlDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public ContaminationDtlDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string ContaminationDtlId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from BAS_CONTAMINATION_DTL WHERE CONTAMINATION_DTL_ID=@ContaminationDtlId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { ContaminationDtlId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.ContaminationDtl model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO BAS_CONTAMINATION_DTL
|
||||
(CONTAMINATION_DTL_ID,CONTAMINATION_TYPE_CODE,CONTAMINATION_DTL_CODE,CONTAMINATION_DTL_NAME,USED_FLAG,DEL_FLAG,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@ContaminationDtlId,@ContaminationTypeCode,@ContaminationDtlCode,@ContaminationDtlName,@UsedFlag,@DelFlag,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.ContaminationDtl model)
|
||||
{
|
||||
string strSql = $@"UPDATE BAS_CONTAMINATION_DTL SET
|
||||
CONTAMINATION_TYPE_CODE=@ContaminationTypeCode,CONTAMINATION_DTL_CODE=@ContaminationDtlCode,CONTAMINATION_DTL_NAME=@ContaminationDtlName,USED_FLAG=@UsedFlag,DEL_FLAG=@DelFlag,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE CONTAMINATION_DTL_ID=@ContaminationDtlId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM BAS_CONTAMINATION_DTL ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string ContaminationDtlId)
|
||||
{
|
||||
return this.Delete("CONTAMINATION_DTL_ID=@ContaminationDtlId ", new { ContaminationDtlId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.ContaminationDtl> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM BAS_CONTAMINATION_DTL ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.ContaminationDtl>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.ContaminationDtl GetModel(string ContaminationDtlId)
|
||||
{
|
||||
return this.GetList("CONTAMINATION_DTL_ID=@ContaminationDtlId", new { ContaminationDtlId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.ContaminationDtl> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/ContaminationTypeDAL.cs
Normal file
112
CleanMachine.DAL/ContaminationTypeDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\ContaminationTypeDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ContaminationTypeDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public ContaminationTypeDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string ContaminationTypeId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from BAS_CONTAMINATION_TYPE WHERE CONTAMINATION_TYPE_ID=@ContaminationTypeId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { ContaminationTypeId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.ContaminationType model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO BAS_CONTAMINATION_TYPE
|
||||
(CONTAMINATION_TYPE_ID,CONTAMINATION_TYPE_CODE,CONTAMINATION_TYPE_NAME,CLEAN_MODE_CODE,USED_FLAG,DEL_FLAG,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@ContaminationTypeId,@ContaminationTypeCode,@ContaminationTypeName,@CleanModeCode,@UsedFlag,@DelFlag,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.ContaminationType model)
|
||||
{
|
||||
string strSql = $@"UPDATE BAS_CONTAMINATION_TYPE SET
|
||||
CONTAMINATION_TYPE_CODE=@ContaminationTypeCode,CONTAMINATION_TYPE_NAME=@ContaminationTypeName,CLEAN_MODE_CODE=@CleanModeCode,USED_FLAG=@UsedFlag,DEL_FLAG=@DelFlag,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE CONTAMINATION_TYPE_ID=@ContaminationTypeId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM BAS_CONTAMINATION_TYPE ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string ContaminationTypeId)
|
||||
{
|
||||
return this.Delete("CONTAMINATION_TYPE_ID=@ContaminationTypeId ", new { ContaminationTypeId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.ContaminationType> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM BAS_CONTAMINATION_TYPE ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.ContaminationType>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.ContaminationType GetModel(string ContaminationTypeId)
|
||||
{
|
||||
return this.GetList("CONTAMINATION_TYPE_ID=@ContaminationTypeId", new { ContaminationTypeId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.ContaminationType> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/LanguageControlDAL.cs
Normal file
112
CleanMachine.DAL/LanguageControlDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\LanguageControlDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LanguageControlDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public LanguageControlDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string LanguageControlId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from SYS_LANGUAGE_CONTROL WHERE LANGUAGE_CONTROL_ID=@LanguageControlId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { LanguageControlId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.LanguageControl model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO SYS_LANGUAGE_CONTROL
|
||||
(LANGUAGE_CONTROL_ID,LANGUAGE_CODE,FORM_CODE,CONTROL_CODE,CONTROL_NAME,CONTROL_TYPE,USED_FLAG,DEL_FLAG,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@LanguageControlId,@LanguageCode,@FormCode,@ControlCode,@ControlName,@ControlType,@UsedFlag,@DelFlag,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.LanguageControl model)
|
||||
{
|
||||
string strSql = $@"UPDATE SYS_LANGUAGE_CONTROL SET
|
||||
LANGUAGE_CODE=@LanguageCode,FORM_CODE=@FormCode,CONTROL_CODE=@ControlCode,CONTROL_NAME=@ControlName,CONTROL_TYPE=@ControlType,USED_FLAG=@UsedFlag,DEL_FLAG=@DelFlag,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE LANGUAGE_CONTROL_ID=@LanguageControlId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM SYS_LANGUAGE_CONTROL ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string LanguageControlId)
|
||||
{
|
||||
return this.Delete("LANGUAGE_CONTROL_ID=@LanguageControlId ", new { LanguageControlId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.LanguageControl> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM SYS_LANGUAGE_CONTROL ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.LanguageControl>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.LanguageControl GetModel(string LanguageControlId)
|
||||
{
|
||||
return this.GetList("LANGUAGE_CONTROL_ID=@LanguageControlId", new { LanguageControlId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.LanguageControl> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/LanguageDAL.cs
Normal file
112
CleanMachine.DAL/LanguageDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\LanguageDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LanguageDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public LanguageDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string LanguageId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from SYS_LANGUAGE WHERE LANGUAGE_ID=@LanguageId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { LanguageId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.Language model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO SYS_LANGUAGE
|
||||
(LANGUAGE_ID,LANGUAGE_CODE,LANGUAGE_NAME,USED_FLAG,DEL_FLAG,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@LanguageId,@LanguageCode,@LanguageName,@UsedFlag,@DelFlag,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.Language model)
|
||||
{
|
||||
string strSql = $@"UPDATE SYS_LANGUAGE SET
|
||||
LANGUAGE_CODE=@LanguageCode,LANGUAGE_NAME=@LanguageName,USED_FLAG=@UsedFlag,DEL_FLAG=@DelFlag,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE LANGUAGE_ID=@LanguageId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM SYS_LANGUAGE ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string LanguageId)
|
||||
{
|
||||
return this.Delete("LANGUAGE_ID=@LanguageId ", new { LanguageId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.Language> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM SYS_LANGUAGE ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.Language>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.Language GetModel(string LanguageId)
|
||||
{
|
||||
return this.GetList("LANGUAGE_ID=@LanguageId", new { LanguageId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.Language> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/LastPattleNumDAL.cs
Normal file
112
CleanMachine.DAL/LastPattleNumDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\LastPattleNumDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LastPattleNumDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public LastPattleNumDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string Key)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from CM_LastPattleNum WHERE Key=@Key ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { Key }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.LastPattleNum model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO CM_LastPattleNum
|
||||
(Key,Value)
|
||||
values
|
||||
(@Key,@Value) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.LastPattleNum model)
|
||||
{
|
||||
string strSql = $@"UPDATE CM_LastPattleNum SET
|
||||
Value=@Value
|
||||
WHERE Key=@Key ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM CM_LastPattleNum ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string Key)
|
||||
{
|
||||
return this.Delete("Key=@Key ", new { Key }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.LastPattleNum> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM CM_LastPattleNum ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.LastPattleNum>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.LastPattleNum GetModel(string Key)
|
||||
{
|
||||
return this.GetList("Key=@Key", new { Key }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.LastPattleNum> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/LogDAL.cs
Normal file
112
CleanMachine.DAL/LogDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\LogDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LogDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public LogDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string SysLogId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from SYS_LOG WHERE SYS_LOG_ID=@SysLogId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { SysLogId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.Log model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO SYS_LOG
|
||||
(SYS_LOG_ID,USER_ID,OPERATE_STATUS,RESULT_STATUS,MESSAGE,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@SysLogId,@UserId,@OperateStatus,@ResultStatus,@Message,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.Log model)
|
||||
{
|
||||
string strSql = $@"UPDATE SYS_LOG SET
|
||||
USER_ID=@UserId,OPERATE_STATUS=@OperateStatus,RESULT_STATUS=@ResultStatus,MESSAGE=@Message,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE SYS_LOG_ID=@SysLogId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM SYS_LOG ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string SysLogId)
|
||||
{
|
||||
return this.Delete("SYS_LOG_ID=@SysLogId ", new { SysLogId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.Log> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM SYS_LOG ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.Log>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.Log GetModel(string SysLogId)
|
||||
{
|
||||
return this.GetList("SYS_LOG_ID=@SysLogId", new { SysLogId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.Log> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/MenuDAL.cs
Normal file
112
CleanMachine.DAL/MenuDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\MenuDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MenuDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public MenuDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string MenuId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from SYS_MENU WHERE MENU_ID=@MenuId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { MenuId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.Menu model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO SYS_MENU
|
||||
(MENU_ID,MENU_CODE,MENU_NAME,MENU_URL,MENU_PID,MENU_ORDER,USED_FLAG,DEL_FLAG,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@MenuId,@MenuCode,@MenuName,@MenuUrl,@MenuPid,@MenuOrder,@UsedFlag,@DelFlag,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.Menu model)
|
||||
{
|
||||
string strSql = $@"UPDATE SYS_MENU SET
|
||||
MENU_CODE=@MenuCode,MENU_NAME=@MenuName,MENU_URL=@MenuUrl,MENU_PID=@MenuPid,MENU_ORDER=@MenuOrder,USED_FLAG=@UsedFlag,DEL_FLAG=@DelFlag,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE MENU_ID=@MenuId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM SYS_MENU ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string MenuId)
|
||||
{
|
||||
return this.Delete("MENU_ID=@MenuId ", new { MenuId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.Menu> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM SYS_MENU ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.Menu>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.Menu GetModel(string MenuId)
|
||||
{
|
||||
return this.GetList("MENU_ID=@MenuId", new { MenuId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.Menu> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/ParameterDAL.cs
Normal file
112
CleanMachine.DAL/ParameterDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\ParameterDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ParameterDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public ParameterDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string ParameterId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from SYS_PARAMETER WHERE PARAMETER_ID=@ParameterId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { ParameterId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.Parameter model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO SYS_PARAMETER
|
||||
(PARAMETER_ID,PARAMETER_CODE,PARAMETER_NAME,PARAMETER_VALUE,PARAMETER_TYPE,USED_FLAG,DEL_FLAG,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@ParameterId,@ParameterCode,@ParameterName,@ParameterValue,@ParameterType,@UsedFlag,@DelFlag,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.Parameter model)
|
||||
{
|
||||
string strSql = $@"UPDATE SYS_PARAMETER SET
|
||||
PARAMETER_CODE=@ParameterCode,PARAMETER_NAME=@ParameterName,PARAMETER_VALUE=@ParameterValue,PARAMETER_TYPE=@ParameterType,USED_FLAG=@UsedFlag,DEL_FLAG=@DelFlag,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE PARAMETER_ID=@ParameterId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM SYS_PARAMETER ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string ParameterId)
|
||||
{
|
||||
return this.Delete("PARAMETER_ID=@ParameterId ", new { ParameterId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.Parameter> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM SYS_PARAMETER ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.Parameter>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.Parameter GetModel(string ParameterId)
|
||||
{
|
||||
return this.GetList("PARAMETER_ID=@ParameterId", new { ParameterId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.Parameter> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/PlcItemDAL.cs
Normal file
112
CleanMachine.DAL/PlcItemDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\PlcItemDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class PlcItemDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public PlcItemDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string PlcItemId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from BAS_PLC_ITEM WHERE PLC_ITEM_ID=@PlcItemId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { PlcItemId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.PlcItem model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO BAS_PLC_ITEM
|
||||
(PLC_ITEM_ID,PLC_ITEM_CODE,PLC_ITEM_NAME,PLC_ITEM_TYPE,PLC_ITEM_DATA_TYPE,PLC_ITEM_DATA_LENGTH,PLC_ITEM_PRI_ADDRESS,PLC_ITEM_MODBUS_ADDRESS,PLC_ITEM_DEVIATION_ADDRESS,PLC_ITEM_VALUE,USED_FLAG,DEL_FLAG,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@PlcItemId,@PlcItemCode,@PlcItemName,@PlcItemType,@PlcItemDataType,@PlcItemDataLength,@PlcItemPriAddress,@PlcItemModbusAddress,@PlcItemDeviationAddress,@PlcItemValue,@UsedFlag,@DelFlag,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.PlcItem model)
|
||||
{
|
||||
string strSql = $@"UPDATE BAS_PLC_ITEM SET
|
||||
PLC_ITEM_CODE=@PlcItemCode,PLC_ITEM_NAME=@PlcItemName,PLC_ITEM_TYPE=@PlcItemType,PLC_ITEM_DATA_TYPE=@PlcItemDataType,PLC_ITEM_DATA_LENGTH=@PlcItemDataLength,PLC_ITEM_PRI_ADDRESS=@PlcItemPriAddress,PLC_ITEM_MODBUS_ADDRESS=@PlcItemModbusAddress,PLC_ITEM_DEVIATION_ADDRESS=@PlcItemDeviationAddress,PLC_ITEM_VALUE=@PlcItemValue,USED_FLAG=@UsedFlag,DEL_FLAG=@DelFlag,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE PLC_ITEM_ID=@PlcItemId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM BAS_PLC_ITEM ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string PlcItemId)
|
||||
{
|
||||
return this.Delete("PLC_ITEM_ID=@PlcItemId ", new { PlcItemId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.PlcItem> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM BAS_PLC_ITEM ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.PlcItem>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.PlcItem GetModel(string PlcItemId)
|
||||
{
|
||||
return this.GetList("PLC_ITEM_ID=@PlcItemId", new { PlcItemId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.PlcItem> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/RoleDAL.cs
Normal file
112
CleanMachine.DAL/RoleDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\RoleDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class RoleDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public RoleDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string RoleId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from SYS_ROLE WHERE ROLE_ID=@RoleId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { RoleId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.Role model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO SYS_ROLE
|
||||
(ROLE_ID,ROLE_CODE,ROLE_NAME,ROLE_GRADE,USED_FLAG,DEL_FLAG,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@RoleId,@RoleCode,@RoleName,@RoleGrade,@UsedFlag,@DelFlag,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.Role model)
|
||||
{
|
||||
string strSql = $@"UPDATE SYS_ROLE SET
|
||||
ROLE_CODE=@RoleCode,ROLE_NAME=@RoleName,ROLE_GRADE=@RoleGrade,USED_FLAG=@UsedFlag,DEL_FLAG=@DelFlag,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE ROLE_ID=@RoleId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM SYS_ROLE ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string RoleId)
|
||||
{
|
||||
return this.Delete("ROLE_ID=@RoleId ", new { RoleId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.Role> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM SYS_ROLE ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.Role>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.Role GetModel(string RoleId)
|
||||
{
|
||||
return this.GetList("ROLE_ID=@RoleId", new { RoleId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.Role> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/RoleMenuPermissionDAL.cs
Normal file
112
CleanMachine.DAL/RoleMenuPermissionDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\RoleMenuPermissionDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class RoleMenuPermissionDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public RoleMenuPermissionDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string RoleMenuPermissionId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from SYS_ROLE_MENU_PERMISSION WHERE ROLE_MENU_PERMISSION_ID=@RoleMenuPermissionId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { RoleMenuPermissionId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.RoleMenuPermission model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO SYS_ROLE_MENU_PERMISSION
|
||||
(ROLE_MENU_PERMISSION_ID,ROLE_ID,MENU_ID,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@RoleMenuPermissionId,@RoleId,@MenuId,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.RoleMenuPermission model)
|
||||
{
|
||||
string strSql = $@"UPDATE SYS_ROLE_MENU_PERMISSION SET
|
||||
ROLE_ID=@RoleId,MENU_ID=@MenuId,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE ROLE_MENU_PERMISSION_ID=@RoleMenuPermissionId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM SYS_ROLE_MENU_PERMISSION ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string RoleMenuPermissionId)
|
||||
{
|
||||
return this.Delete("ROLE_MENU_PERMISSION_ID=@RoleMenuPermissionId ", new { RoleMenuPermissionId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.RoleMenuPermission> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM SYS_ROLE_MENU_PERMISSION ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.RoleMenuPermission>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.RoleMenuPermission GetModel(string RoleMenuPermissionId)
|
||||
{
|
||||
return this.GetList("ROLE_MENU_PERMISSION_ID=@RoleMenuPermissionId", new { RoleMenuPermissionId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.RoleMenuPermission> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/ScheduleDtlDAL.cs
Normal file
112
CleanMachine.DAL/ScheduleDtlDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\ScheduleDtlDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ScheduleDtlDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public ScheduleDtlDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string ScheduleDtlId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from SYS_SCHEDULE_DTL WHERE SCHEDULE_DTL_ID=@ScheduleDtlId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { ScheduleDtlId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.ScheduleDtl model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO SYS_SCHEDULE_DTL
|
||||
(SCHEDULE_DTL_ID,SCHEDULE_CODE,SCHEDULE_NAME,BEGIN_TIME,END_TIME,USED_FLAG,DEL_FLAG,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@ScheduleDtlId,@ScheduleCode,@ScheduleName,@BeginTime,@EndTime,@UsedFlag,@DelFlag,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.ScheduleDtl model)
|
||||
{
|
||||
string strSql = $@"UPDATE SYS_SCHEDULE_DTL SET
|
||||
SCHEDULE_CODE=@ScheduleCode,SCHEDULE_NAME=@ScheduleName,BEGIN_TIME=@BeginTime,END_TIME=@EndTime,USED_FLAG=@UsedFlag,DEL_FLAG=@DelFlag,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE SCHEDULE_DTL_ID=@ScheduleDtlId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM SYS_SCHEDULE_DTL ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string ScheduleDtlId)
|
||||
{
|
||||
return this.Delete("SCHEDULE_DTL_ID=@ScheduleDtlId ", new { ScheduleDtlId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.ScheduleDtl> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM SYS_SCHEDULE_DTL ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.ScheduleDtl>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.ScheduleDtl GetModel(string ScheduleDtlId)
|
||||
{
|
||||
return this.GetList("SCHEDULE_DTL_ID=@ScheduleDtlId", new { ScheduleDtlId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.ScheduleDtl> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/SheetTypeDAL.cs
Normal file
112
CleanMachine.DAL/SheetTypeDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\SheetTypeDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class SheetTypeDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public SheetTypeDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string SheetTypeId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from BAS_SHEET_TYPE WHERE SHEET_TYPE_ID=@SheetTypeId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { SheetTypeId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.SheetType model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO BAS_SHEET_TYPE
|
||||
(SHEET_TYPE_ID,SHEET_TYPE_CODE,SHEET_TYPE_NAME,USED_FLAG,DEL_FLAG,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@SheetTypeId,@SheetTypeCode,@SheetTypeName,@UsedFlag,@DelFlag,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.SheetType model)
|
||||
{
|
||||
string strSql = $@"UPDATE BAS_SHEET_TYPE SET
|
||||
SHEET_TYPE_CODE=@SheetTypeCode,SHEET_TYPE_NAME=@SheetTypeName,USED_FLAG=@UsedFlag,DEL_FLAG=@DelFlag,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE SHEET_TYPE_ID=@SheetTypeId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM BAS_SHEET_TYPE ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string SheetTypeId)
|
||||
{
|
||||
return this.Delete("SHEET_TYPE_ID=@SheetTypeId ", new { SheetTypeId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.SheetType> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM BAS_SHEET_TYPE ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.SheetType>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.SheetType GetModel(string SheetTypeId)
|
||||
{
|
||||
return this.GetList("SHEET_TYPE_ID=@SheetTypeId", new { SheetTypeId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.SheetType> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/UserDAL.cs
Normal file
112
CleanMachine.DAL/UserDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\UserDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public UserDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string UserId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from SYS_USER WHERE USER_ID=@UserId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { UserId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.User model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO SYS_USER
|
||||
(USER_ID,USER_CODE,USER_NAME,PASSWORD,GENDER,ROLE_ID,SCHEDULE_CODE,USED_FLAG,DEL_FLAG,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@UserId,@UserCode,@UserName,@Password,@Gender,@RoleId,@ScheduleCode,@UsedFlag,@DelFlag,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.User model)
|
||||
{
|
||||
string strSql = $@"UPDATE SYS_USER SET
|
||||
USER_CODE=@UserCode,USER_NAME=@UserName,PASSWORD=@Password,GENDER=@Gender,ROLE_ID=@RoleId,SCHEDULE_CODE=@ScheduleCode,USED_FLAG=@UsedFlag,DEL_FLAG=@DelFlag,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE USER_ID=@UserId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM SYS_USER ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string UserId)
|
||||
{
|
||||
return this.Delete("USER_ID=@UserId ", new { UserId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.User> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM SYS_USER ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.User>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.User GetModel(string UserId)
|
||||
{
|
||||
return this.GetList("USER_ID=@UserId", new { UserId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.User> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/WarningDAL.cs
Normal file
112
CleanMachine.DAL/WarningDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\WarningDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class WarningDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public WarningDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string WarningId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from BAS_WARNING WHERE WARNING_ID=@WarningId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { WarningId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.Warning model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO BAS_WARNING
|
||||
(WARNING_ID,WARNING_CODE,WARNING_NAME,PLC_ITEM_CODE,WARNING_TYPE,WARNING_MESSAGE,USED_FLAG,DEL_FLAG,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@WarningId,@WarningCode,@WarningName,@PlcItemCode,@WarningType,@WarningMessage,@UsedFlag,@DelFlag,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.Warning model)
|
||||
{
|
||||
string strSql = $@"UPDATE BAS_WARNING SET
|
||||
WARNING_CODE=@WarningCode,WARNING_NAME=@WarningName,PLC_ITEM_CODE=@PlcItemCode,WARNING_TYPE=@WarningType,WARNING_MESSAGE=@WarningMessage,USED_FLAG=@UsedFlag,DEL_FLAG=@DelFlag,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE WARNING_ID=@WarningId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM BAS_WARNING ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string WarningId)
|
||||
{
|
||||
return this.Delete("WARNING_ID=@WarningId ", new { WarningId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.Warning> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM BAS_WARNING ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.Warning>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.Warning GetModel(string WarningId)
|
||||
{
|
||||
return this.GetList("WARNING_ID=@WarningId", new { WarningId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.Warning> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/WarningLogDAL.cs
Normal file
112
CleanMachine.DAL/WarningLogDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\WarningLogDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class WarningLogDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public WarningLogDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string WarningLogId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from CM_WARNING_LOG WHERE WARNING_LOG_ID=@WarningLogId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { WarningLogId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.WarningLog model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO CM_WARNING_LOG
|
||||
(WARNING_LOG_ID,WARNING_CODE,WARNING_NAME,WARNING_TYPE,WARNING_MESSAGE,WARNING_TIME,PLC_ITEM_CODE,WARING_STATUS,WARNING_HANDLE_RESULT,WARNING_HANDLE_TIME,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@WarningLogId,@WarningCode,@WarningName,@WarningType,@WarningMessage,@WarningTime,@PlcItemCode,@WaringStatus,@WarningHandleResult,@WarningHandleTime,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.WarningLog model)
|
||||
{
|
||||
string strSql = $@"UPDATE CM_WARNING_LOG SET
|
||||
WARNING_CODE=@WarningCode,WARNING_NAME=@WarningName,WARNING_TYPE=@WarningType,WARNING_MESSAGE=@WarningMessage,WARNING_TIME=@WarningTime,PLC_ITEM_CODE=@PlcItemCode,WARING_STATUS=@WaringStatus,WARNING_HANDLE_RESULT=@WarningHandleResult,WARNING_HANDLE_TIME=@WarningHandleTime,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE WARNING_LOG_ID=@WarningLogId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM CM_WARNING_LOG ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string WarningLogId)
|
||||
{
|
||||
return this.Delete("WARNING_LOG_ID=@WarningLogId ", new { WarningLogId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.WarningLog> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM CM_WARNING_LOG ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.WarningLog>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.WarningLog GetModel(string WarningLogId)
|
||||
{
|
||||
return this.GetList("WARNING_LOG_ID=@WarningLogId", new { WarningLogId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.WarningLog> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/WorkingPalletDAL.cs
Normal file
112
CleanMachine.DAL/WorkingPalletDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\WorkingPalletDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class WorkingPalletDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public WorkingPalletDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string WorkingPalletId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from ZBK_WORKING_PALLET WHERE WORKING_PALLET_ID=@WorkingPalletId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { WorkingPalletId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.WorkingPallet model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO ZBK_WORKING_PALLET
|
||||
(WORKING_PALLET_ID,WORKING_PALLET_CODE,WORKING_PALLET_DESC,WORKING_STATUS,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@WorkingPalletId,@WorkingPalletCode,@WorkingPalletDesc,@WorkingStatus,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.WorkingPallet model)
|
||||
{
|
||||
string strSql = $@"UPDATE ZBK_WORKING_PALLET SET
|
||||
WORKING_PALLET_CODE=@WorkingPalletCode,WORKING_PALLET_DESC=@WorkingPalletDesc,WORKING_STATUS=@WorkingStatus,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE WORKING_PALLET_ID=@WorkingPalletId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM ZBK_WORKING_PALLET ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string WorkingPalletId)
|
||||
{
|
||||
return this.Delete("WORKING_PALLET_ID=@WorkingPalletId ", new { WorkingPalletId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.WorkingPallet> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM ZBK_WORKING_PALLET ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.WorkingPallet>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.WorkingPallet GetModel(string WorkingPalletId)
|
||||
{
|
||||
return this.GetList("WORKING_PALLET_ID=@WorkingPalletId", new { WorkingPalletId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.WorkingPallet> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
112
CleanMachine.DAL/WorkingPalletDtlDAL.cs
Normal file
112
CleanMachine.DAL/WorkingPalletDtlDAL.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
|
||||
//模板信息:{"Template":{"Language":"C#"}}
|
||||
//输出信息:{"Extension":".cs","FileName":"DAL\\WorkingPalletDtlDAL"}
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using LeadDataBaseUtility;
|
||||
|
||||
namespace CleanMachine.DAL
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class WorkingPalletDtlDAL
|
||||
{
|
||||
|
||||
|
||||
|
||||
public WorkingPalletDtlDAL()
|
||||
{
|
||||
|
||||
}
|
||||
#region 一般方法
|
||||
/// <summary>
|
||||
/// 存在
|
||||
/// </summary>
|
||||
public bool Exists(string WorkingPalletDtlId)
|
||||
{
|
||||
string strSql = @"SELECT count(1) from ZBK_WORKING_PALLET_DTL WHERE WORKING_PALLET_DTL_ID=@WorkingPalletDtlId ";
|
||||
return LeadDbHelperSQLite.ExecuteScalar<int>(strSql, new { WorkingPalletDtlId }) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个数据
|
||||
/// </summary>
|
||||
public bool Add(CleanMachine.Model.WorkingPalletDtl model)
|
||||
{
|
||||
string strSql = $@"INSERT INTO ZBK_WORKING_PALLET_DTL
|
||||
(WORKING_PALLET_DTL_ID,WORKING_PALLET_CODE,IR_CODE,SHEET_TYPE_CODE,INPUT_TIME,CLEAN_MODE_CODE,CONTAMINATION_TYPE_CODE,CONTAMINATION_DTL_CODE,CURRENT_NUMBER,OPERATE_USER_ID,OPERATE_USER_TIME,WORKING_DTL_STATUS,CREATE_BY,CREATE_TIME,UPDATE_BY,UPDATE_TIME,DATA_VERSION,REMARKS1,REMARKS2,REMARKS3,REMARKS4,REMARKS5)
|
||||
values
|
||||
(@WorkingPalletDtlId,@WorkingPalletCode,@IrCode,@SheetTypeCode,@InputTime,@CleanModeCode,@ContaminationTypeCode,@ContaminationDtlCode,@CurrentNumber,@OperateUserId,@OperateUserTime,@WorkingDtlStatus,@CreateBy,@CreateTime,@UpdateBy,@UpdateTime,@DataVersion,@Remarks1,@Remarks2,@Remarks3,@Remarks4,@Remarks5) ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新一个数据
|
||||
/// </summary>
|
||||
public bool Update(CleanMachine.Model.WorkingPalletDtl model)
|
||||
{
|
||||
string strSql = $@"UPDATE ZBK_WORKING_PALLET_DTL SET
|
||||
WORKING_PALLET_CODE=@WorkingPalletCode,IR_CODE=@IrCode,SHEET_TYPE_CODE=@SheetTypeCode,INPUT_TIME=@InputTime,CLEAN_MODE_CODE=@CleanModeCode,CONTAMINATION_TYPE_CODE=@ContaminationTypeCode,CONTAMINATION_DTL_CODE=@ContaminationDtlCode,CURRENT_NUMBER=@CurrentNumber,OPERATE_USER_ID=@OperateUserId,OPERATE_USER_TIME=@OperateUserTime,WORKING_DTL_STATUS=@WorkingDtlStatus,CREATE_BY=@CreateBy,CREATE_TIME=@CreateTime,UPDATE_BY=@UpdateBy,UPDATE_TIME=@UpdateTime,DATA_VERSION=@DataVersion,REMARKS1=@Remarks1,REMARKS2=@Remarks2,REMARKS3=@Remarks3,REMARKS4=@Remarks4,REMARKS5=@Remarks5
|
||||
WHERE WORKING_PALLET_DTL_ID=@WorkingPalletDtlId ";
|
||||
return LeadDbHelperSQLite.Execute(strSql, model) > 0;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"DELETE FROM ZBK_WORKING_PALLET_DTL ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Execute(strSql, Params) > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除一个数据
|
||||
/// </summary>
|
||||
public bool Delete(string WorkingPalletDtlId)
|
||||
{
|
||||
return this.Delete("WORKING_PALLET_DTL_ID=@WorkingPalletDtlId ", new { WorkingPalletDtlId }) ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得数据列表
|
||||
/// </summary>
|
||||
public IEnumerable<CleanMachine.Model.WorkingPalletDtl> GetList(string strWhere, object Params = null)
|
||||
{
|
||||
string strSql = $@"SELECT * FROM ZBK_WORKING_PALLET_DTL ";
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql += $" WHERE {strWhere}";
|
||||
}
|
||||
return LeadDbHelperSQLite.Query<CleanMachine.Model.WorkingPalletDtl>(strSql, Params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个对象
|
||||
/// </summary>
|
||||
public CleanMachine.Model.WorkingPalletDtl GetModel(string WorkingPalletDtlId)
|
||||
{
|
||||
return this.GetList("WORKING_PALLET_DTL_ID=@WorkingPalletDtlId", new { WorkingPalletDtlId }).FirstOrDefault();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询数据
|
||||
/// </summary>
|
||||
// public IEnumerable<CleanMachine.Model.WorkingPalletDtl> GetModelList(RuleGroup rule)
|
||||
// {
|
||||
// var tuper = _dbhelper.BuildRuleGroupStr(rule);
|
||||
// return this.GetList(tuper.where, tuper.Param);
|
||||
// }
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
namespace CleanMachine.Model
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// 污染明细
|
||||
/// </summary>
|
||||
public class ContaminationDtl: BaseModel
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
namespace CleanMachine.Model
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// 污染类型
|
||||
/// </summary>
|
||||
public class ContaminationType:BaseModel
|
||||
{
|
||||
|
||||
@@ -26,9 +26,18 @@ namespace LeadDataBaseUtility
|
||||
}
|
||||
|
||||
|
||||
public static T ExecuteScalar<T>(string sql, object param = null)
|
||||
{
|
||||
using (SQLiteConnection conn = new SQLiteConnection(connectionString))
|
||||
{
|
||||
return conn.ExecuteScalar<T>(sql, param);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static int ExecuteSql(string sql, object param = null)
|
||||
|
||||
public static int Execute(string sql, object param = null)
|
||||
{
|
||||
using (SQLiteConnection conn = new SQLiteConnection(connectionString))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user