增加项目使用情况汇总
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
/// <summary>
|
||||
/// 各项目巡查汇总
|
||||
/// </summary>
|
||||
namespace BLL
|
||||
{
|
||||
public class InspectionSummaryService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 批量添加
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddAll(List<Model.Inspection_Summary> list)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
db.Inspection_Summary.InsertAllOnSubmit(list);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改(暂无)
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void Update(Model.Inspection_Summary model)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Inspection_Summary newmodel = db.Inspection_Summary.FirstOrDefault(e => e.InspectionSummaryId == model.InspectionSummaryId);
|
||||
if (newmodel != null)
|
||||
{
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据年月删除
|
||||
/// </summary>
|
||||
/// <param name="CompileDateMonth"></param>
|
||||
public static void Delete(string CompileDateMonth)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
List<Model.Inspection_Summary> list = db.Inspection_Summary.Where(e => e.CompileDateMonth == CompileDateMonth).ToList();
|
||||
if (list.Count>0)
|
||||
{
|
||||
///删除编码表记录
|
||||
db.Inspection_Summary.DeleteAllOnSubmit(list);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user