initProject
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目经理编辑器明细
|
||||
/// </summary>
|
||||
public class PMService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据eProjectId获取项目经理编辑器明细信息
|
||||
/// </summary>
|
||||
/// <param name="eProjectId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Editor_PM> GetPMByEprojectId(string eProjectId)
|
||||
{
|
||||
return (from x in Funs.DB.Editor_PM where x.EProjectId == eProjectId orderby x.DisciplinesWBSCode select x ).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目Id获取土建信息
|
||||
/// </summary>
|
||||
/// <param name="eprojectId"></param>
|
||||
/// <param name="disciplinesWBSName"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.View_InDetailedDesign_GetCivil GetCivil(string eprojectId)
|
||||
{
|
||||
return Funs.DB.View_InDetailedDesign_GetCivil.FirstOrDefault(e => e.EProjectId == eprojectId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目Id获取电气仪表信息
|
||||
/// </summary>
|
||||
/// <param name="eprojectId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.View_InDetailedDesign_GetMechEI GetMechEI(string eprojectId)
|
||||
{
|
||||
return Funs.DB.View_InDetailedDesign_GetMechEI.FirstOrDefault(e => e.EProjectId == eprojectId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量增加
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void AddPM(List<Model.Editor_PM> model)
|
||||
{
|
||||
Funs.DB.Editor_PM.InsertAllOnSubmit(model);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name=""></param>
|
||||
public static void DeletePM(string EProjectId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Editor_PM where x.EProjectId == EProjectId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Editor_PM.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user