提交定制会内容
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -8,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class RectifyService
|
||||
{
|
||||
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全隐患
|
||||
@@ -24,10 +26,11 @@ namespace BLL
|
||||
/// 根据上一节点id获取安全隐患
|
||||
/// </summary>
|
||||
/// <param name="supRectifyId"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Technique_Rectify> GetRectifyBySupRectifyId(string supRectifyId)
|
||||
public static List<Model.Technique_Rectify> GetRectifyBySupRectifyId(string supRectifyId, string type)
|
||||
{
|
||||
return (from x in Funs.DB.Technique_Rectify where x.SupRectifyId == supRectifyId select x).ToList();
|
||||
return (from x in Funs.DB.Technique_Rectify where x.SupRectifyId == supRectifyId && x.RectifyType == type select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -40,6 +43,7 @@ namespace BLL
|
||||
Model.Technique_Rectify newRectify = new Model.Technique_Rectify
|
||||
{
|
||||
RectifyId = rectify.RectifyId,
|
||||
RectifyType = rectify.RectifyType,
|
||||
RectifyCode = rectify.RectifyCode,
|
||||
RectifyName = rectify.RectifyName,
|
||||
SupRectifyId = rectify.SupRectifyId,
|
||||
@@ -60,6 +64,7 @@ namespace BLL
|
||||
Model.Technique_Rectify newRectify = db.Technique_Rectify.FirstOrDefault(e => e.RectifyId == rectify.RectifyId);
|
||||
if (newRectify != null)
|
||||
{
|
||||
newRectify.RectifyType = rectify.RectifyType;
|
||||
newRectify.RectifyCode = rectify.RectifyCode;
|
||||
newRectify.RectifyName = rectify.RectifyName;
|
||||
newRectify.SupRectifyId = rectify.SupRectifyId;
|
||||
@@ -109,7 +114,7 @@ namespace BLL
|
||||
}
|
||||
else
|
||||
{
|
||||
var supItemSetCount = BLL.RectifyService.GetRectifyBySupRectifyId(rectifyId);
|
||||
var supItemSetCount = BLL.RectifyService.GetRectifyBySupRectifyId(rectifyId, rectify.RectifyType);
|
||||
if (supItemSetCount.Count() > 0)
|
||||
{
|
||||
isDelete = false;
|
||||
@@ -118,7 +123,15 @@ namespace BLL
|
||||
}
|
||||
return isDelete;
|
||||
}
|
||||
public static List<Model.Technique_Rectify> GetRectifyList()
|
||||
{
|
||||
var q = from x in Funs.DB.Technique_Rectify
|
||||
where x.SupRectifyId == "0"
|
||||
select x;
|
||||
return q.ToList();
|
||||
|
||||
|
||||
}
|
||||
public static void InitRectifyDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease, string itemText)
|
||||
{
|
||||
dropName.DataValueField = "RectifyName";
|
||||
@@ -130,13 +143,5 @@ namespace BLL
|
||||
Funs.FineUIPleaseSelect(dropName, itemText);
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Model.Technique_Rectify> GetRectifyList()
|
||||
{
|
||||
var q = from x in Funs.DB.Technique_Rectify
|
||||
where x.SupRectifyId == "0"
|
||||
select x;
|
||||
return q.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user