数据库变更CNPC_XJYJ
This commit is contained in:
parent
bafbf97359
commit
79a7f35e22
|
|
@ -27,7 +27,7 @@ REM --------------
|
|||
@echo.
|
||||
@call "%VS100COMNTOOLS%"vsvars32.bat
|
||||
|
||||
SqlMetal /views /server:.\SQL2012 /database:SGGLDB_TCC /code:%Model_ROOT%\Model.cs /namespace:Model
|
||||
SqlMetal /views /server:.\SQL2012 /database:CNPC_XJYJ /code:%Model_ROOT%\Model.cs /namespace:Model
|
||||
|
||||
@ECHO 完成
|
||||
pause
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ REM --------------
|
|||
@echo.
|
||||
@call "%VS150%"
|
||||
|
||||
SqlMetal /views /server:. /database:SGGLDB_XJYJ /code:%Model_ROOT%\Model.cs /namespace:Model
|
||||
SqlMetal /views /server:. /database:CNPC_XJYJ /code:%Model_ROOT%\Model.cs /namespace:Model
|
||||
|
||||
@ECHO 完成
|
||||
pause
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ REM --------------
|
|||
@echo.
|
||||
@call "%VS150%"
|
||||
|
||||
SqlMetal /views /server:. /user:sa /password:1111 /database:SGGLDB_TCC /code:%Model_ROOT%\Model.cs /namespace:Model
|
||||
SqlMetal /views /server:. /user:sa /password:1111 /database:CNPC_XJYJ /code:%Model_ROOT%\Model.cs /namespace:Model
|
||||
|
||||
@ECHO 完成
|
||||
pause
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ REM --------------
|
|||
@echo.
|
||||
@call "%VS150%"
|
||||
|
||||
SqlMetal /views /server:47.104.102.122,14333 /database:SGGLDB_XJYJ /user:sa /password:p@ssw0rd /code:%Model_ROOT%\Model.cs /namespace:Model
|
||||
SqlMetal /views /server:47.104.102.122,14333 /database:CNPC_XJYJ /user:sa /password:p@ssw0rd /code:%Model_ROOT%\Model.cs /namespace:Model
|
||||
|
||||
@ECHO 完成
|
||||
pause
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace BLL
|
|||
{
|
||||
public static ListItem[] GetInstallationList(string projectId, string unitId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
var q = (from x in db.Project_Installation
|
||||
|
|
@ -39,7 +39,7 @@ namespace BLL
|
|||
|
||||
public static List<Model.BaseInfoItem> getCQMSSolutinType(string groupId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var list = (from x in db.Base_SolutionTempleteType orderby x.SortIndex select new Model.BaseInfoItem { BaseInfoId = x.SolutionTempleteTypeCode, BaseInfoCode = x.SortIndex.ToString(), BaseInfoName = x.SolutionTempleteTypeName }).ToList();
|
||||
return list;
|
||||
|
|
@ -53,7 +53,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getSysConst(string groupId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Sys_Const
|
||||
where x.GroupId == groupId
|
||||
|
|
@ -71,7 +71,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getProjectList()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Base_Project
|
||||
orderby x.ProjectCode
|
||||
|
|
@ -95,7 +95,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.BaseInfoItem getProjectByCode(string projectCode)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Base_Project
|
||||
where x.ProjectCode == projectCode
|
||||
|
|
@ -119,7 +119,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getProjectWorkArea(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.WBS_UnitWork
|
||||
where x.ProjectId == projectId && x.SuperUnitWork == null
|
||||
|
|
@ -143,7 +143,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> GetProjecUnitWorkByUnitId(string projectId, string unitId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.WBS_UnitWork
|
||||
where x.ProjectId == projectId && x.UnitId == unitId && x.SuperUnitWork == null
|
||||
|
|
@ -168,7 +168,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> GetMaterial()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Base_Material
|
||||
orderby x.MaterialCode
|
||||
|
|
@ -191,7 +191,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getDetectionType()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Base_DetectionType
|
||||
orderby x.DetectionTypeCode
|
||||
|
|
@ -212,7 +212,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getDetectionRate()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Base_DetectionRate
|
||||
orderby x.DetectionRateCode
|
||||
|
|
@ -236,7 +236,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getHazardRegisterTypes(string type)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.HSSE_Hazard_HazardRegisterTypes
|
||||
where x.HazardRegisterType == type
|
||||
|
|
@ -255,7 +255,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getProjectPictureByProjectId(string projectId, string pictureType, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.InformationProject_Picture
|
||||
join y in db.AttachFile on x.PictureId equals y.ToKeyId
|
||||
|
|
@ -318,7 +318,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getProjectMapByProjectId(string projectId, string mapType)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.InformationProject_ProjectMap
|
||||
join y in db.AttachFile on x.ProjectMapId equals y.ToKeyId
|
||||
|
|
@ -374,7 +374,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.NoticeItem> getNoticesList(string projectId, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.InformationProject_Notice
|
||||
where x.AccessProjectId.Contains(projectId) && x.IsRelease == true
|
||||
|
|
@ -398,7 +398,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.NoticeItem> getNoticesList(string projectId, string userId, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.InformationProject_Notice
|
||||
where x.AccessProjectId.Contains(projectId) && x.IsRelease == true
|
||||
|
|
@ -422,7 +422,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.NoticeItem getNoticesByNoticeId(string noticeId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.InformationProject_Notice
|
||||
where x.NoticeId == noticeId
|
||||
|
|
@ -447,7 +447,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getWorkPost(string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Base_WorkPost
|
||||
where strParam == null || x.WorkPostName.Contains(strParam)
|
||||
|
|
@ -466,7 +466,7 @@ namespace BLL
|
|||
public static List<Model.BaseInfoItem> getWorkPost(string projectId,string strParam)
|
||||
{
|
||||
List<Model.BaseInfoItem> res = new List<Model.BaseInfoItem>();
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Base_WorkPost
|
||||
where strParam == null || x.WorkPostName.Contains(strParam)
|
||||
|
|
@ -633,7 +633,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.BaseInfoItem getTeamGroupLeader(string teamGroupId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.ProjectData_TeamGroup
|
||||
join y in db.SitePerson_Person on x.GroupLeaderId equals y.PersonId
|
||||
|
|
@ -651,7 +651,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getWorkArea(string projectId, string unitId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.WBS_UnitWork
|
||||
where x.ProjectId == projectId && (unitId == null || x.UnitId == unitId)
|
||||
|
|
@ -669,7 +669,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getSafetyMeasures(string licenseType)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Base_SafetyMeasures
|
||||
where x.LicenseType == licenseType
|
||||
|
|
@ -687,7 +687,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getPictureType(string menuType)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Base_PictureType
|
||||
where menuType == null || x.MenuType ==menuType
|
||||
|
|
@ -705,7 +705,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getBase_LicenseType()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Base_LicenseType
|
||||
orderby x.LicenseTypeCode
|
||||
|
|
@ -722,7 +722,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getCertificate()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Base_Certificate
|
||||
orderby x.CertificateCode
|
||||
|
|
@ -739,7 +739,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getDepart()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Base_Depart
|
||||
orderby x.DepartCode
|
||||
|
|
@ -756,7 +756,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getEmergencyType()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Base_EmergencyType
|
||||
orderby x.EmergencyTypeCode
|
||||
|
|
@ -773,7 +773,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getCountry()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.RealName_Country
|
||||
orderby x.Name
|
||||
|
|
@ -790,7 +790,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getProvinceByCountry(string countryId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.RealName_City
|
||||
where countryId == null || countryId=="" || x.CountryId== countryId
|
||||
|
|
@ -808,7 +808,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getBasicDataByDictTypeCode(string dictTypeCode)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.RealName_BasicData
|
||||
where x.DictTypeCode == dictTypeCode
|
||||
|
|
@ -821,7 +821,7 @@ namespace BLL
|
|||
|
||||
public static List<Model.WBS_ProjectQuality> getProjectQuality()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.WBS_ProjectQuality
|
||||
orderby x.ProjectQualityType
|
||||
|
|
@ -851,7 +851,7 @@ namespace BLL
|
|||
}
|
||||
public static List<ProjectPersonAndSafeHour> getProjectPersonAndSafeHour( string dateA, string dateZ)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<ProjectPersonAndSafeHour> res = new List<ProjectPersonAndSafeHour>();
|
||||
var projects = db.Base_Project.Where(x=>x.ProjectState=="1").ToList();
|
||||
|
|
@ -923,7 +923,7 @@ namespace BLL
|
|||
|
||||
public static List<Model.BaseInfoItem> getHSSEManager(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var userListaq = from x in db.Sys_User
|
||||
join y in db.Project_ProjectUnit
|
||||
|
|
@ -944,7 +944,7 @@ namespace BLL
|
|||
{
|
||||
system = "";
|
||||
}
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.BaseInfoItem> list = new List<Model.BaseInfoItem>();
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace BLL
|
|||
string secret = Const.AppSecret_TCC;
|
||||
//string appid = "wxb5f0e8051b7b9eee";
|
||||
//string secret = "626175f8860bf84beb4cf507b9445115";
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getToken = db.Sys_AccessToken.FirstOrDefault();
|
||||
if (getToken != null && getToken.Endtime > DateTime.Now)
|
||||
|
|
@ -134,7 +134,7 @@ namespace BLL
|
|||
string secret = Const.AppSecret_TCC;
|
||||
//string appid = "wxb5f0e8051b7b9eee";
|
||||
//string secret = "626175f8860bf84beb4cf507b9445115";
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getUser = db.Sys_User.FirstOrDefault(x => x.UserId == userId);
|
||||
if (getUser != null)
|
||||
|
|
@ -187,7 +187,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SaveFlowReceiveItem(Model.FlowReceiveItem flowReceiveItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
#region 隐患整改单
|
||||
if (flowReceiveItem.MenuId == Const.ProjectRectifyNoticeMenuId)
|
||||
|
|
@ -330,7 +330,7 @@ namespace BLL
|
|||
/// <param name="LogTxt"></param>
|
||||
public static void SaveSysHttpLog(string userName, string httpUrl, string logTxt)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Sys_HttpLog newLog = new Model.Sys_HttpLog()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.UserItem PersonLogOn(Model.UserItem userInfo)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getUser = from x in db.SitePerson_Person
|
||||
where (x.Telephone == userInfo.Account || x.PersonName == userInfo.Account)
|
||||
|
|
@ -67,7 +67,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.PersonItem getPersonByPersonId(string personId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getPerson = from x in db.View_SitePerson_Person
|
||||
where x.PersonId == personId || x.IdentityCard == personId
|
||||
|
|
@ -143,7 +143,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string getAttachUrl4(string personId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string returnUrl = APIUpLoadFileService.getFileUrl(personId + "#4", null);
|
||||
var getPersonQuality = db.QualityAudit_PersonQuality.FirstOrDefault(x => x.PersonId == personId);
|
||||
|
|
@ -175,7 +175,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.PersonItem getPersonByProjectIdIdentityCard(string projectId, string identityCard)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getPerson = from x in db.View_SitePerson_Person
|
||||
where x.ProjectId == projectId && (x.PersonId == identityCard || x.IdentityCard == identityCard)
|
||||
|
|
@ -255,7 +255,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void getReUserPersonByPersonId(string personId, string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == personId);
|
||||
if (getPerson != null)
|
||||
|
|
@ -277,7 +277,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.PersonItem> getPersonByProjectIdUnitId(string projectId, string unitId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var persons = from x in db.View_SitePerson_Person
|
||||
where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null) && x.IsUsed == true
|
||||
|
|
@ -341,7 +341,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.PersonItem> getPersonListByProjectIdStates(string projectId, string unitId, string states, string strUnitId, string strWorkPostId, string strParam, int pageIndex)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getViews = from x in db.SitePerson_Person
|
||||
where x.ProjectId == projectId && (strUnitId == null || x.UnitId == strUnitId)
|
||||
|
|
@ -431,7 +431,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
private static string ReturnQuality(string personId, string workPostId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string postType = "";
|
||||
var workPost = db.Base_WorkPost.FirstOrDefault(x => x.WorkPostId == workPostId);
|
||||
|
|
@ -479,7 +479,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.PersonItem> getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string departIds, string trainTypeId, string InTime, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
DateTime inDateTime = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(InTime) && !"null".Equals(InTime))
|
||||
|
|
@ -644,7 +644,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.PersonItem> getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string trainTypeId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<string> unitIdList = Funs.GetStrListByStr(unitIds, ',');
|
||||
var getPersons = from x in db.View_SitePerson_Person
|
||||
|
|
@ -720,7 +720,7 @@ namespace BLL
|
|||
/// <param name="person">人员信息</param>
|
||||
public static Model.SitePerson_Person SaveSitePerson(Model.PersonItem person)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.SitePerson_Person newPerson = new Model.SitePerson_Person
|
||||
{
|
||||
|
|
@ -1005,7 +1005,7 @@ namespace BLL
|
|||
/// <param name="person"></param>
|
||||
public static void SaveSitePersonAttachment(Model.PersonItem person)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == person.IdentityCard || x.PersonId == person.PersonId);
|
||||
if (getPerson != null)
|
||||
|
|
@ -1039,7 +1039,7 @@ namespace BLL
|
|||
{
|
||||
if (!string.IsNullOrEmpty(personId))
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == personId);
|
||||
|
|
@ -1074,7 +1074,7 @@ namespace BLL
|
|||
{
|
||||
if (!string.IsNullOrEmpty(personId))
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<string> getLists = Funs.GetStrListByStr(personId, ',');
|
||||
foreach (var item in getLists)
|
||||
|
|
@ -1102,7 +1102,7 @@ namespace BLL
|
|||
{
|
||||
if (!string.IsNullOrEmpty(idCard))
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.SitePerson_PersonInOut newInOut = new Model.SitePerson_PersonInOut
|
||||
{
|
||||
|
|
@ -1131,7 +1131,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.PersonInOutItem> getPersonInOutList(string projectId, string unitId, string startTime, string endTime)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
DateTime? startTimeD = Funs.GetNewDateTime(startTime);
|
||||
DateTime? endTimeD = Funs.GetNewDateTime(endTime);
|
||||
|
|
@ -1183,7 +1183,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.PersonInOutItem> getPersonInOutList(string projectId, string userUnitId, string unitId, string workPostId, string strParam, string startTime, string endTime)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
DateTime? startTimeD = Funs.GetNewDateTime(startTime);
|
||||
DateTime? endTimeD = Funs.GetNewDateTime(endTime);
|
||||
|
|
@ -1243,7 +1243,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.PersonInOutItem> getPersonInOutListByPersonId(string personId, string startTime, string endTime)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
DateTime? startTimeD = Funs.GetNewDateTime(startTime);
|
||||
DateTime? endTimeD = Funs.GetNewDateTime(endTime);
|
||||
|
|
@ -1280,7 +1280,7 @@ namespace BLL
|
|||
#region 获取项目当日在场人员数据
|
||||
public static IEnumerable getPersonPresenceData(string projectId, DateTime dateTime)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string url = ConfigurationManager.AppSettings["CEMS_IMG_URL"];
|
||||
|
||||
|
|
@ -1331,7 +1331,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.PersonQualityItem getPersonQualityByIdentityCard(string identityCard, string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getLists = from y in db.SitePerson_Person
|
||||
join x in db.QualityAudit_PersonQuality on y.PersonId equals x.PersonId
|
||||
|
|
@ -1381,7 +1381,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.TestRecordItem> getPersonTestRecoedByIdentityCard(string identityCard, string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getLists = from x in db.EduTrain_TrainRecordDetail
|
||||
join y in db.SitePerson_Person on x.PersonId equals y.PersonId
|
||||
|
|
@ -1419,7 +1419,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.PersonQualityItem> getPersonQualityByProjectIdUnitId(string projectId, string unitId, string type)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getLists = (from x in db.SitePerson_Person
|
||||
join y in db.QualityAudit_PersonQuality on x.PersonId equals y.PersonId
|
||||
|
|
@ -1484,7 +1484,7 @@ namespace BLL
|
|||
/// <param name="personQuality">人员信息</param>
|
||||
public static void SavePersonQuality(Model.PersonQualityItem personQuality)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.QualityAudit_PersonQuality newPersonQuality = new Model.QualityAudit_PersonQuality
|
||||
{
|
||||
|
|
@ -1562,7 +1562,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.PersonInOutItem> getAbnormalPersonInOutList(string projectId, string unitId, string startTime, string endTime, string inOut, int pageIndex)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
DateTime startTimeD = Funs.GetNewDateTimeOrNow(startTime);
|
||||
DateTime endTimeD = Funs.GetNewDateTimeOrNow(endTime);
|
||||
|
|
@ -1770,7 +1770,7 @@ namespace BLL
|
|||
{
|
||||
if (!string.IsNullOrEmpty(getPerson.IdentityCard))
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
if (getPerson != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.ProjectItem> geProjectsByUserId(string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.Base_Project> projects = new List<Model.Base_Project>();
|
||||
if (CommonService.IsThisUnitLeaderOfficeOrManage(userId))
|
||||
|
|
@ -49,7 +49,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.ProjectItem> getALLProjectsByUserId(string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var projects = (from x in db.Project_ProjectUser
|
||||
join y in db.Base_Project on x.ProjectId equals y.ProjectId
|
||||
|
|
@ -68,7 +68,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.ProjectItem getProjectByProjectId(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getproject = db.Base_Project.FirstOrDefault(x => x.ProjectId == projectId);
|
||||
return ObjectMapperManager.DefaultInstance.GetMapper<Model.Base_Project, Model.ProjectItem>().Map(getproject);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.UnitItem getUnitByUnitId(string unitId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getUnit = db.Base_Unit.FirstOrDefault(x => x.UnitId == unitId);
|
||||
return ObjectMapperManager.DefaultInstance.GetMapper<Model.Base_Unit, Model.UnitItem>().Map(getUnit);
|
||||
|
|
@ -30,7 +30,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getUnitLists()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var units = (from x in db.Base_Unit
|
||||
orderby x.UnitName
|
||||
|
|
@ -46,7 +46,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.UnitItem> getUnitByProjectIdUnitType(string projectId, string unitType)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var units = (from x in db.Base_Unit
|
||||
join y in db.Project_ProjectUnit
|
||||
|
|
@ -65,7 +65,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.UnitItem> getUnitByProjectIdUnitTypeQuery(string projectId, string strParam, string unitType)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var units = (from x in db.Base_Unit
|
||||
join y in db.Project_ProjectUnit
|
||||
|
|
@ -85,7 +85,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SubUnitQualityItem> getSubUnitQualityBySubUnitQualityId(string subUnitQualityId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getData = from x in db.QualityAudit_SubUnitQuality
|
||||
join y in db.Base_Unit on x.UnitId equals y.UnitId
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static void SaveAttachUrl(Model.ToDoItem toDoItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
////保存附件
|
||||
if (!string.IsNullOrEmpty(toDoItem.UrlStr))
|
||||
|
|
@ -159,7 +159,7 @@ namespace BLL
|
|||
public static string getFileUrl(string tokeyId, string url)
|
||||
{
|
||||
string fileUrl = url;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(tokeyId))
|
||||
{
|
||||
|
|
@ -185,7 +185,7 @@ namespace BLL
|
|||
public static string getFileUrl(string menuId, string tokeyId, string url)
|
||||
{
|
||||
string fileUrl = url;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(tokeyId))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.UserItem UserLogOn(Model.UserItem userInfo)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getUser = db.View_Sys_User.FirstOrDefault(x => (x.Account == userInfo.Account || x.Telephone == userInfo.Telephone) && x.IsPost == true && x.Password == Funs.EncryptionPassword(userInfo.Password));
|
||||
return ObjectMapperManager.DefaultInstance.GetMapper<Model.View_Sys_User, Model.UserItem>().Map(getUser);
|
||||
|
|
@ -28,7 +28,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.UserItem getUserByUserId(string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getUser = db.View_Sys_User.FirstOrDefault(x => x.UserId == userId);
|
||||
getUser.Password = null;
|
||||
|
|
@ -43,7 +43,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getUserByUnitId(string unitId, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getUser = (from x in db.Sys_User
|
||||
join y in db.Sys_Role on x.RoleId equals y.RoleId
|
||||
|
|
@ -64,7 +64,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.UserItem> getUserByProjectIdUnitIdQuery(string projectId, string unitId, string roleIds, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.UserItem> getDataList = new List<Model.UserItem>();
|
||||
HashSet<string> userid = new HashSet<string>();
|
||||
|
|
@ -196,7 +196,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.UserItem> getUserByProjectIdUnitTypeQuery(string projectId, string unitType, string roleIds, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.UserItem> getDataList = new List<Model.UserItem>();
|
||||
List<string> roleList = Funs.GetStrListByStr(roleIds, ',');
|
||||
|
|
@ -235,7 +235,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.UserItem> UserLogOn2()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var user = from x in db.Sys_User
|
||||
where x.IsPost == true
|
||||
|
|
@ -251,7 +251,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void getSaveUserTel(string userId, string tel)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getUser = db.Sys_User.FirstOrDefault(x => x.UserId == userId);
|
||||
if (getUser != null)
|
||||
|
|
@ -269,7 +269,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void getSaveUserSignatureUrl(string userId, string SignatureUrl)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getUser = db.Sys_User.FirstOrDefault(x => x.UserId == userId);
|
||||
if (getUser != null)
|
||||
|
|
@ -287,7 +287,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int getMenuUnreadCount(string menuId, string projectId, string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
int count = 0;
|
||||
var readCount = db.Sys_UserRead.Where(x => x.MenuId == menuId && x.ProjectId == projectId && x.UserId == userId).Select(x => x.DataId).Distinct().Count();
|
||||
|
|
@ -308,7 +308,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void getSaveUserRead(string menuId, string projectId, string userId, string dataId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var userRead = db.Sys_UserRead.FirstOrDefault(x => x.ProjectId == projectId && x.UserId == userId && x.DataId == dataId);
|
||||
if (userRead == null)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace BLL.API.CQMS
|
|||
{
|
||||
public static bool AddInspectionManagement(InspectionManagement inspectionManagement)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.ProcessControl_InspectionManagement newInspectionManagement=null;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.InspectionId))
|
||||
|
|
@ -79,7 +79,7 @@ namespace BLL.API.CQMS
|
|||
|
||||
public static List<InspectionManagementDetail> getInspectionManagementDetail(string projectId, int index, int page, string state, string name)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var dataList = from x in db.ProcessControl_InspectionManagementDetail
|
||||
where x.ProcessControl_InspectionManagement.ProjectId == projectId
|
||||
|
|
@ -159,7 +159,7 @@ namespace BLL.API.CQMS
|
|||
}
|
||||
public static List<InspectionManagement> getInspectionManagement(string projectId, int index, int page, string state, string name)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var dataList = from x in db.ProcessControl_InspectionManagement
|
||||
where x.ProjectId == projectId
|
||||
|
|
@ -237,7 +237,7 @@ namespace BLL.API.CQMS
|
|||
|
||||
public static List<InspectionManagementDetail> getInspectionManagementDetailByinspectionId(string inspectionId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var dataList = from x in db.ProcessControl_InspectionManagementDetail
|
||||
where x.InspectionId == inspectionId
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace BLL.API.CQMS
|
|||
public static List<BreakdownProject> getBreakdowns(string projectId, string keyWord)
|
||||
{
|
||||
List<BreakdownProject> res = new List<BreakdownProject>();
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var q = from x in db.View_WBS_BreakdownProject
|
||||
where x.ProjectId == projectId && x.IsSelected==true
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace BLL.API.HJGL
|
|||
|
||||
public static void AddElectrodeRecovery(ElectrodeRecoveryItem electrodeRecoveryItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.HJGL_ElectrodeRecovery newElectrodeRecovery = new Model.HJGL_ElectrodeRecovery();
|
||||
//newElectrodeRecovery.RecoveryId = electrodeRecoveryItem.RecoveryId;
|
||||
|
|
@ -37,7 +37,7 @@ namespace BLL.API.HJGL
|
|||
}
|
||||
public static void UpdateElectrodeRecovery(ElectrodeRecoveryItem electrodeRecoveryItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.HJGL_ElectrodeRecovery newElectrodeRecovery = db.HJGL_ElectrodeRecovery.FirstOrDefault(x => x.ElectrodeRecoveryId == electrodeRecoveryItem.RecoveryId);
|
||||
//newElectrodeRecovery.ElectrodeRecoveryId = electrodeRecoveryItem.RecoveryId;
|
||||
|
|
@ -63,7 +63,7 @@ namespace BLL.API.HJGL
|
|||
|
||||
public static List<ElectrodeRecoveryItem> GetListData(string projectId, int index, int page, string name)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var q = from u in db.HJGL_ElectrodeRecovery
|
||||
where u.ProjectId == projectId
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getHotProessTrustNo(string unitWrokId,string hotProessTrustNo)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var dataLists = from x in db.HJGL_HotProess_Trust
|
||||
select x;
|
||||
|
|
@ -48,7 +48,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getHardTrustNo(string unitWrokId,string hardTrustNo)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var dataLists = from x in db.HJGL_Hard_Trust
|
||||
select x;
|
||||
|
|
@ -80,7 +80,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.HotProcessHardItem> getHotProcessItem(string hotProessTrustId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.View_HJGL_HotProess_TrustItem
|
||||
where x.HotProessTrustId == hotProessTrustId
|
||||
|
|
@ -109,7 +109,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.HotProcessHardItem> getHardTrustItem(string hardTrustId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.View_HJGL_Hard_TrustItem
|
||||
where x.HardTrustID == hardTrustId
|
||||
|
|
@ -136,7 +136,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> GetHardNoPassWarning(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.HJGL_Hard_TrustItem
|
||||
join y in db.HJGL_Hard_Trust on x.HardTrustID equals y.HardTrustID
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.NDETrustItem> getAutoPointBatchCode(string unitWorkId,string detectionTypeId,string detectionRateId, string pointBatchCode)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var dataList = from x in db.HJGL_Batch_PointBatch
|
||||
where x.UnitWorkId == unitWorkId && x.EndDate == null
|
||||
|
|
@ -60,7 +60,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.NDETrustItem> getPointBatchCode(string unitWorkId, string detectionTypeId, string detectionRateId, string pointBatchCode)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var dataList = from x in db.HJGL_Batch_PointBatch
|
||||
join y in db.HJGL_Batch_PointBatchItem on x.PointBatchId equals y.PointBatchId
|
||||
|
|
@ -101,7 +101,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.NDETrustItem> getPointBatchDetail(string pointBatchId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.HJGL_Batch_PointBatchItem
|
||||
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||
|
|
@ -129,7 +129,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.NDETrustItem> getPointWeldJoint(string pointBatchId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.HJGL_Batch_PointBatchItem
|
||||
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||
|
|
@ -157,7 +157,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.NDETrustItem> getPointWeldJoint(string pointBatchId, string weldJointId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var jot = BLL.WeldJointService.GetWeldJointByWeldJointId(weldJointId);
|
||||
|
||||
|
|
@ -227,7 +227,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.NDETrustItem> GetPointWeldJointList(string unitWorkId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.HJGL_Batch_PointBatchItem
|
||||
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||
|
|
@ -255,7 +255,7 @@ namespace BLL
|
|||
/// <param name="unitWorkId"></param>
|
||||
public static void GenerateTrust(string unitWorkId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getViewGenerateTrustLists = (from x in db.View_GenerateTrust where x.UnitWorkId == unitWorkId select x).ToList();
|
||||
|
||||
|
|
@ -349,7 +349,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getBatchTrustCode(string unitWorkId, string detectionTypeId, string detectionRateId, bool? isAudit ,string trustBatchCode)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var dataList = from x in db.HJGL_Batch_BatchTrust
|
||||
where x.UnitWorkId == unitWorkId
|
||||
|
|
@ -398,7 +398,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.NDETrustItem> GetBatchTrustDetail(string trustBatchId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.HJGL_Batch_BatchTrustItem
|
||||
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||
|
|
@ -438,7 +438,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getBatchNdeCode(string unitWorkId, string detectionTypeId, string ndeCode)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var dataList = from x in db.HJGL_Batch_NDE
|
||||
join y in db.HJGL_Batch_BatchTrust on x.TrustBatchId equals y.TrustBatchId
|
||||
|
|
@ -478,7 +478,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.NDETrustItem> GetBatchNDEDetail(string ndeId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.HJGL_Batch_NDEItem
|
||||
join y in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
|
||||
|
|
@ -510,7 +510,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> GetRepairRecord(string unitWorkId, bool isAudit, string repairRecordCode)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var repair = (from x in db.HJGL_RepairRecord
|
||||
where x.UnitWorkId == unitWorkId
|
||||
|
|
@ -547,7 +547,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.WeldJointItem GetRepairInfoByRepairRecordId(string repairRecordId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.HJGL_RepairRecord
|
||||
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||
|
|
@ -577,7 +577,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.NDETrustItem> GetRepairExpDetail(string repairRecordId, bool welder, bool pipeLine, bool daily, bool repairBefore, bool mat, bool spec)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var record = BLL.RepairRecordService.GetRepairRecordById(repairRecordId);
|
||||
var jot = BLL.WeldJointService.GetViewWeldJointById(record.WeldJointId);
|
||||
|
|
@ -651,7 +651,7 @@ namespace BLL
|
|||
/// <param name="isCut">是否切除</param>
|
||||
public static void GetRepairExpSaveInfo(string repairRecordId, string expandId, string repairWelder, string repairDate, bool isCut)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.HJGL_RepairRecord repairRecord = BLL.RepairRecordService.GetRepairRecordById(repairRecordId);
|
||||
// 更新返修记录
|
||||
|
|
@ -717,7 +717,7 @@ namespace BLL
|
|||
/// <param name="repairRecordId"></param>
|
||||
public static void RepairAudit(string repairRecordId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
// 更新返修记录
|
||||
var repair = db.HJGL_RepairRecord.FirstOrDefault(x => x.RepairRecordId == repairRecordId);
|
||||
|
|
@ -738,7 +738,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string GenerateRepairTrust(string repairRecordId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string submitStr = string.Empty;
|
||||
Model.HJGL_RepairRecord repairRecord = BLL.RepairRecordService.GetRepairRecordById(repairRecordId);
|
||||
|
|
@ -846,7 +846,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> GetNdeCheckNoPassWarn(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var onecheckNoPass = (from x in db.HJGL_Batch_NDEItem
|
||||
join y in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
|
||||
|
|
@ -892,7 +892,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> GetNoTrustJointWarn(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var point = (from x in db.HJGL_Batch_PointBatchItem
|
||||
join y in db.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId
|
||||
|
|
@ -930,7 +930,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> GetNoCheckJointWarn(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.HJGL_Batch_BatchTrustItem
|
||||
join y in db.HJGL_Batch_BatchTrust on x.TrustBatchId equals y.TrustBatchId
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getPipelineList(string unitWrokId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.HJGL_Pipeline
|
||||
where x.UnitWorkId == unitWrokId
|
||||
|
|
@ -42,7 +42,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> GetWeldJointList(string pipeLineId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getData = (from x in db.View_HJGL_NoWeldJointFind
|
||||
where x.PipelineId == pipeLineId
|
||||
|
|
@ -69,7 +69,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> GetAllWeldJointList(string pipeLineId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.HJGL_WeldJoint
|
||||
where x.PipelineId == pipeLineId
|
||||
|
|
@ -93,7 +93,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getWelderList(string unitWorkId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var p = db.WBS_UnitWork.Where(x => x.UnitWorkId == unitWorkId).FirstOrDefault();
|
||||
var getDataLists = (from x in db.SitePerson_Person
|
||||
|
|
@ -119,7 +119,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.WeldJointItem getWeldJointInfo(string weldJointId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDateInfo = from x in db.HJGL_WeldJoint
|
||||
where x.WeldJointId == weldJointId
|
||||
|
|
@ -172,7 +172,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.WeldJointItem getWeldJointByIdentify(string weldJointIdentify)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDateInfo = from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId
|
||||
|
|
@ -212,7 +212,7 @@ namespace BLL
|
|||
/// <param name="addItem"></param>
|
||||
public static void SavePipeWeldJoint(Model.WeldJointItem addItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string projectId = string.Empty;
|
||||
string unitId = string.Empty;
|
||||
|
|
@ -369,7 +369,7 @@ namespace BLL
|
|||
/// <param name="addItem"></param>
|
||||
public static void SavePreWeldingDaily(Model.WeldJointItem addItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string projectId = string.Empty;
|
||||
string unitId = string.Empty;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.HJGL_PreWeldingDailyItem getPreWeldingDailyInfo(string preWeldingDailyId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.HJGL_PreWeldingDaily
|
||||
where x.PreWeldingDailyId == preWeldingDailyId
|
||||
|
|
@ -46,7 +46,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.HJGL_PreWeldingDailyItem> getPreWeldingDailyList(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getList = from x in db.HJGL_PreWeldingDaily
|
||||
where x.ProjectId == projectId
|
||||
|
|
@ -73,7 +73,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SavePreWeldingDaily(Model.HJGL_PreWeldingDailyItem newItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HJGL_PreWeldingDaily newP= new Model.HJGL_PreWeldingDaily
|
||||
{
|
||||
PreWeldingDailyId = newItem.PreWeldingDailyId,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.WelderPerformanceItem GetWelderPerformanceByQRC(string personId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
// todo 二维码分解待做
|
||||
var getDataLists = from x in db.View_WelderPerformance
|
||||
|
|
@ -46,7 +46,7 @@ namespace BLL
|
|||
|
||||
private static string GetWeldAvgNum(string personId,decimal totalDin)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string vagDin = string.Empty;
|
||||
var date = from x in db.HJGL_WeldJoint
|
||||
|
|
@ -75,7 +75,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.WelderPerformanceItem GetWelderPerformanceByWelderCode(string projectId,string welderCode)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
// todo 二维码分解待做
|
||||
var getDataLists = from x in db.View_WelderPerformance
|
||||
|
|
@ -109,7 +109,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getWelderQualify(string personId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Welder_WelderQualify
|
||||
where x.WelderId == personId
|
||||
|
|
@ -134,7 +134,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> GetWelderQualifyWarning(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var welder = from x in db.SitePerson_Person
|
||||
where x.ProjectId == projectId && x.WorkPostId == Const.WorkPost_Welder
|
||||
|
|
@ -247,7 +247,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.JointCompreInfoItem GetJointCompreInfo(string weldJointId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDateInfo = from x in db.View_HJGL_WeldJoint
|
||||
where x.WeldJointId == weldJointId
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getTestPackageNo(string unitWorkId, bool isFinish, string testPackageNo)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var dataList = from x in db.PTP_TestPackage
|
||||
where x.UnitWorkId == unitWorkId
|
||||
|
|
@ -60,7 +60,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.TestPackageItem> GetTestPackageDetail(string ptp_Id)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
//var getDataLists = (from x in db.View_PTP_TestPackageAudit
|
||||
// where x.PTP_ID == ptp_Id
|
||||
|
|
@ -91,7 +91,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> GetCanTestPackageWarning(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.BaseInfoItem> canTest = new List<Model.BaseInfoItem>();
|
||||
// 获取项目中未完成的试压包
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace BLL
|
|||
public static List<WelderEntrance> GetWelderList(string projectId, int index, int page, string name)
|
||||
{
|
||||
List<WelderEntrance> res = new List<WelderEntrance>();
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var q = from x in db.BS_Welder_Entrance
|
||||
where x.ProjectId == projectId
|
||||
|
|
@ -75,7 +75,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static WelderEntrance GetWelderById(string welderId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var item = db.BS_Welder_Entrance.FirstOrDefault(e => e.WED_ID == welderId);
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ namespace BLL
|
|||
/// <param name="welder"></param>
|
||||
public static void AddBSWelder(WelderEntrance welder)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.BS_Welder_Entrance newWelder = new Model.BS_Welder_Entrance();
|
||||
newWelder.WED_ID = welder.WED_ID;
|
||||
|
|
@ -152,7 +152,7 @@ namespace BLL
|
|||
/// <param name="teamGroup"></param>
|
||||
public static void UpdateBSWelder(WelderEntrance welder)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.BS_Welder_Entrance newWelder = db.BS_Welder_Entrance.FirstOrDefault(e => e.WED_ID == welder.WED_ID);
|
||||
if (newWelder != null)
|
||||
|
|
@ -216,7 +216,7 @@ namespace BLL
|
|||
/// <returns>true-存在,false-不存在</returns>
|
||||
public static bool IsExistWEDName(string WED_Name, string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var q = from x in db.BS_Welder_Entrance where x.WED_Name == WED_Name && x.ProjectId == projectId select x;
|
||||
if (q.Count() > 0)
|
||||
|
|
@ -238,7 +238,7 @@ namespace BLL
|
|||
/// <returns>true-存在,false-不存在</returns>
|
||||
public static bool IsExistWEDCode(string WED_Code, string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var q = from x in db.BS_Welder_Entrance where x.WED_Code == WED_Code && x.ProjectId == projectId select x;
|
||||
if (q.Count() > 0)
|
||||
|
|
@ -258,7 +258,7 @@ namespace BLL
|
|||
/// <param name="WED_ID"></param>
|
||||
public static void DeleteBSWelder(string WED_ID)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.BS_Welder_Entrance welder = db.BS_Welder_Entrance.FirstOrDefault(e => e.WED_ID == WED_ID);
|
||||
if (welder != null)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace BLL.API.HJGL
|
|||
{
|
||||
public static WelderItem GetWelderByIdCard(string idCard, string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
WelderItem item = new WelderItem();
|
||||
var welder = db.BS_Welder.Where(u => u.IdentityCard == idCard && u.ProjectId == projectId).FirstOrDefault();
|
||||
|
|
@ -57,7 +57,7 @@ namespace BLL.API.HJGL
|
|||
|
||||
public static List<WeldingMethodItem> GetWelderMethod(string welderId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var items = from x in db.BS_WeldMethodItem where x.WED_ID == welderId select x.WME_ID;
|
||||
var methods = from m in db.Base_WeldingMethod
|
||||
|
|
@ -77,7 +77,7 @@ namespace BLL.API.HJGL
|
|||
|
||||
public static List<BSSteelItem> GetWelderBSSteel(string welderId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var itemsSteel = from x in db.BS_WelderItem where x.WED_ID == welderId select x.STE_ID;
|
||||
var steel = from x in db.BS_Steel
|
||||
|
|
@ -98,7 +98,7 @@ namespace BLL.API.HJGL
|
|||
|
||||
public static List<ConsumablesItem> GetConsumables()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var steel = from x in db.Base_Consumables
|
||||
select new ConsumablesItem
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.TrainingPlanItem> getTrainingPlanListByProjectIdTrainTypeIdTrainStates(string projectId, string trainTypeId, string states)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_Plan
|
||||
where x.ProjectId == projectId && (x.States == states || states == null) && x.TrainTypeId == trainTypeId
|
||||
|
|
@ -59,7 +59,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.TrainingPlanItem getTrainingPlanByTrainingId(string planId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Training_Plan
|
||||
where x.PlanId == planId
|
||||
|
|
@ -101,7 +101,7 @@ namespace BLL
|
|||
/// <returns>培训计划人员</returns>
|
||||
public static List<Model.TrainingPlanItemItem> getTrainingPlanItemListByTrainingPlanId(string trainingPlanId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_PlanItem
|
||||
join y in db.Training_CompanyTraining on x.CompanyTrainingId equals y.CompanyTrainingId
|
||||
|
|
@ -133,7 +133,7 @@ namespace BLL
|
|||
/// <param name="trainingPlanItems">培训教材类型list</param>
|
||||
public static void SaveTrainingPlan(Model.TrainingPlanItem trainingPlan)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Training_Plan newTrainingPlan = new Model.Training_Plan
|
||||
{
|
||||
|
|
@ -283,7 +283,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static void AddTraining_Task(List<Model.TrainingTaskItem> trainingTasks, string planId, string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
foreach (var item in trainingTasks)
|
||||
{
|
||||
|
|
@ -311,7 +311,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static void AddTraining_PlanItem(List<Model.TrainingPlanItemItem> trainingPlanItems, string planId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
foreach (var item in trainingPlanItems)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.ChartAnalysisItem> getChartAnalysisByType(string projectId, string type, string startDate, string endDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.ChartAnalysisItem> getDataLists = new List<Model.ChartAnalysisItem>();
|
||||
var getHazardRegister = from x in db.HSSE_Hazard_HazardRegister
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.CheckSpecialItem getCheckSpecialById(string CheckSpecialId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.Check_CheckSpecial
|
||||
where x.CheckSpecialId == CheckSpecialId
|
||||
|
|
@ -80,7 +80,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.CheckSpecialItem> getCheckSpecialList(string projectId, string states)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getCheckSpecial = from x in db.Check_CheckSpecial
|
||||
where x.ProjectId == projectId && x.States ==states
|
||||
|
|
@ -145,7 +145,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveCheckSpecial(Model.CheckSpecialItem newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string message = string.Empty;
|
||||
Model.Check_CheckSpecial newCheckSpecial = new Model.Check_CheckSpecial
|
||||
|
|
@ -255,7 +255,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.CheckSpecialDetailItem> getCheckSpecialDetailList(string checkSpecialId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.Check_CheckSpecialDetail
|
||||
where x.CheckSpecialId == checkSpecialId
|
||||
|
|
@ -309,7 +309,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.CheckSpecialDetailItem getCheckSpecialDetailById(string checkSpecialDetailId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.Check_CheckSpecialDetail
|
||||
where x.CheckSpecialDetailId == checkSpecialDetailId
|
||||
|
|
@ -348,7 +348,7 @@ namespace BLL
|
|||
/// <param name="newDetail"></param>
|
||||
public static void SaveCheckSpecialDetail(Model.CheckSpecialDetailItem newDetail)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(newDetail.CheckSpecialId))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.ConstructSolutionItem getConstructSolutionByConstructSolutionId(string constructSolutionId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.Solution_ConstructSolution
|
||||
where x.ConstructSolutionId == constructSolutionId
|
||||
|
|
@ -56,7 +56,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.ConstructSolutionItem> getConstructSolutionList(string projectId, string unitId, string strParam, string states)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getConstructSolution = from x in db.Solution_ConstructSolution
|
||||
where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null)
|
||||
|
|
@ -96,7 +96,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SaveConstructSolution(Model.ConstructSolutionItem newItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Solution_ConstructSolution newConstructSolution = new Model.Solution_ConstructSolution
|
||||
{
|
||||
ConstructSolutionId = newItem.ConstructSolutionId,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.FileInfoItem getEmergencyListByEmergencyListId(string emergencyListId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.Emergency_EmergencyList
|
||||
where x.EmergencyListId == emergencyListId
|
||||
|
|
@ -58,7 +58,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.FileInfoItem> getEmergencyList(string projectId, string unitId, string states, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataList = from x in db.Emergency_EmergencyList
|
||||
where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null)
|
||||
|
|
@ -100,7 +100,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.FileInfoItem getEmergencySupplyByEmergencySupplyId(string emergencySupplyId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.Emergency_EmergencySupply
|
||||
where x.FileId == emergencySupplyId
|
||||
|
|
@ -136,7 +136,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.FileInfoItem> getEmergencySupplyList(string projectId, string unitId, string states, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataList = from x in db.Emergency_EmergencySupply
|
||||
where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null)
|
||||
|
|
@ -172,7 +172,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.FileInfoItem getEmergencyTeamAndTrainByEmergencyTeamAndTrainId(string emergencyTeamAndTrainId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.Emergency_EmergencyTeamAndTrain
|
||||
where x.FileId == emergencyTeamAndTrainId
|
||||
|
|
@ -204,7 +204,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.EmergencyTeamItem> getEmergencyTeamItems(string fileId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.Emergency_EmergencyTeamItem
|
||||
where x.FileId == fileId
|
||||
|
|
@ -232,7 +232,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.FileInfoItem> getEmergencyTeamAndTrainList(string projectId, string unitId,string states, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataList = from x in db.Emergency_EmergencyTeamAndTrain
|
||||
where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null)
|
||||
|
|
@ -268,7 +268,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SaveEmergency(Model.FileInfoItem emergencyInfo)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string menuId = string.Empty;
|
||||
if (emergencyInfo.MenuType == "1")
|
||||
|
|
@ -460,7 +460,7 @@ namespace BLL
|
|||
///// <returns></returns>
|
||||
//public static Model.EmergencyProcessItem getEmergencyProcessItem(string projectId, string processSteps)
|
||||
//{
|
||||
// using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
// using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
// {
|
||||
// var getDataList = (from x in db.Emergency_EmergencyProcess
|
||||
// where x.ProjectId == projectId && x.ProcessSteps == processSteps
|
||||
|
|
@ -501,7 +501,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.EmergencyProcessItem> getEmergencyProcessList(string projectId, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataList = from x in db.Emergency_EmergencyProcess
|
||||
where x.ProjectId == projectId
|
||||
|
|
@ -530,7 +530,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getEmergencyProcessItem(string projectId, string processSteps)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.BaseInfoItem> getDataList = new List<Model.BaseInfoItem>();
|
||||
var getEmergencyProcess = db.Emergency_EmergencyProcess.FirstOrDefault(x => x.ProjectId == projectId && x.ProcessSteps == processSteps);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.EquipmentQualityItem getEquipmentQualityByEquipmentQualityIdFactoryCode(string equipmentQualityId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getEquipmentQuality = (from x in db.View_QualityAudit_EquipmentQuality
|
||||
where x.EquipmentQualityId == equipmentQualityId || x.FactoryCode == equipmentQualityId
|
||||
|
|
@ -60,7 +60,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.EquipmentQualityItem> getEquipmentQualityList(string projectId, string unitId, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getEquipmentQuality = from x in db.View_QualityAudit_EquipmentQuality
|
||||
where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null)
|
||||
|
|
@ -103,7 +103,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SaveEquipmentQuality(Model.EquipmentQualityItem newItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.QualityAudit_EquipmentQuality newEquipmentQuality = new Model.QualityAudit_EquipmentQuality
|
||||
{
|
||||
EquipmentQualityId = newItem.EquipmentQualityId,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.EquipmentQualityItem getEquipmentQualityByEquipmentQualityIdFactoryCode(string equipmentQualityId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getEquipmentQuality = (from x in db.View_QualityAudit_GeneralEquipmentQuality
|
||||
where x.GeneralEquipmentQualityId == equipmentQualityId
|
||||
|
|
@ -53,7 +53,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.EquipmentQualityItem> getEquipmentQualityList(string projectId, string unitId, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getEquipmentQuality = from x in db.View_QualityAudit_GeneralEquipmentQuality
|
||||
where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null)
|
||||
|
|
@ -89,7 +89,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SaveEquipmentQuality(Model.EquipmentQualityItem newItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.QualityAudit_GeneralEquipmentQuality newEquipmentQuality = new Model.QualityAudit_GeneralEquipmentQuality
|
||||
{
|
||||
GeneralEquipmentQualityId = newItem.EquipmentQualityId,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace BLL
|
|||
/// <returns>物质出门详细</returns>
|
||||
public static Model.GoodsManageItem getGoodsManageById(string id)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.GoodsManageItem getGoodsItem = new Model.GoodsManageItem();
|
||||
var getData = db.CostGoods_GoodsManage.FirstOrDefault(x => x.GoodsManageId == id);
|
||||
|
|
@ -72,7 +72,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.GoodsManageItemItem> getItemList(string goodsManageId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.CostGoods_GoodsManageItem
|
||||
where x.GoodsManageId == goodsManageId
|
||||
|
|
@ -96,7 +96,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.FlowOperateItem> getFlowOperateItemList(string goodsManageId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.CostGoods_GoodsManageFlowOperate
|
||||
where x.GoodsManageId == goodsManageId
|
||||
|
|
@ -125,7 +125,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.CostGoods_GoodsManageFlowOperate getFlowOperate(string goodsManageId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.CostGoods_GoodsManageFlowOperate
|
||||
where x.GoodsManageId == goodsManageId && !x.OperaterTime.HasValue
|
||||
|
|
@ -143,7 +143,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.CostGoods_GoodsManageFlowOperate getNextFlowOperate(string goodsManageId,int sortIndex)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.CostGoods_GoodsManageFlowOperate
|
||||
where x.GoodsManageId == goodsManageId && x.SortIndex == sortIndex +1
|
||||
|
|
@ -172,7 +172,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.GoodsManageItem> getGoodsManageByProjectIdStates(string projectId, string states, int pageIndex)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getData = from x in db.CostGoods_GoodsManage
|
||||
where x.ProjectId == projectId
|
||||
|
|
@ -226,7 +226,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SaveGoodsManage(Model.GoodsManageItem goodsManage)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_GoodsManage newGoods = new Model.CostGoods_GoodsManage
|
||||
{
|
||||
GoodsManageId = goodsManage.GoodsManageId,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.HSEDiaryItem getHSEDiary(string projectId, string userId, string diaryDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
DateTime? getDiaryDate = Funs.GetNewDateTime(diaryDate);
|
||||
Model.HSEDiaryItem getItem = new Model.HSEDiaryItem();
|
||||
|
|
@ -63,7 +63,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.Sys_FlowOperate> ReturnFlowOperteList(string getProjectId, string getUserId, DateTime getDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.Sys_FlowOperate
|
||||
where x.ProjectId == getProjectId && x.OperaterId == getUserId && x.IsClosed == true
|
||||
|
|
@ -82,7 +82,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.HSEDiaryItem> getHSEDiaryList(string projectId, string userId, string diaryDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
DateTime? getDiaryDate = Funs.GetNewDateTime(diaryDate);
|
||||
var getDataList = from x in db.Project_HSEDiary
|
||||
|
|
@ -112,7 +112,7 @@ namespace BLL
|
|||
public static void SaveHSEDiary(Model.HSEDiaryItem item)
|
||||
{
|
||||
DeleteHSEDiary(item.HSEDiaryId);
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Project_HSEDiary newHSEDiary = new Model.Project_HSEDiary
|
||||
{
|
||||
|
|
@ -149,7 +149,7 @@ namespace BLL
|
|||
/// <param name="hseDiaryId"></param>
|
||||
public static void DeleteHSEDiary(string hseDiaryId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = db.Project_HSEDiary.FirstOrDefault(x => x.HSEDiaryId == hseDiaryId);
|
||||
if (getInfo != null)
|
||||
|
|
@ -166,7 +166,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static string getValues1(List<Model.Sys_FlowOperate> getFlowOperteList, string getProjectId, string getUserId, DateTime getDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string strValues = string.Empty;
|
||||
var getRegister = (from x in db.HSSE_Hazard_HazardRegister
|
||||
|
|
@ -210,7 +210,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static string getValues2(List<Model.Sys_FlowOperate> getFlowOperteList, string getProjectId, string getUserId, DateTime getDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string strValues = string.Empty;
|
||||
var getCHeck = from x in db.Check_RectifyNotices
|
||||
|
|
@ -250,7 +250,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static string getValues3(List<Model.Sys_FlowOperate> getFlowOperteList, string getProjectId, string getUserId, DateTime getDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string strValues = string.Empty;
|
||||
var getLicense = from x in db.License_FlowOperate
|
||||
|
|
@ -355,7 +355,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static string getValues6(List<Model.Sys_FlowOperate> getFlowOperteList, string getProjectId, string getUserId, DateTime getDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string strValues = string.Empty;
|
||||
var getCompileCount = (from x in db.Emergency_EmergencyList
|
||||
|
|
@ -393,7 +393,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static string getValues7(List<Model.Sys_FlowOperate> getFlowOperteList, string getProjectId, string getUserId, DateTime getDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string strValues = string.Empty;
|
||||
var getFlows = getFlowOperteList.Where(x => x.MenuId == Const.ProjectTrainRecordMenuId).ToList();
|
||||
|
|
@ -426,7 +426,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static string getValues8(List<Model.Sys_FlowOperate> getFlowOperteList, string getProjectId, string getUserId, DateTime getDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string strValues = string.Empty;
|
||||
var getClassMeeting = getFlowOperteList.Where(x => x.MenuId == Const.ProjectClassMeetingMenuId).Count();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.HazardListItem getHazardListInfoByHazardListId(string hazardListId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.Hazard_HazardList
|
||||
where x.HazardListId == hazardListId
|
||||
|
|
@ -53,7 +53,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.HazardListItem> getHazardListList(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getHazardList = from x in db.Hazard_HazardList
|
||||
where x.ProjectId == projectId && x.States == Const.State_2
|
||||
|
|
@ -89,7 +89,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.HazardListSelectedItem> getHazardListSelectedInfo(string hazardListId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getHazardList = from x in db.Hazard_HazardSelectedItem
|
||||
join y in db.Technique_HazardListType on x.HazardListTypeId equals y.HazardListTypeId
|
||||
|
|
@ -125,7 +125,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getRiskLevel()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getRiskLevel = from x in db.Base_RiskLevel
|
||||
orderby x.RiskLevel
|
||||
|
|
@ -148,7 +148,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.HazardListSelectedItem> getHazardItemInfo(string hazardSelectedItemId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getHazardList = from x in db.Hazard_HazardSelectedItem
|
||||
join y in db.Technique_HazardListType on x.HazardListTypeId equals y.HazardListTypeId
|
||||
|
|
@ -190,7 +190,7 @@ namespace BLL
|
|||
public static string SaveRoutingInspection(Model.RoutingInspectionItem newDetail)
|
||||
{
|
||||
string message = string.Empty;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var oldP = db.Hazard_PatrolPlan.FirstOrDefault(x => x.HazardSelectedItemId == newDetail.HazardSelectedItemId && x.CheckDate == null);
|
||||
if (oldP != null)
|
||||
|
|
@ -311,7 +311,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.ReEvaluator> getReEvaluatorInfo(string LECItemRecordId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getHazardList = from x in db.Hazard_RiskEvaluationRecord
|
||||
where x.LECItemRecordId == LECItemRecordId
|
||||
|
|
@ -334,7 +334,7 @@ namespace BLL
|
|||
/// <param name="newDetail"></param>
|
||||
public static void SaveReEvaluator(Model.ReEvaluator newDetail)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Hazard_HazardSelectedItem item = BLL.Hazard_HazardSelectedItemService.GetHazardSelectedItemByHazardSelectedItemId(newDetail.HazardSelectedItemId);
|
||||
if (item != null)
|
||||
|
|
@ -425,7 +425,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.RoutingInspectionItem> getRoutingInspectionList(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getHazardList = from x in db.Hazard_RoutingInspection
|
||||
join y in db.Hazard_HazardSelectedItem on x.HazardSelectedItemId equals y.HazardSelectedItemId
|
||||
|
|
@ -482,7 +482,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.RoutingInspectionItem> getRoutingInspection(string routingInspectionId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getHazardList = from x in db.Hazard_RoutingInspection
|
||||
join y in db.Hazard_HazardSelectedItem on x.HazardSelectedItemId equals y.HazardSelectedItemId
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace BLL
|
|||
/// <param name="newDetail"></param>
|
||||
public static string SaveHazardRealTime(Model.Hazard_RealTimeItem newDetail)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Hazard_RealTimeDevice realTimeDevice = db.Hazard_RealTimeDevice.FirstOrDefault(x => x.BitNum == newDetail.BitNum);
|
||||
if (realTimeDevice == null)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.HazardRegisterItem getHazardRegisterByHazardRegisterId(string hazardRegisterId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getHazardRegister = db.View_Hazard_HazardRegister.FirstOrDefault(x => x.HazardRegisterId == hazardRegisterId);
|
||||
return ObjectMapperManager.DefaultInstance.GetMapper<Model.View_Hazard_HazardRegister, Model.HazardRegisterItem>().Map(getHazardRegister);
|
||||
|
|
@ -31,7 +31,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.HazardRegisterItem> getHazardRegisterByProjectIdStates(string projectId, string states, int pageIndex)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var hazardRegisters = (from x in db.View_Hazard_HazardRegister
|
||||
where x.ProjectId == projectId && (x.States == states || states == null)
|
||||
|
|
@ -48,7 +48,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SaveHazardRegister(Model.HazardRegisterItem hazardRegister)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.HSSE_Hazard_HazardRegister newHazardRegister = new Model.HSSE_Hazard_HazardRegister
|
||||
{
|
||||
|
|
@ -162,7 +162,7 @@ namespace BLL
|
|||
unitId = getUnit.UnitId;
|
||||
unitName = getUnit.UnitName;
|
||||
}
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var hazardRegisters = (from x in db.HSSE_Hazard_HazardRegister
|
||||
join y in db.Base_Project on x.ProjectId equals y.ProjectId
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.IncentiveNoticeItem getIncentiveNoticeById(string incentiveNoticeId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.Check_IncentiveNotice
|
||||
where x.IncentiveNoticeId == incentiveNoticeId
|
||||
|
|
@ -69,7 +69,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.IncentiveNoticeItem> getIncentiveNoticeList(string projectId, string unitId, string strParam, string states)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getIncentiveNotice = from x in db.Check_IncentiveNotice
|
||||
where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null)
|
||||
|
|
@ -119,7 +119,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SaveIncentiveNotice(Model.IncentiveNoticeItem newItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_IncentiveNotice newIncentiveNotice = new Model.Check_IncentiveNotice
|
||||
{
|
||||
IncentiveNoticeId = newItem.IncentiveNoticeId,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.LicenseDataItem getLicenseDataById(string strMenuId, string id)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.LicenseDataItem getInfo = new Model.LicenseDataItem();
|
||||
#region 动火作业票
|
||||
|
|
@ -529,7 +529,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.LicenseDataItem> getLicenseDataList(string strMenuId, string projectId, string unitId, string states)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
if (!ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(projectId, unitId))
|
||||
{
|
||||
|
|
@ -1023,7 +1023,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.LicenseDataItem> getLicenseDataListByStates(string projectId, string unitId, string states)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
if (!ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(projectId, unitId))
|
||||
{
|
||||
|
|
@ -1409,7 +1409,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.LicenseItem> getLicenseLicenseItemList(string dataId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfoList = (from x in db.License_LicenseItem
|
||||
where x.DataId == dataId
|
||||
|
|
@ -1438,7 +1438,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.FlowOperateItem> getLicenseFlowOperateList(string dataId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfoList = (from x in db.License_FlowOperate
|
||||
where x.DataId == dataId && (!x.IsFlowEnd.HasValue || x.IsFlowEnd == false)
|
||||
|
|
@ -1473,7 +1473,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveLicenseData(Model.LicenseDataItem newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string strLicenseId = newItem.LicenseId;
|
||||
string projectId = newItem.ProjectId;
|
||||
|
|
@ -2560,7 +2560,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SaveLicenseFlowOperate(Model.FlowOperateItem newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string strMenuId = string.Empty;
|
||||
bool boolIsFlowEnd = false;
|
||||
|
|
@ -3038,7 +3038,7 @@ namespace BLL
|
|||
/// <param name="newItemList">下一步流程集合</param>
|
||||
public static void SaveNextLicenseFlowOperate(List<Model.FlowOperateItem> newItemList)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string dataId = newItemList.FirstOrDefault().DataId;
|
||||
string menuId = newItemList.FirstOrDefault().MenuId;
|
||||
|
|
@ -3102,7 +3102,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.FlowOperateItem getLicenseFlowOperate(string dataId, string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
////审核记录
|
||||
var getFlowOperate = from x in db.License_FlowOperate
|
||||
|
|
@ -3142,7 +3142,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.FlowOperateItem> getNextLicenseFlowOperate(string strMenuId, Model.LicenseDataItem licenseInfo, Model.FlowOperateItem getNowFlowOperate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.FlowOperateItem> getFlowOperate = new List<Model.FlowOperateItem>();
|
||||
var getAllFlows = from x in db.License_FlowOperate
|
||||
|
|
@ -3273,7 +3273,7 @@ namespace BLL
|
|||
|
||||
public static string cancleLicenseFlowOperate(string strMenuId,string dataId, string useId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getFlow = db.License_FlowOperate.Where(x => x.DataId == dataId && x.OperaterId == useId && x.OperaterTime != null).OrderBy(x => x.SortIndex).OrderBy(x => x.GroupNum).OrderBy(x => x.OrderNum).FirstOrDefault();
|
||||
if (getFlow != null)
|
||||
|
|
@ -3599,7 +3599,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void getDeleteLicenseFlowOperate(string flowOperateId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var delteFlow = db.License_FlowOperate.FirstOrDefault(x => x.FlowOperateId == flowOperateId);
|
||||
if (delteFlow != null)
|
||||
|
|
@ -3653,7 +3653,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.FlowOperateItem> getNextLicenseFlowOperateGroupList(string flowOperateId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.FlowOperateItem> getNextFlowsList = new List<Model.FlowOperateItem>();
|
||||
var getFlow = db.License_FlowOperate.FirstOrDefault(x => x.FlowOperateId == flowOperateId);
|
||||
|
|
@ -3689,7 +3689,7 @@ namespace BLL
|
|||
}
|
||||
public static Model.FlowOperateItem getFinishLicenseFlowOperateGroupList(string dataId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
var q = (from x in db.License_FlowOperate
|
||||
|
|
@ -3732,7 +3732,7 @@ namespace BLL
|
|||
{
|
||||
string strLicenseId = newItem.LicenseId;
|
||||
string projectId = newItem.ProjectId;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
//// 删除未审核的流程记录
|
||||
var getDelFlows = from x in db.License_FlowOperate
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.FlowOperateItem getLicenseFlowOperateById(string flowOperateId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataList = from x in db.License_FlowOperate
|
||||
where x.FlowOperateId == flowOperateId
|
||||
|
|
@ -51,7 +51,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.FlowOperateItem> getLicenseFlowOperateList(string dataId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataList = from x in db.License_FlowOperate
|
||||
where x.DataId == dataId
|
||||
|
|
@ -86,7 +86,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.FlowOperateItem> getLicenseFlowOperateItemList(string flowOperateId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataList = from x in db.License_FlowOperateItem
|
||||
join y in db.License_FlowOperate on x.FlowOperateId equals y.FlowOperateId
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.LicenseItem getLicenseItemById(string licenseItemId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.License_LicenseItem
|
||||
where x.LicenseItemId == licenseItemId
|
||||
|
|
@ -43,7 +43,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.LicenseItem> getLicenseItemList(string dataId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataList = from x in db.License_LicenseItem
|
||||
where x.DataId == dataId
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.MaterialItem> getMaterialList(string projectId, string strParam )
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getConstructSolution = from x in db.HSSE_Material
|
||||
where x.ProjectId == projectId
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace BLL
|
|||
/// <returns>会议详细</returns>
|
||||
public static Model.MeetingItem getMeetingByMeetingId(string meetingId, string meetingType)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.MeetingItem getMeetItem = new Model.MeetingItem();
|
||||
if (meetingType == "C")
|
||||
|
|
@ -203,7 +203,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.MeetingItem> getMeetingByProjectIdStates(string projectId, string meetingType, string states,int pageIndex)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.MeetingItem> getMeetItem = new List<Model.MeetingItem>();
|
||||
if (meetingType == "C")
|
||||
|
|
@ -377,7 +377,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SaveMeeting(Model.MeetingItem meeting)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
string menuId = string.Empty;
|
||||
if (meeting.MeetingType == "C")
|
||||
{
|
||||
|
|
@ -663,7 +663,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.MeetingItem> getClassMeetingInfo(string projectId, string unitId, string meetingDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.MeetingItem> getMeetItems = new List<Model.MeetingItem>();
|
||||
DateTime mdate = Funs.GetNewDateTimeOrNow(meetingDate);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.PageDataPersonInOutItem> getPersonInOutAllNum(DateTime dateValue)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.PageDataPersonInOutItem> getSiteInOutList = new List<Model.PageDataPersonInOutItem>();
|
||||
var getDayAll = from x in db.SitePerson_PersonInOutNow
|
||||
|
|
@ -45,7 +45,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.PageDataPersonInOutItem> getPersonNum(string projectId, DateTime dateValue)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.PageDataPersonInOutItem> getSiteInOutList = new List<Model.PageDataPersonInOutItem>();
|
||||
var getDayAll = from x in db.SitePerson_PersonInOutNow
|
||||
|
|
@ -78,7 +78,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.PageDataPersonInOutItem> getPersonInOutNum(string projectId, DateTime dateValue)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.PageDataPersonInOutItem> getSiteInOutList = new List<Model.PageDataPersonInOutItem>();
|
||||
var getDayAll = from x in db.SitePerson_PersonInOutNow
|
||||
|
|
@ -112,7 +112,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int getSafeHours(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
int safeHours = 0;
|
||||
var getPersonInOutNumber = db.SitePerson_PersonInOutNumber.FirstOrDefault(x => x.ProjectId == projectId && x.InOutDate.Year == DateTime.Now.Year
|
||||
|
|
@ -137,7 +137,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int getSafeWorkTime(string projectId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
int SafeHours = 0;
|
||||
//// 查找当前项目 最新的人工时数量记录
|
||||
int getMaxWorkHours = db.SitePerson_PersonInOutNumber.Where(x => x.ProjectId == projectId).Max(x => x.WorkHours) ?? 0;
|
||||
|
|
@ -181,7 +181,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int getPersonInNowNum(string projectId, DateTime dateValue)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDayAll = from x in db.SitePerson_PersonInOutNow
|
||||
where x.ProjectId == projectId && x.ChangeTime.Value.Year == dateValue.Year && x.ChangeTime.Value.Month == dateValue.Month
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.PauseNoticeItem getPauseNoticeById(string PauseNoticeId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.Check_PauseNotice
|
||||
where x.PauseNoticeId == PauseNoticeId
|
||||
|
|
@ -82,7 +82,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.FlowOperateItem> getFlowOperateItem(string pauseNoticeId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.Check_PauseNoticeFlowOperate
|
||||
where x.PauseNoticeId == pauseNoticeId
|
||||
|
|
@ -114,7 +114,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.PauseNoticeItem> getPauseNoticeList(string projectId, string unitId, string strParam, string states)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getPauseNotice = from x in db.Check_PauseNotice
|
||||
where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null) && x.PauseStates == states
|
||||
|
|
@ -164,7 +164,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SavePauseNotice(Model.PauseNoticeItem newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_PauseNotice newPauseNotice = new Model.Check_PauseNotice
|
||||
{
|
||||
|
|
@ -388,7 +388,7 @@ namespace BLL
|
|||
/// <param name="attachUrl">路径</param>
|
||||
public static void SavePauseNoticeUrl(string pauseNoticeId, string attachUrl)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getPauseNotice = db.Check_PauseNotice.FirstOrDefault(x => x.PauseNoticeId == pauseNoticeId);
|
||||
if (getPauseNotice != null)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.PersonQualityItem getPersonQualityInfo(string type, string dataId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.PersonQualityItem getQualityItem = new Model.PersonQualityItem();
|
||||
if (type == "1")
|
||||
|
|
@ -159,7 +159,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.PersonQualityItem> getPersonQualityList(string projectId, string unitId, string qualityType, string workPostId, string states, string unitIdQ)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.PersonQualityItem> getLists = new List<Model.PersonQualityItem>();
|
||||
if (qualityType == "1")
|
||||
|
|
@ -329,7 +329,7 @@ namespace BLL
|
|||
/// <param name="personQuality">人员信息</param>
|
||||
public static void SavePersonQuality(Model.PersonQualityItem personQuality)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
if (personQuality.QualityType == "1")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.PunishNoticeItem getPunishNoticeById(string PunishNoticeId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.Check_PunishNotice
|
||||
where x.PunishNoticeId == PunishNoticeId
|
||||
|
|
@ -74,7 +74,7 @@ namespace BLL
|
|||
|
||||
public static List<Model.PunishNoticeItemItem> GetPunishNoticeItemList(string punishNoticeId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.Check_PunishNoticeItem
|
||||
where x.PunishNoticeId == punishNoticeId
|
||||
|
|
@ -98,7 +98,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.FlowOperateItem> getFlowOperateItem(string punishNoticeId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.Check_PunishNoticeFlowOperate
|
||||
where x.PunishNoticeId == punishNoticeId
|
||||
|
|
@ -130,7 +130,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.PunishNoticeItem> getPunishNoticeList(string projectId, string unitId, string strParam, string states)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getPunishNotice = from x in db.Check_PunishNotice
|
||||
where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null) && x.PunishStates == states
|
||||
|
|
@ -178,7 +178,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SavePunishNotice(Model.PunishNoticeItem newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
bool insertPunishNoticeItemItem = false;
|
||||
Model.Check_PunishNotice newPunishNotice = new Model.Check_PunishNotice
|
||||
|
|
@ -453,7 +453,7 @@ namespace BLL
|
|||
/// <param name="attachUrl">回执单路径</param>
|
||||
public static void SavePunishNoticeReceiptUrl(string punishNoticeId, string attachUrl, string type)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getPunishNotice = db.Check_PunishNotice.FirstOrDefault(x => x.PunishNoticeId == punishNoticeId);
|
||||
if (getPunishNotice != null)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace BLL
|
|||
/// <returns>来文详细</returns>
|
||||
public static Model.ReceiveFileManagerItem getReceiveFileManagerById(string receiveFileManagerId, string fileType)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getReceiveFileManagerItem = (from x in db.InformationProject_ReceiveFileManager
|
||||
where x.ReceiveFileManagerId == receiveFileManagerId && x.FileType == fileType
|
||||
|
|
@ -62,7 +62,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.ReceiveFileManagerItem> getReceiveFileManagerList(string projectId, string fileType, string unitId, string states)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getReceiveFileManagerItem = (from x in db.InformationProject_ReceiveFileManager
|
||||
where x.ProjectId == projectId && x.FileType == fileType
|
||||
|
|
@ -122,7 +122,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SaveReceiveFileManager(Model.ReceiveFileManagerItem newItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
string menuId = string.Empty;
|
||||
Model.InformationProject_ReceiveFileManager newReceiveFile = new Model.InformationProject_ReceiveFileManager
|
||||
{
|
||||
|
|
@ -188,7 +188,7 @@ namespace BLL
|
|||
/// <param name="attachUrl">回执单路径</param>
|
||||
public static void SaveReplyFileAttachUrl(string receiveFileManagerId, string replyFileAttachUrl)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getFile = db.InformationProject_ReceiveFileManager.FirstOrDefault(x => x.ReceiveFileManagerId == receiveFileManagerId);
|
||||
if (getFile != null)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.RectifyNoticesItem getRectifyNoticesById(string rectifyNoticesId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getRectifyNotices = from x in db.Check_RectifyNotices
|
||||
where x.RectifyNoticesId == rectifyNoticesId
|
||||
|
|
@ -91,7 +91,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.RectifyNoticesItemItem> getRectifyNoticesItemItem(string rectifyNoticesId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.Check_RectifyNoticesItem
|
||||
where x.RectifyNoticesId == rectifyNoticesId
|
||||
|
|
@ -120,7 +120,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.RectifyNoticesFlowOperateItem> getRectifyNoticesFlowOperateItem(string rectifyNoticesId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.Check_RectifyNoticesFlowOperate
|
||||
where x.RectifyNoticesId == rectifyNoticesId
|
||||
|
|
@ -181,7 +181,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void SaveRectifyNotices(Model.RectifyNoticesItem rectifyNotices)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
bool insertRectifyNoticesItemItem = false;
|
||||
Model.Check_RectifyNotices newRectifyNotices = new Model.Check_RectifyNotices
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.ResourcesItem> getTrainingListBySupTrainingId(string supTypeId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Training_Training
|
||||
where x.SupTrainingId == supTypeId || (supTypeId == null && x.SupTrainingId == "0")
|
||||
|
|
@ -40,7 +40,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getTrainingItemListByTrainingId(string trainingId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_TrainingItem
|
||||
where x.TrainingId == trainingId && x.IsPass == true
|
||||
|
|
@ -63,7 +63,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.BaseInfoItem getTrainingItemByTrainingItemId(string trainingItemId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataInfo = from x in db.Training_TrainingItem
|
||||
where x.TrainingItemId == trainingItemId
|
||||
|
|
@ -87,7 +87,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.ResourcesItem> getCompanyTrainingListBySupTrainingId(string supTypeId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Training_CompanyTraining
|
||||
where x.SupCompanyTrainingId == supTypeId || (supTypeId == null && x.SupCompanyTrainingId == "0")
|
||||
|
|
@ -111,7 +111,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getCompanyTrainingItemListByTrainingId(string trainingId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_CompanyTrainingItem
|
||||
where x.CompanyTrainingId == trainingId
|
||||
|
|
@ -134,7 +134,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.BaseInfoItem getCompanyTrainingItemByTrainingItemId(string trainingItemId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataInfo = from x in db.Training_CompanyTrainingItem
|
||||
where x.CompanyTrainingItemId == trainingItemId
|
||||
|
|
@ -159,7 +159,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getCompanySafetyInstitutionList()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.HSSESystem_SafetyInstitution
|
||||
orderby x.EffectiveDate descending
|
||||
|
|
@ -181,7 +181,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.BaseInfoItem getCompanySafetyInstitutionInfo(string safetyInstitutionId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataInfo = from x in db.HSSESystem_SafetyInstitution
|
||||
where x.SafetyInstitutionId == safetyInstitutionId
|
||||
|
|
@ -205,7 +205,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.ResourcesItem> getTestTrainingListBySupTrainingId(string supTypeId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Training_TestTraining
|
||||
where x.SupTrainingId == supTypeId || (supTypeId == null && x.SupTrainingId == "0")
|
||||
|
|
@ -229,7 +229,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getTestTrainingItemListByTrainingId(string testTrainingId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_TestTrainingItem
|
||||
where x.TrainingId == testTrainingId
|
||||
|
|
@ -252,7 +252,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.TestTrainingResourcesItem getTestTrainingItemByTrainingItemId(string trainingItemId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataInfo = from x in db.Training_TestTrainingItem
|
||||
where x.TrainingItemId == trainingItemId
|
||||
|
|
@ -287,7 +287,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.ResourcesItem> getAccidentCaseListBySupAccidentCaseId(string supTypeId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.EduTrain_AccidentCase
|
||||
where x.SupAccidentCaseId == supTypeId || (supTypeId == null && x.SupAccidentCaseId == "0")
|
||||
|
|
@ -311,7 +311,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getAccidentCaseItemListById(string accidentCaseId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.EduTrain_AccidentCaseItem
|
||||
where x.AccidentCaseId == accidentCaseId
|
||||
|
|
@ -333,7 +333,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.BaseInfoItem getAccidentCaseItemById(string accidentCaseItemId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataInfo = from x in db.EduTrain_AccidentCaseItem
|
||||
where x.AccidentCaseItemId == accidentCaseItemId
|
||||
|
|
@ -359,7 +359,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.ResourcesItem> getCheckItemSetListBySupCheckItemId(string supTypeId, string checkType)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Technique_CheckItemSet
|
||||
where x.CheckType == checkType && (x.SupCheckItem == supTypeId || (supTypeId == null && x.SupCheckItem == "0"))
|
||||
|
|
@ -383,7 +383,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.BaseInfoItem> getCheckItemSetItemListBycheckItemSetId(string checkItemSetId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Technique_CheckItemDetail
|
||||
where x.CheckItemSetId == checkItemSetId
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SeDinMonthReportItem> getSeDinMonthReportList(string projectId, string month, string states)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
var getSeDinMonthReport = from x in db.SeDin_MonthReport
|
||||
|
|
@ -89,7 +89,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport1Item getSeDinMonthReportNullPage1(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
///项目经理
|
||||
string projectManagerId = string.Empty;
|
||||
|
|
@ -132,7 +132,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport2Item getSeDinMonthReportNullPage2(string projectId, string month, string startDate, string endDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var newItem = new Model.SeDinMonthReport2Item();
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
|
|
@ -226,7 +226,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SeDinMonthReport3Item> getSeDinMonthReport3ItemNull(string projectId, string month, string startDate, string endDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var startDateD = Funs.GetNewDateTime(startDate);
|
||||
var endDateD = Funs.GetNewDateTime(endDate);
|
||||
|
|
@ -274,7 +274,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SeDinMonthReport4Item> getSeDinMonthReportNullPage4(string projectId, string month, string startDate, string endDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var startDateD = Funs.GetNewDateTime(startDate);
|
||||
var endDateD = Funs.GetNewDateTime(endDate);
|
||||
|
|
@ -313,7 +313,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static int getPersonsNum(List<Model.SitePerson_Person> getPersons, string unitId, string type)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
int num = 0;
|
||||
var getUnitPersons = getPersons.Where(x => x.UnitId == unitId);
|
||||
|
|
@ -367,7 +367,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport4OtherItem getSeDinMonthReportNullPage4Other(string projectId, string month, string startDate, string endDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var startDateD = Funs.GetNewDateTime(startDate);
|
||||
var endDateD = Funs.GetNewDateTime(endDate);
|
||||
|
|
@ -398,7 +398,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SeDinMonthReport5Item> getSeDinMonthReportNullPage5(string projectId, string month, string startDate, string endDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var startDateD = Funs.GetNewDateTime(startDate);
|
||||
var endDateD = Funs.GetNewDateTime(endDate);
|
||||
|
|
@ -494,7 +494,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport7Item getSeDinMonthReportNullPage7(string projectId, string month, string startDate, string endDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var startDateD = Funs.GetNewDateTime(startDate);
|
||||
var endDateD = Funs.GetNewDateTime(endDate);
|
||||
|
|
@ -545,7 +545,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport8Item getSeDinMonthReportNullPage8(string projectId, string month, string startDate, string endDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var startDateD = Funs.GetNewDateTime(startDate);
|
||||
var endDateD = Funs.GetNewDateTime(endDate);
|
||||
|
|
@ -580,7 +580,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SeDinMonthReport8ItemItem> getSeDinMonthReport8ItemNull(string projectId, string month, DateTime? startDateD, DateTime? endDateD)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.SeDinMonthReport8ItemItem> getLists = new List<Model.SeDinMonthReport8ItemItem>();
|
||||
var getUnits = from x in db.Base_Unit
|
||||
|
|
@ -636,7 +636,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport9Item getSeDinMonthReportNullPage9(string projectId, string month, string startDate, string endDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var startDateD = Funs.GetNewDateTime(startDate);
|
||||
var endDateD = Funs.GetNewDateTime(endDate);
|
||||
|
|
@ -698,7 +698,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SeDinMonthReport9ItemRectification> getSeDinMonthReport9ItemRectificationNull(string projectId, string month, string startDate, string endDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var startDateD = Funs.GetNewDateTime(startDate);
|
||||
var endDateD = Funs.GetNewDateTime(endDate);
|
||||
|
|
@ -742,7 +742,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SeDinMonthReport9ItemSpecial> getSeDinMonthReport9ItemSpecialNull(List<Model.Check_CheckSpecial> getCheckSpecialAll, List<Model.Check_CheckSpecial> getCheckSpecialYear, List<Model.Check_CheckSpecial> getCheckSpecialMon)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.SeDinMonthReport9ItemSpecial> getLists = new List<Model.SeDinMonthReport9ItemSpecial>();
|
||||
var getUnits = APIResourcesService.getCheckItemSetListBySupCheckItemId("0", "2");
|
||||
|
|
@ -771,7 +771,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SeDinMonthReport9ItemStoppage> getSeDinMonthReport9ItemStoppageNull(string projectId, string month, string startDate, string endDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var startDateD = Funs.GetNewDateTime(startDate);
|
||||
var endDateD = Funs.GetNewDateTime(endDate);
|
||||
|
|
@ -810,7 +810,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport10Item getSeDinMonthReportNullPage10(string projectId, string month, string startDate, string endDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var startDateD = Funs.GetNewDateTime(startDate);
|
||||
var endDateD = Funs.GetNewDateTime(endDate);
|
||||
|
|
@ -873,7 +873,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport11Item getSeDinMonthReportNullPage11(string projectId, string month, string startDate, string endDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var startDateD = Funs.GetNewDateTime(startDate);
|
||||
var endDateD = Funs.GetNewDateTime(endDate);
|
||||
|
|
@ -946,7 +946,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReportItem getSeDinMonthReport0ById(string projectId, string month)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
Model.SeDinMonthReportItem getInfo = new Model.SeDinMonthReportItem();
|
||||
|
|
@ -989,7 +989,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport1Item getSeDinMonthReport1ById(string projectId, string month)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
Model.SeDinMonthReport1Item getInfo = new Model.SeDinMonthReport1Item();
|
||||
|
|
@ -1027,7 +1027,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport2Item getSeDinMonthReport2ById(string projectId, string month)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
Model.SeDinMonthReport2Item getInfo = new Model.SeDinMonthReport2Item();
|
||||
|
|
@ -1064,7 +1064,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReportItem getSeDinMonthReport3ById(string projectId, string month)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
Model.SeDinMonthReportItem getInfo = new Model.SeDinMonthReportItem();
|
||||
|
|
@ -1090,7 +1090,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SeDinMonthReport3Item> getSeDinMonthReport3Item(string monthReportId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.SeDin_MonthReport3
|
||||
where x.MonthReportId == monthReportId
|
||||
|
|
@ -1122,7 +1122,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SeDinMonthReport4Item> getSeDinMonthReport4ById(string projectId, string month)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
List<Model.SeDinMonthReport4Item> getInfo = new List<Model.SeDinMonthReport4Item>();
|
||||
|
|
@ -1156,7 +1156,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport4OtherItem getSeDinMonthReport4OtherById(string projectId, string month)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
if (monthD.HasValue)
|
||||
|
|
@ -1191,7 +1191,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SeDinMonthReport5Item> getSeDinMonthReport5ById(string projectId, string month)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
List<Model.SeDinMonthReport5Item> getInfo = new List<Model.SeDinMonthReport5Item>();
|
||||
|
|
@ -1234,7 +1234,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport6Item getSeDinMonthReport6ById(string projectId, string month)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
Model.SeDinMonthReport6Item getInfo = new Model.SeDinMonthReport6Item();
|
||||
|
|
@ -1281,7 +1281,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport7Item getSeDinMonthReport7ById(string projectId, string month)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
Model.SeDinMonthReport7Item getInfo = new Model.SeDinMonthReport7Item();
|
||||
|
|
@ -1320,7 +1320,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport8Item getSeDinMonthReport8ById(string projectId, string month)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
Model.SeDinMonthReport8Item getInfo = new Model.SeDinMonthReport8Item();
|
||||
|
|
@ -1355,7 +1355,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SeDinMonthReport8ItemItem> getSeDinMonthReport8Item(string monthReportId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.SeDin_MonthReport8Item
|
||||
where x.MonthReportId == monthReportId
|
||||
|
|
@ -1381,7 +1381,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport9Item getSeDinMonthReport9ById(string projectId, string month)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
Model.SeDinMonthReport9Item getInfo = new Model.SeDinMonthReport9Item();
|
||||
|
|
@ -1421,7 +1421,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SeDinMonthReport9ItemRectification> getSeDinMonthReport9ItemRectification(string monthReportId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.SeDin_MonthReport9Item_Rectification
|
||||
where x.MonthReportId == monthReportId
|
||||
|
|
@ -1453,7 +1453,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SeDinMonthReport9ItemSpecial> getSeDinMonthReport9ItemSpecial(string monthReportId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.SeDin_MonthReport9Item_Special
|
||||
where x.MonthReportId == monthReportId
|
||||
|
|
@ -1476,7 +1476,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.SeDinMonthReport9ItemStoppage> getSeDinMonthReport9ItemStoppage(string monthReportId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getInfo = from x in db.SeDin_MonthReport9Item_Stoppage
|
||||
where x.MonthReportId == monthReportId
|
||||
|
|
@ -1504,7 +1504,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport10Item getSeDinMonthReport10ById(string projectId, string month)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
Model.SeDinMonthReport10Item getInfo = new Model.SeDinMonthReport10Item();
|
||||
|
|
@ -1556,7 +1556,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport11Item getSeDinMonthReport11ById(string projectId, string month)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
Model.SeDinMonthReport11Item getInfo = new Model.SeDinMonthReport11Item();
|
||||
|
|
@ -1590,7 +1590,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReport12Item getSeDinMonthReport12ById(string projectId, string month)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
Model.SeDinMonthReport12Item getInfo = new Model.SeDinMonthReport12Item();
|
||||
|
|
@ -1638,7 +1638,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.SeDinMonthReportItem getSeDinMonthReport13ById(string projectId, string month)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var monthD = Funs.GetNewDateTime(month);
|
||||
Model.SeDinMonthReportItem getInfo = new Model.SeDinMonthReportItem();
|
||||
|
|
@ -1673,7 +1673,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveSeDinMonthReport0(Model.SeDinMonthReportItem newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.SeDin_MonthReport newReport = new Model.SeDin_MonthReport
|
||||
{
|
||||
|
|
@ -1763,7 +1763,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveSeDinMonthReport1(Model.SeDinMonthReport1Item newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.SeDin_MonthReport1 newReport = new Model.SeDin_MonthReport1
|
||||
{
|
||||
|
|
@ -1813,7 +1813,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveSeDinMonthReport2(Model.SeDinMonthReport2Item newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.SeDin_MonthReport2 newReport = new Model.SeDin_MonthReport2
|
||||
{
|
||||
|
|
@ -1861,7 +1861,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveSeDinMonthReport3(Model.SeDinMonthReportItem newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var updateReport = db.SeDin_MonthReport.FirstOrDefault(x => x.MonthReportId == newItem.MonthReportId);
|
||||
if (updateReport != null)
|
||||
|
|
@ -1918,7 +1918,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveSeDinMonthReport4(Model.SeDinMonthReportItem newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var updateReport = db.SeDin_MonthReport.FirstOrDefault(x => x.MonthReportId == newItem.MonthReportId);
|
||||
if (updateReport != null)
|
||||
|
|
@ -1965,7 +1965,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveSeDinMonthReport4Other(Model.SeDinMonthReport4OtherItem newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
////删除
|
||||
var delMonthReport4s = db.SeDin_MonthReport4Other.FirstOrDefault(x => x.MonthReportId == newItem.MonthReportId);
|
||||
|
|
@ -2002,7 +2002,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveSeDinMonthReport5(Model.SeDinMonthReportItem newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
var updateReport = db.SeDin_MonthReport.FirstOrDefault(x => x.MonthReportId == newItem.MonthReportId);
|
||||
|
|
@ -2057,7 +2057,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveSeDinMonthReport6(Model.SeDinMonthReport6Item newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getSeDinMonthReport6 = from x in db.SeDin_MonthReport6 where x.MonthReportId == newItem.MonthReportId select x;
|
||||
if (getSeDinMonthReport6.Count() > 0)
|
||||
|
|
@ -2106,7 +2106,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveSeDinMonthReport7(Model.SeDinMonthReport7Item newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getSeDinMonthReport7 = from x in db.SeDin_MonthReport7 where x.MonthReportId == newItem.MonthReportId select x;
|
||||
if (getSeDinMonthReport7.Count() > 0)
|
||||
|
|
@ -2147,7 +2147,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveSeDinMonthReport8(Model.SeDinMonthReport8Item newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getMonthReport8 = from x in db.SeDin_MonthReport8 where x.MonthReportId == newItem.MonthReportId
|
||||
select x;
|
||||
|
|
@ -2212,7 +2212,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveSeDinMonthReport9(Model.SeDinMonthReport9Item newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getMonthReport9 = from x in db.SeDin_MonthReport9
|
||||
where x.MonthReportId == newItem.MonthReportId
|
||||
|
|
@ -2343,7 +2343,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveSeDinMonthReport10(Model.SeDinMonthReport10Item newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getMonthReport10 = from x in db.SeDin_MonthReport10
|
||||
where x.MonthReportId == newItem.MonthReportId
|
||||
|
|
@ -2397,7 +2397,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveSeDinMonthReport11(Model.SeDinMonthReport11Item newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.SeDin_MonthReport11 newReport = new Model.SeDin_MonthReport11
|
||||
{
|
||||
|
|
@ -2439,7 +2439,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveSeDinMonthReport12(Model.SeDinMonthReport12Item newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.SeDin_MonthReport12 newReport = new Model.SeDin_MonthReport12
|
||||
{
|
||||
|
|
@ -2509,7 +2509,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string SaveSeDinMonthReport13(Model.SeDinMonthReportItem newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var updateReport = db.SeDin_MonthReport.FirstOrDefault(x => x.MonthReportId == newItem.MonthReportId);
|
||||
if (updateReport != null)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.TestPlanItem> getTestPlanList(string states)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Test_TestPlan
|
||||
where (x.States == states || states == null)
|
||||
|
|
@ -54,7 +54,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.TestPlanItem getTestPlanByTestPlanId(string testPlanId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Test_TestPlan
|
||||
where x.TestPlanId == testPlanId
|
||||
|
|
@ -90,7 +90,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.TestPlanTrainingItem> getTestPlanTrainingListByTestPlanId(string testPlanId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var getDataLists = (from x in db.Test_TestPlanTraining
|
||||
join y in db.Training_TestTraining on x.TrainingId equals y.TrainingId
|
||||
where x.TestPlanId == testPlanId
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.TestRecordItem getTestRecordInfo(string testPlanId, string testManId, string userType, string identityCard)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.TestRecordItem newTestRecord = new Model.TestRecordItem();
|
||||
var getTestPlan = db.Test_TestPlan.FirstOrDefault(x => x.TestPlanId == testPlanId);
|
||||
|
|
@ -105,7 +105,7 @@ namespace BLL
|
|||
/// <param name="testRecord">考试计划记录</param>
|
||||
public static Model.TestRecordItem SaveTestRecord(Model.TestRecordItem testRecord)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getTestPlan = db.Test_TestPlan.FirstOrDefault(x => x.TestPlanId == testRecord.TestPlanId);
|
||||
if (getTestPlan != null)
|
||||
|
|
@ -232,7 +232,7 @@ namespace BLL
|
|||
/// <returns>考试人员</returns>
|
||||
public static List<Model.TestRecordItem> getTestRecordListByTestPlanId(string testPlanId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Test_TestRecord
|
||||
where x.TestPlanId == testPlanId
|
||||
|
|
@ -266,7 +266,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.TestRecordItem getTestRecordByTestRecordId(string testRecordId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Test_TestRecord
|
||||
join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
|
||||
|
|
@ -307,7 +307,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string CreateTestRecordItem(string testPlanId, string testRecordId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getTestPlan = db.Test_TestPlan.FirstOrDefault(x => x.TestPlanId == testPlanId);
|
||||
var getTestRecord = db.Test_TestRecord.FirstOrDefault(x => x.TestRecordId == testRecordId);
|
||||
|
|
@ -439,7 +439,7 @@ namespace BLL
|
|||
/// <returns>考试人员</returns>
|
||||
public static List<Model.TestRecordItemItem> geTestRecordItemListByTestRecordId(string testRecordId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Test_TestRecordItem
|
||||
where x.TestRecordId == testRecordId
|
||||
|
|
@ -476,7 +476,7 @@ namespace BLL
|
|||
/// <param name="answerItems"></param>
|
||||
public static void getTestRecordItemAnswerBySelectedItem(Model.Test_TestRecordItem getTItemT, string selectedItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getTItem = db.Test_TestRecordItem.FirstOrDefault(x => x.TestRecordItemId == getTItemT.TestRecordItemId);
|
||||
if (getTItem != null)
|
||||
|
|
@ -532,7 +532,7 @@ namespace BLL
|
|||
public static decimal getSubmitTestRecord(string testRecordId)
|
||||
{
|
||||
decimal getCode = 0;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getTestRecord = db.Test_TestRecord.FirstOrDefault(e => e.TestRecordId == testRecordId);
|
||||
/////试卷
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.TestPlanItem> getTestPlanListByProjectIdStates(string projectId, string states)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_TestPlan
|
||||
where x.ProjectId == projectId && (x.States == states || states == null)
|
||||
|
|
@ -54,7 +54,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.TestPlanItem getTestPlanByTestPlanId(string testPlanId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Training_TestPlan
|
||||
where x.TestPlanId == testPlanId
|
||||
|
|
@ -97,7 +97,7 @@ namespace BLL
|
|||
public static string SaveTestPlan(Model.TestPlanItem getTestPlan)
|
||||
{
|
||||
string alterStr =string.Empty ;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Training_TestPlan newTestPlan = new Model.Training_TestPlan
|
||||
{
|
||||
|
|
@ -303,7 +303,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static void AddTrainingTestPlanTraining(List<Model.TestPlanTrainingItem> TestPlanItems, string testPlanId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
foreach (var item in TestPlanItems)
|
||||
{
|
||||
|
|
@ -336,7 +336,7 @@ namespace BLL
|
|||
public static string SaveTestPlanByTrainingPlanId(string trainingPlanId,string userId)
|
||||
{
|
||||
string testPlanId = string.Empty;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
////培训计划
|
||||
var getTrainingPlan = db.Training_Plan.FirstOrDefault(x => x.PlanId == trainingPlanId); ;
|
||||
|
|
@ -480,7 +480,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.TestPlanTrainingItem> getTestPlanTrainingListByTestPlanId(string testPlanId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_TestPlanTraining
|
||||
join y in db.Training_TestTraining on x.TrainingId equals y.TrainingId
|
||||
|
|
@ -506,7 +506,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static void SubmitTest(Model.Training_TestPlan getTestPlan)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
////所有交卷的人员 交卷 并计算分数
|
||||
var getTrainingTestRecords = from x in db.Training_TestRecord
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace BLL
|
|||
/// <returns>考试人员</returns>
|
||||
public static List<Model.TestRecordItem> getTestRecordListByTestPlanId(string testPlanId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_TestRecord
|
||||
where x.TestPlanId == testPlanId
|
||||
|
|
@ -49,7 +49,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.TestRecordItem getTestRecordByTestRecordId(string testRecordId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Training_TestRecord
|
||||
join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
|
||||
|
|
@ -78,7 +78,7 @@ namespace BLL
|
|||
|
||||
public static string CreateTestRecordItem(Model.Training_CompanyTrainingItem getCompanyTraining, string testRecordId, Model.SitePerson_Person person, Model.Sys_User user)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var trainingIds = getCompanyTraining.TestTrainingIds.Split(',');
|
||||
var testTrainings = db.Training_TestTraining.Where(x => trainingIds.Contains(x.TrainingId));
|
||||
|
|
@ -235,7 +235,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string CreateTestRecordItem(Model.Training_TestPlan getTestPlan, string testRecordId, Model.SitePerson_Person person)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getTestRecord = db.Training_TestRecord.FirstOrDefault(x => x.TestRecordId == testRecordId);
|
||||
if (getTestRecord != null && !getTestRecord.TestStartTime.HasValue)
|
||||
|
|
@ -367,7 +367,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string CreateFixTestRecordItem(Model.Training_TestPlan getTestPlan, string testRecordId, Model.SitePerson_Person person)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getTestRecord = db.Training_TestRecord.FirstOrDefault(x => x.TestRecordId == testRecordId);
|
||||
if (getTestRecord != null && !getTestRecord.TestStartTime.HasValue)
|
||||
|
|
@ -500,7 +500,7 @@ namespace BLL
|
|||
/// <returns>考试记录列表</returns>
|
||||
public static List<Model.TestRecordItem> getTrainingTestRecordListByProjectIdPersonId(string projectId, string personId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_TestRecord
|
||||
join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
|
||||
|
|
@ -536,7 +536,7 @@ namespace BLL
|
|||
/// <returns>考试记录列表</returns>
|
||||
public static List<Model.TestRecordItem> getTrainingTestRecordListByProjectId(string projectId, string unitId, string workPostId, string strPass, string strParam)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_TestRecord
|
||||
join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
|
||||
|
|
@ -599,7 +599,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static string getUnitName(string testManId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string name = string.Empty;
|
||||
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == testManId);
|
||||
|
|
@ -620,7 +620,7 @@ namespace BLL
|
|||
/// <returns>考试人员</returns>
|
||||
public static List<Model.TestRecordItemItem> geTestRecordItemListByTestRecordId(string testRecordId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_TestRecordItem
|
||||
where x.TestRecordId == testRecordId
|
||||
|
|
@ -658,7 +658,7 @@ namespace BLL
|
|||
/// <returns>考试人员</returns>
|
||||
public static Model.TestRecordItemItem geTestRecordItemByTestRecordItemId(string testRecordItemId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Training_TestRecordItem
|
||||
where x.TestRecordItemId == testRecordItemId
|
||||
|
|
@ -696,7 +696,7 @@ namespace BLL
|
|||
/// <param name="answerItems"></param>
|
||||
public static void getTestRecordItemAnswerBySelectedItem(Model.Training_TestRecordItem getTItemT, string selectedItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getTItem = db.Training_TestRecordItem.FirstOrDefault(x => x.TestRecordItemId == getTItemT.TestRecordItemId);
|
||||
if (getTItem != null)
|
||||
|
|
@ -752,7 +752,7 @@ namespace BLL
|
|||
public static decimal getSubmitTestRecord(Model.Training_TestRecord testRecord)
|
||||
{
|
||||
decimal getCode = 0;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getTestRecord = db.Training_TestRecord.FirstOrDefault(e => e.TestRecordId == testRecord.TestRecordId);
|
||||
/////试卷
|
||||
|
|
@ -780,7 +780,7 @@ namespace BLL
|
|||
/// <param name="testPlanId"></param>
|
||||
public static void updateAll(string testPlanId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
//// 获取考试计划
|
||||
var getTestPlan = db.Training_TestPlan.FirstOrDefault(x => x.TestPlanId == testPlanId);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.TrainRecordItem> getTrainRecordListByProjectIdTrainTypeIdTrainStates(string projectId, string trainTypeId, string trainStates)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.EduTrain_TrainRecord
|
||||
where x.ProjectId == projectId && x.TrainTypeId == trainTypeId
|
||||
|
|
@ -50,7 +50,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.TrainRecordItem getTrainRecordByTrainingId(string trainRecordId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.EduTrain_TrainRecord
|
||||
where x.TrainingId == trainRecordId
|
||||
|
|
@ -87,7 +87,7 @@ namespace BLL
|
|||
|
||||
public static void InsertTrainRecord(Model.Training_TestPlan getTestPlan)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
////获取培训计划
|
||||
var getTrainingPlan = db.Training_Plan.FirstOrDefault(e => e.PlanId == getTestPlan.PlanId);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<TrainTestRecordItem> getTrainRecordListByProjectId(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_TrainTestRecord
|
||||
where x.ProjectId == projectId
|
||||
|
|
@ -50,7 +50,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.HSSE.TrainTestRecordItem getTrainRecordByTrainingId(string trainRecordId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Training_TrainTestRecord
|
||||
where x.TrainingTestRecordId == trainRecordId
|
||||
|
|
@ -83,7 +83,7 @@ namespace BLL
|
|||
|
||||
public static void updateTrainRecord(Model.HSSE.TrainTestRecordItem x)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
////获取培训计划
|
||||
Model.Training_TrainTestRecord newTrainRecord = db.Training_TrainTestRecord.FirstOrDefault(u => u.TrainingTestRecordId == x.TrainingTestRecordId);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.TrainingPlanItem> getTrainingPlanListByProjectIdTrainTypeIdTrainStates(string projectId, string trainTypeId, string states)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_Plan
|
||||
where x.ProjectId == projectId && (x.States == states || states == null) && x.TrainTypeId == trainTypeId
|
||||
|
|
@ -56,7 +56,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.TrainingPlanItem getTrainingPlanByTrainingId(string planId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = from x in db.Training_Plan
|
||||
where x.PlanId == planId
|
||||
|
|
@ -98,7 +98,7 @@ namespace BLL
|
|||
/// <returns>培训计划人员</returns>
|
||||
public static List<Model.TrainingPlanItemItem> getTrainingPlanItemListByTrainingPlanId(string trainingPlanId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_PlanItem
|
||||
join y in db.Training_CompanyTraining on x.CompanyTrainingId equals y.CompanyTrainingId
|
||||
|
|
@ -130,7 +130,7 @@ namespace BLL
|
|||
/// <param name="trainingPlanItems">培训教材类型list</param>
|
||||
public static void SaveTrainingPlan(Model.TrainingPlanItem trainingPlan)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Training_Plan newTrainingPlan = new Model.Training_Plan
|
||||
{
|
||||
|
|
@ -280,7 +280,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static void AddTraining_Task(List<Model.TrainingTaskItem> trainingTasks, string planId, string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
foreach (var item in trainingTasks)
|
||||
{
|
||||
|
|
@ -308,7 +308,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static void AddTraining_PlanItem(List<Model.TrainingPlanItemItem> trainingPlanItems, string planId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
foreach (var item in trainingPlanItems)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.TrainingTaskItem> getTrainingTaskListByProjectIdPersonId(string projectId, string personId, string isRetakeCourse)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
personId = PersonService.GetPersonIdByUserId(personId);
|
||||
var getDataLists = (from x in db.Training_Task
|
||||
|
|
@ -51,7 +51,7 @@ namespace BLL
|
|||
|
||||
public static string getTrainingItemCode(string PlanId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var ids = db.Training_PlanItem.Where(xx => xx.PlanId == PlanId).Select(x => x.CompanyTrainingItemId).ToList();
|
||||
var codes = db.Training_CompanyTrainingItem.Where(x => ids.Contains(x.CompanyTrainingItemId)).Select(x => x.CompanyTrainingItemCode);
|
||||
|
|
@ -70,7 +70,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.TrainingTaskItemItem> getTrainingTaskItemListByTaskId(string taskId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
////生成培训任务下培训明细
|
||||
GetDataService.CreateTrainingTaskItemByTaskId(taskId);
|
||||
|
|
@ -112,7 +112,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static List<Model.TrainingRecordItemItem> getTrainingRecordItemListByProjectIdPersonId(string projectId, string personId, string isRetakeCourse)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_TaskItem
|
||||
join t in db.Training_Task on x.TaskId equals t.TaskId
|
||||
|
|
@ -158,7 +158,7 @@ namespace BLL
|
|||
public static string getTrainingTaskByPlanIdPersonIdCondition(string planId, string personId)
|
||||
{
|
||||
string alterString = string.Empty;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var task = db.Training_Task.FirstOrDefault(x => x.PlanId == planId && x.UserId == personId);
|
||||
if (task != null)
|
||||
|
|
@ -237,7 +237,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static void getTrainingTaskByPlanIdPersonId(string planId, string personId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var plan = db.Training_Plan.FirstOrDefault(e => e.PlanId == planId);
|
||||
Model.Training_Task newTask = new Model.Training_Task
|
||||
|
|
@ -269,7 +269,7 @@ namespace BLL
|
|||
/// <returns>培训计划人员</returns>
|
||||
public static List<Model.TrainingTaskItem> getTrainingTaskListByTrainingPlanId(string trainingPlanId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Training_Task
|
||||
where x.PlanId == trainingPlanId
|
||||
|
|
@ -302,7 +302,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static Model.Training_TaskItem updateTaskItemLearnTime(string taskItemId, DateTime startTime, DateTime endTime, string VideoProgress)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var q = from x in db.Training_TaskItem
|
||||
where x.TaskItemId == taskItemId
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class AccidentTypeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取事故类型
|
||||
|
|
@ -26,7 +26,7 @@ namespace BLL
|
|||
/// <param name="accidentType"></param>
|
||||
public static void AddAccidentType(Model.Base_AccidentType accidentType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_AccidentType newAccidentType = new Model.Base_AccidentType
|
||||
{
|
||||
AccidentTypeId = accidentType.AccidentTypeId,
|
||||
|
|
@ -44,7 +44,7 @@ namespace BLL
|
|||
/// <param name="accidentType"></param>
|
||||
public static void UpdateAccidentType(Model.Base_AccidentType accidentType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_AccidentType newAccidentType = db.Base_AccidentType.FirstOrDefault(e => e.AccidentTypeId == accidentType.AccidentTypeId);
|
||||
if (newAccidentType != null)
|
||||
{
|
||||
|
|
@ -61,7 +61,7 @@ namespace BLL
|
|||
/// <param name="accidentTypeId"></param>
|
||||
public static void DeleteAccidentTypeById(string accidentTypeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_AccidentType accidentType = db.Base_AccidentType.FirstOrDefault(e => e.AccidentTypeId == accidentTypeId);
|
||||
if (accidentType != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace BLL
|
|||
|
||||
public static class Base_FactoryService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
{
|
||||
public class CNProfessionalService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取实体集合
|
||||
|
|
@ -27,7 +27,7 @@ namespace BLL
|
|||
/// <param name="?"></param>
|
||||
public static void AddCNProfessional(Model.Base_CNProfessional cNProfessional)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_CNProfessional newCNProfessional = new Model.Base_CNProfessional
|
||||
{
|
||||
CNProfessionalId = cNProfessional.CNProfessionalId,
|
||||
|
|
@ -46,7 +46,7 @@ namespace BLL
|
|||
/// <param name="teamGroup"></param>
|
||||
public static void UpdateCNProfessional(Model.Base_CNProfessional cNProfessional)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_CNProfessional newCNProfessional = db.Base_CNProfessional.FirstOrDefault(e => e.CNProfessionalId == cNProfessional.CNProfessionalId);
|
||||
if (newCNProfessional != null)
|
||||
{
|
||||
|
|
@ -63,7 +63,7 @@ namespace BLL
|
|||
/// <param name="cNProfessionalId"></param>
|
||||
public static void DeleteCNProfessionalById(string cNProfessionalId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_CNProfessional cNProfessional = db.Base_CNProfessional.FirstOrDefault(e => e.CNProfessionalId == cNProfessionalId);
|
||||
{
|
||||
db.Base_CNProfessional.DeleteOnSubmit(cNProfessional);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class CertificateService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取特岗证书
|
||||
|
|
@ -28,7 +28,7 @@ namespace BLL
|
|||
/// <param name="certificate"></param>
|
||||
public static void AddCertificate(Model.Base_Certificate certificate)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_Certificate newCertificate = new Model.Base_Certificate
|
||||
{
|
||||
CertificateId = certificate.CertificateId,
|
||||
|
|
@ -48,7 +48,7 @@ namespace BLL
|
|||
/// <param name="certificate"></param>
|
||||
public static void UpdateCertificate(Model.Base_Certificate certificate)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_Certificate newCertificate = db.Base_Certificate.FirstOrDefault(e => e.CertificateId == certificate.CertificateId);
|
||||
if (newCertificate != null)
|
||||
{
|
||||
|
|
@ -67,7 +67,7 @@ namespace BLL
|
|||
/// <param name="certificateId"></param>
|
||||
public static void DeleteCertificateById(string certificateId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_Certificate certificate = db.Base_Certificate.FirstOrDefault(e => e.CertificateId == certificateId);
|
||||
if (certificate != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class CostTypeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取费用类型
|
||||
|
|
@ -28,7 +28,7 @@ namespace BLL
|
|||
/// <param name="costType"></param>
|
||||
public static void AddCostType(Model.Base_CostType costType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_CostType newCostType = new Model.Base_CostType
|
||||
{
|
||||
CostTypeId = costType.CostTypeId,
|
||||
|
|
@ -46,7 +46,7 @@ namespace BLL
|
|||
/// <param name="costType"></param>
|
||||
public static void UpdateCostType(Model.Base_CostType costType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_CostType newCostType = db.Base_CostType.FirstOrDefault(e => e.CostTypeId == costType.CostTypeId);
|
||||
if (newCostType != null)
|
||||
{
|
||||
|
|
@ -63,7 +63,7 @@ namespace BLL
|
|||
/// <param name="costTypeId"></param>
|
||||
public static void DeleteCostTypeById(string costTypeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_CostType costType = db.Base_CostType.FirstOrDefault(e => e.CostTypeId == costTypeId);
|
||||
if (costType != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
{
|
||||
public class DesignProfessionalService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取实体集合
|
||||
|
|
@ -27,7 +27,7 @@ namespace BLL
|
|||
/// <param name="?"></param>
|
||||
public static void AddDesignProfessional(Model.Base_DesignProfessional designProfessional)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_DesignProfessional newDesignProfessional = new Model.Base_DesignProfessional
|
||||
{
|
||||
DesignProfessionalId = designProfessional.DesignProfessionalId,
|
||||
|
|
@ -46,7 +46,7 @@ namespace BLL
|
|||
/// <param name="teamGroup"></param>
|
||||
public static void UpdateDesignProfessional(Model.Base_DesignProfessional designProfessional)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_DesignProfessional newDesignProfessional = db.Base_DesignProfessional.FirstOrDefault(e => e.DesignProfessionalId == designProfessional.DesignProfessionalId);
|
||||
if (newDesignProfessional != null)
|
||||
{
|
||||
|
|
@ -63,7 +63,7 @@ namespace BLL
|
|||
/// <param name="designProfessionalId"></param>
|
||||
public static void DeleteDesignProfessionalById(string designProfessionalId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_DesignProfessional designProfessional = db.Base_DesignProfessional.FirstOrDefault(e => e.DesignProfessionalId == designProfessionalId);
|
||||
{
|
||||
db.Base_DesignProfessional.DeleteOnSubmit(designProfessional);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace BLL
|
|||
{
|
||||
public static class EmergencyTypeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
|
|
@ -25,7 +25,7 @@ namespace BLL
|
|||
/// <param name="?"></param>
|
||||
public static void AddEmergencyType(Model.Base_EmergencyType emergencyType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_EmergencyType newEmergencyType = new Model.Base_EmergencyType
|
||||
{
|
||||
EmergencyTypeId = emergencyType.EmergencyTypeId,
|
||||
|
|
@ -44,7 +44,7 @@ namespace BLL
|
|||
/// <param name="teamGroup"></param>
|
||||
public static void UpdateEmergencyType(Model.Base_EmergencyType emergencyType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_EmergencyType newEmergencyType = db.Base_EmergencyType.FirstOrDefault(e => e.EmergencyTypeId == emergencyType.EmergencyTypeId);
|
||||
if (newEmergencyType != null)
|
||||
{
|
||||
|
|
@ -61,7 +61,7 @@ namespace BLL
|
|||
/// <param name="emergencyTypeId"></param>
|
||||
public static void DeleteEmergencyTypeById(string emergencyTypeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_EmergencyType emergencyType = db.Base_EmergencyType.FirstOrDefault(e => e.EmergencyTypeId == emergencyTypeId);
|
||||
{
|
||||
db.Base_EmergencyType.DeleteOnSubmit(emergencyType);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace BLL
|
|||
{
|
||||
public class HSSEStandardListTypeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取标准规范类别信息
|
||||
|
|
@ -33,7 +33,7 @@ namespace BLL
|
|||
/// <param name="def"></param>
|
||||
public static void AddHSSEStandardListType(Model.Base_HSSEStandardListType hSSEStandardListType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_HSSEStandardListType newHSSEStandardListType = new Model.Base_HSSEStandardListType
|
||||
{
|
||||
TypeId = hSSEStandardListType.TypeId,
|
||||
|
|
@ -54,7 +54,7 @@ namespace BLL
|
|||
/// <param name="def"></param>
|
||||
public static void UpdateHSSEStandardListType(string typeId, string typeCode, string typeName, string remark)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_HSSEStandardListType hSSEStandardListType = db.Base_HSSEStandardListType.FirstOrDefault(e => e.TypeId == typeId);
|
||||
if (hSSEStandardListType != null)
|
||||
{
|
||||
|
|
@ -71,7 +71,7 @@ namespace BLL
|
|||
/// <param name="typeId"></param>
|
||||
public static void DeleteHSSEStandardListType(string typeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_HSSEStandardListType hSSEStandardListType = db.Base_HSSEStandardListType.FirstOrDefault(e => e.TypeId == typeId);
|
||||
if (hSSEStandardListType != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace BLL
|
|||
/// <param name="TypeCode"></param>
|
||||
public static void AddHazardRegisterTypes(Model.HSSE_Hazard_HazardRegisterTypes types)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_Hazard_HazardRegisterTypes newTitle = new Model.HSSE_Hazard_HazardRegisterTypes();
|
||||
newTitle.RegisterTypesId = types.RegisterTypesId;
|
||||
newTitle.RegisterTypesName = types.RegisterTypesName;
|
||||
|
|
@ -48,7 +48,7 @@ namespace BLL
|
|||
/// <param name="TypeCode"></param>
|
||||
public static void UpdateHazardRegisterTypes(Model.HSSE_Hazard_HazardRegisterTypes types)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_Hazard_HazardRegisterTypes newTitle = db.HSSE_Hazard_HazardRegisterTypes.FirstOrDefault(e => e.RegisterTypesId == types.RegisterTypesId);
|
||||
if (newTitle != null)
|
||||
{
|
||||
|
|
@ -68,7 +68,7 @@ namespace BLL
|
|||
/// <param name="RegisterTypesId"></param>
|
||||
public static void DeleteTitle(string RegisterTypesId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_Hazard_HazardRegisterTypes types = db.HSSE_Hazard_HazardRegisterTypes.FirstOrDefault(e => e.RegisterTypesId == RegisterTypesId);
|
||||
if (types != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class InspectionAreaService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
|
|
@ -84,7 +84,7 @@ namespace BLL
|
|||
/// <param name="inspectionArea"></param>
|
||||
public static void AddInspectionArea(Model.Base_InspectionArea inspectionArea)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_InspectionArea newInspectionArea = new Model.Base_InspectionArea();
|
||||
newInspectionArea.InspectionAreaId = inspectionArea.InspectionAreaId;
|
||||
newInspectionArea.InspectionAreaCode = inspectionArea.InspectionAreaCode;
|
||||
|
|
@ -100,7 +100,7 @@ namespace BLL
|
|||
/// <param name="inspectionArea"></param>
|
||||
public static void UpdateInspectionArea(Model.Base_InspectionArea inspectionArea)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_InspectionArea newInspectionArea = db.Base_InspectionArea.FirstOrDefault(e => e.InspectionAreaId == inspectionArea.InspectionAreaId);
|
||||
if (newInspectionArea != null)
|
||||
{
|
||||
|
|
@ -117,7 +117,7 @@ namespace BLL
|
|||
/// <param name="inspectionAreaId"></param>
|
||||
public static void DeleteInspectionAreaById(string inspectionAreaId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_InspectionArea newInspectionArea = db.Base_InspectionArea.FirstOrDefault(e => e.InspectionAreaId == inspectionAreaId);
|
||||
if (newInspectionArea != null)
|
||||
{
|
||||
|
|
@ -160,7 +160,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static bool IsExitInspectionAreaName(string inspectionAreaName, string inspectionAreaId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = from x in db.Base_InspectionArea where x.InspectionAreaName == inspectionAreaName && x.InspectionAreaId != inspectionAreaId select x;
|
||||
if (q.Count() > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class LawsRegulationsTypeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据id获取法律法规类型信息
|
||||
|
|
@ -28,7 +28,7 @@ namespace BLL
|
|||
/// <param name="lawsRegulationsType"></param>
|
||||
public static void AddLawsRegulationsType(Model.Base_LawsRegulationsType lawsRegulationsType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_LawsRegulationsType newLawsRegulationsType = new Model.Base_LawsRegulationsType
|
||||
{
|
||||
Id = lawsRegulationsType.Id,
|
||||
|
|
@ -46,7 +46,7 @@ namespace BLL
|
|||
/// <param name="lawsRegulationsType"></param>
|
||||
public static void UpdateLawsRegulationsType(Model.Base_LawsRegulationsType lawsRegulationsType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_LawsRegulationsType newLawsRegulationsType = db.Base_LawsRegulationsType.FirstOrDefault(e => e.Id == lawsRegulationsType.Id);
|
||||
if (newLawsRegulationsType != null)
|
||||
{
|
||||
|
|
@ -63,7 +63,7 @@ namespace BLL
|
|||
/// <param name="id"></param>
|
||||
public static void DeleteLawsRegulationsTypeById(string id)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_LawsRegulationsType lawsRegulationsType = db.Base_LawsRegulationsType.FirstOrDefault(e => e.Id == id);
|
||||
if (lawsRegulationsType != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class LicenseTypeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取许可证类型
|
||||
|
|
@ -28,7 +28,7 @@ namespace BLL
|
|||
/// <param name="licenseType"></param>
|
||||
public static void AddLicenseType(Model.Base_LicenseType licenseType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_LicenseType newLicenseType = new Model.Base_LicenseType
|
||||
{
|
||||
LicenseTypeId = licenseType.LicenseTypeId,
|
||||
|
|
@ -47,7 +47,7 @@ namespace BLL
|
|||
/// <param name="licenseType"></param>
|
||||
public static void UpdateLicenseType(Model.Base_LicenseType licenseType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_LicenseType newLicenseType = db.Base_LicenseType.FirstOrDefault(e => e.LicenseTypeId == licenseType.LicenseTypeId);
|
||||
if (newLicenseType != null)
|
||||
{
|
||||
|
|
@ -65,7 +65,7 @@ namespace BLL
|
|||
/// <param name="licenseTypeId"></param>
|
||||
public static void DeleteLicenseTypeById(string licenseTypeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_LicenseType licenseType = db.Base_LicenseType.FirstOrDefault(e => e.LicenseTypeId == licenseTypeId);
|
||||
if (licenseType != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class ManageRuleTypeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取管理规定分类
|
||||
|
|
@ -28,7 +28,7 @@ namespace BLL
|
|||
/// <param name="?"></param>
|
||||
public static void AddManageRuleType(Model.Base_ManageRuleType manageRuleType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_ManageRuleType newManageRuleType = new Model.Base_ManageRuleType
|
||||
{
|
||||
ManageRuleTypeId = manageRuleType.ManageRuleTypeId,
|
||||
|
|
@ -47,7 +47,7 @@ namespace BLL
|
|||
/// <param name="teamGroup"></param>
|
||||
public static void UpdateManageRuleType(Model.Base_ManageRuleType manageRuleType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_ManageRuleType newManageRuleType = db.Base_ManageRuleType.FirstOrDefault(e => e.ManageRuleTypeId == manageRuleType.ManageRuleTypeId);
|
||||
if (newManageRuleType != null)
|
||||
{
|
||||
|
|
@ -64,7 +64,7 @@ namespace BLL
|
|||
/// <param name="manageRuleTypeId"></param>
|
||||
public static void DeleteManageRuleTypeById(string manageRuleTypeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_ManageRuleType manageRuleType = db.Base_ManageRuleType.FirstOrDefault(e => e.ManageRuleTypeId == manageRuleTypeId);
|
||||
{
|
||||
db.Base_ManageRuleType.DeleteOnSubmit(manageRuleType);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace BLL
|
|||
{
|
||||
public class PersonManageService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
|
|
@ -126,7 +126,7 @@ namespace BLL
|
|||
/// <param name="?"></param>
|
||||
public static void AddBSWelder(Model.BS_Welder welder)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.BS_Welder));
|
||||
Model.BS_Welder newWelder = new Model.BS_Welder();
|
||||
newWelder.WED_ID = newKeyID;
|
||||
|
|
@ -160,7 +160,7 @@ namespace BLL
|
|||
/// <param name="teamGroup"></param>
|
||||
public static void UpdateBSWelder(Model.BS_Welder welder)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.BS_Welder newWelder = db.BS_Welder.First(e => e.WED_ID == welder.WED_ID);
|
||||
newWelder.WED_Code = welder.WED_Code;
|
||||
newWelder.WED_Name = welder.WED_Name;
|
||||
|
|
@ -190,7 +190,7 @@ namespace BLL
|
|||
/// <param name="teamGroup"></param>
|
||||
public static void UpdateBSWelderItem(Model.BS_Welder welder)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.BS_Welder newWelder = db.BS_Welder.First(e => e.WED_ID == welder.WED_ID);
|
||||
newWelder.ThicknessMin = welder.ThicknessMin;
|
||||
newWelder.ThicknessMax = welder.ThicknessMax;
|
||||
|
|
@ -223,7 +223,7 @@ namespace BLL
|
|||
/// <param name="EDU_ID"></param>
|
||||
public static void DeleteBSWelder(string WED_ID)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.BS_Welder teamGroup = db.BS_Welder.First(e => e.WED_ID == WED_ID);
|
||||
db.BS_Welder.DeleteOnSubmit(teamGroup);
|
||||
db.SubmitChanges();
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class PictureTypeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取项目图片分类
|
||||
|
|
@ -28,7 +28,7 @@ namespace BLL
|
|||
/// <param name="PictureType"></param>
|
||||
public static void AddPictureType(Model.Base_PictureType PictureType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_PictureType newPictureType = new Model.Base_PictureType
|
||||
{
|
||||
PictureTypeId = PictureType.PictureTypeId,
|
||||
|
|
@ -47,7 +47,7 @@ namespace BLL
|
|||
/// <param name="PictureType"></param>
|
||||
public static void UpdatePictureType(Model.Base_PictureType PictureType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_PictureType newPictureType = db.Base_PictureType.FirstOrDefault(e => e.PictureTypeId == PictureType.PictureTypeId);
|
||||
if (newPictureType != null)
|
||||
{
|
||||
|
|
@ -65,7 +65,7 @@ namespace BLL
|
|||
/// <param name="PictureTypeId"></param>
|
||||
public static void DeletePictureTypeById(string PictureTypeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_PictureType PictureType = db.Base_PictureType.FirstOrDefault(e => e.PictureTypeId == PictureTypeId);
|
||||
if (PictureType != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class PositionService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取主键
|
||||
|
|
@ -28,7 +28,7 @@ namespace BLL
|
|||
/// <param name="position"></param>
|
||||
public static void AddPosition(Model.Base_Position position)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_Position newPosition = new Model.Base_Position
|
||||
{
|
||||
PositionId = position.PositionId,
|
||||
|
|
@ -46,7 +46,7 @@ namespace BLL
|
|||
/// <param name="position"></param>
|
||||
public static void UpdatePosition(Model.Base_Position position)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_Position newPosition = db.Base_Position.FirstOrDefault(e => e.PositionId == position.PositionId);
|
||||
if (newPosition != null)
|
||||
{
|
||||
|
|
@ -63,7 +63,7 @@ namespace BLL
|
|||
/// <param name="positionId"></param>
|
||||
public static void DeletePositionById(string positionId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_Position position = db.Base_Position.FirstOrDefault(e => e.PositionId == positionId);
|
||||
if (position!=null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class PostService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
|
|
@ -77,7 +77,7 @@ namespace BLL
|
|||
/// <param name="post"></param>
|
||||
public static void AddPost(Model.Base_Post post)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_Post newPost = new Model.Base_Post();
|
||||
newPost.PostId = post.PostId;
|
||||
newPost.PostName = post.PostName;
|
||||
|
|
@ -92,7 +92,7 @@ namespace BLL
|
|||
/// <param name="post"></param>
|
||||
public static void UpdatePost(Model.Base_Post post)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_Post newPost = db.Base_Post.FirstOrDefault(e => e.PostId == post.PostId);
|
||||
if (newPost != null)
|
||||
{
|
||||
|
|
@ -108,7 +108,7 @@ namespace BLL
|
|||
/// <param name="postId"></param>
|
||||
public static void DeletePost(string postId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_Post newPost = db.Base_Post.FirstOrDefault(e => e.PostId == postId);
|
||||
if (newPost != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace BLL
|
|||
{
|
||||
public static class PostTitleService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
|
|
@ -35,7 +35,7 @@ namespace BLL
|
|||
/// <param name="?"></param>
|
||||
public static void AddPostTitle(Model.Base_PostTitle postTitle)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_PostTitle newPostTitle = new Model.Base_PostTitle
|
||||
{
|
||||
PostTitleId = postTitle.PostTitleId,
|
||||
|
|
@ -54,7 +54,7 @@ namespace BLL
|
|||
/// <param name="teamGroup"></param>
|
||||
public static void UpdatePostTitle(Model.Base_PostTitle postTitle)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_PostTitle newPostTitle = db.Base_PostTitle.FirstOrDefault(e => e.PostTitleId == postTitle.PostTitleId);
|
||||
if (newPostTitle != null)
|
||||
{
|
||||
|
|
@ -71,7 +71,7 @@ namespace BLL
|
|||
/// <param name="postTitleId"></param>
|
||||
public static void DeletePostTitleById(string postTitleId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_PostTitle postTitle = db.Base_PostTitle.FirstOrDefault(e => e.PostTitleId == postTitleId);
|
||||
{
|
||||
db.Base_PostTitle.DeleteOnSubmit(postTitle);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace BLL
|
|||
{
|
||||
public static class PracticeCertificateService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取执业资格证书
|
||||
|
|
@ -26,7 +26,7 @@ namespace BLL
|
|||
/// <param name="PracticeCertificate"></param>
|
||||
public static void AddPracticeCertificate(Model.Base_PracticeCertificate PracticeCertificate)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_PracticeCertificate newPracticeCertificate = new Model.Base_PracticeCertificate
|
||||
{
|
||||
PracticeCertificateId = PracticeCertificate.PracticeCertificateId,
|
||||
|
|
@ -44,7 +44,7 @@ namespace BLL
|
|||
/// <param name="PracticeCertificate"></param>
|
||||
public static void UpdatePracticeCertificate(Model.Base_PracticeCertificate PracticeCertificate)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_PracticeCertificate newPracticeCertificate = db.Base_PracticeCertificate.FirstOrDefault(e => e.PracticeCertificateId == PracticeCertificate.PracticeCertificateId);
|
||||
if (newPracticeCertificate != null)
|
||||
{
|
||||
|
|
@ -61,7 +61,7 @@ namespace BLL
|
|||
/// <param name="PracticeCertificateId"></param>
|
||||
public static void DeletePracticeCertificateById(string PracticeCertificateId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_PracticeCertificate PracticeCertificate = db.Base_PracticeCertificate.FirstOrDefault(e => e.PracticeCertificateId == PracticeCertificateId);
|
||||
if (PracticeCertificate != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace BLL
|
|||
public static class ProjectTypeService
|
||||
{
|
||||
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
|
|
@ -39,7 +39,7 @@ namespace BLL
|
|||
/// <param name="?"></param>
|
||||
public static void AddProjectType(Model.Base_ProjectType ProjectType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_ProjectType newProjectType = new Model.Base_ProjectType
|
||||
{
|
||||
ProjectTypeId = ProjectType.ProjectTypeId,
|
||||
|
|
@ -58,7 +58,7 @@ namespace BLL
|
|||
/// <param name="teamGroup"></param>
|
||||
public static void UpdateProjectType(Model.Base_ProjectType ProjectType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_ProjectType newProjectType = db.Base_ProjectType.FirstOrDefault(e => e.ProjectTypeId == ProjectType.ProjectTypeId);
|
||||
if (newProjectType != null)
|
||||
{
|
||||
|
|
@ -75,7 +75,7 @@ namespace BLL
|
|||
/// <param name="ProjectTypeId"></param>
|
||||
public static void DeleteProjectTypeById(string ProjectTypeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_ProjectType ProjectType = db.Base_ProjectType.FirstOrDefault(e => e.ProjectTypeId == ProjectTypeId);
|
||||
{
|
||||
db.Base_ProjectType.DeleteOnSubmit(ProjectType);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
{
|
||||
public class QualityQuestionTypeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取实体集合
|
||||
|
|
@ -27,7 +27,7 @@ namespace BLL
|
|||
/// <param name="?"></param>
|
||||
public static void AddQualityQuestionType(Model.Base_QualityQuestionType qualityQuestionType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_QualityQuestionType newQualityQuestionType = new Model.Base_QualityQuestionType
|
||||
{
|
||||
QualityQuestionTypeId = qualityQuestionType.QualityQuestionTypeId,
|
||||
|
|
@ -47,7 +47,7 @@ namespace BLL
|
|||
/// <param name="teamGroup"></param>
|
||||
public static void UpdateQualityQuestionType(Model.Base_QualityQuestionType qualityQuestionType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_QualityQuestionType newQualityQuestionType = db.Base_QualityQuestionType.FirstOrDefault(e => e.QualityQuestionTypeId == qualityQuestionType.QualityQuestionTypeId);
|
||||
if (newQualityQuestionType != null)
|
||||
{
|
||||
|
|
@ -64,7 +64,7 @@ namespace BLL
|
|||
/// <param name="qualityQuestionTypeId"></param>
|
||||
public static void DeleteQualityQuestionTypeById(string qualityQuestionTypeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_QualityQuestionType qualityQuestionType = db.Base_QualityQuestionType.FirstOrDefault(e => e.QualityQuestionTypeId == qualityQuestionTypeId);
|
||||
{
|
||||
db.Base_QualityQuestionType.DeleteOnSubmit(qualityQuestionType);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace BLL
|
|||
public static class QuestionTypeService
|
||||
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
|
|
@ -27,7 +27,7 @@ namespace BLL
|
|||
/// <param name="?"></param>
|
||||
public static void AddQuestionType(Model.Base_QuestionType questionType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_QuestionType newQuestionType = new Model.Base_QuestionType
|
||||
{
|
||||
QuestionTypeID = questionType.QuestionTypeID,
|
||||
|
|
@ -46,7 +46,7 @@ namespace BLL
|
|||
/// <param name="teamGroup"></param>
|
||||
public static void UpdateQuestionType(Model.Base_QuestionType questionType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_QuestionType newQuestionType = db.Base_QuestionType.FirstOrDefault(e => e.QuestionTypeID == questionType.QuestionTypeID);
|
||||
if (newQuestionType != null)
|
||||
{
|
||||
|
|
@ -63,7 +63,7 @@ namespace BLL
|
|||
/// <param name="questionTypeID"></param>
|
||||
public static void DeleteQuestionTypeById(string questionTypeID)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_QuestionType questionType = db.Base_QuestionType.FirstOrDefault(e => e.QuestionTypeID == questionTypeID);
|
||||
{
|
||||
db.Base_QuestionType.DeleteOnSubmit(questionType);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class RiskLevelService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取许可证类型
|
||||
|
|
@ -28,7 +28,7 @@ namespace BLL
|
|||
/// <param name="licenseType"></param>
|
||||
public static void AddRiskLevel(Model.Base_RiskLevel reskLevel)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_RiskLevel newreskLevel = new Model.Base_RiskLevel
|
||||
{
|
||||
RiskLevelId = reskLevel.RiskLevelId,
|
||||
|
|
@ -50,7 +50,7 @@ namespace BLL
|
|||
/// <param name="licenseType"></param>
|
||||
public static void UpdateLicenseType(Model.Base_RiskLevel riskLevel)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_RiskLevel newRiskLevel = db.Base_RiskLevel.FirstOrDefault(e => e.RiskLevelId == riskLevel.RiskLevelId);
|
||||
if (newRiskLevel != null)
|
||||
{
|
||||
|
|
@ -71,7 +71,7 @@ namespace BLL
|
|||
/// <param name="licenseTypeId"></param>
|
||||
public static void DeleteRiskLevelById(string riskLevelId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_RiskLevel riskLevel = db.Base_RiskLevel.FirstOrDefault(e => e.RiskLevelId== riskLevelId);
|
||||
if (riskLevel != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class RulesRegulationsTypeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取规章制度类别
|
||||
|
|
@ -28,7 +28,7 @@ namespace BLL
|
|||
/// <param name="rulesRegulationsType"></param>
|
||||
public static void AddRulesRegulationsType(Model.Base_RulesRegulationsType rulesRegulationsType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_RulesRegulationsType newRulesRegulationsType = new Model.Base_RulesRegulationsType
|
||||
{
|
||||
RulesRegulationsTypeId = rulesRegulationsType.RulesRegulationsTypeId,
|
||||
|
|
@ -46,7 +46,7 @@ namespace BLL
|
|||
/// <param name="rulesRegulationsType"></param>
|
||||
public static void UpdateRulesRegulationsType(Model.Base_RulesRegulationsType rulesRegulationsType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_RulesRegulationsType newRulesRegulationsType = db.Base_RulesRegulationsType.FirstOrDefault(e => e.RulesRegulationsTypeId == rulesRegulationsType.RulesRegulationsTypeId);
|
||||
if (newRulesRegulationsType != null)
|
||||
{
|
||||
|
|
@ -63,7 +63,7 @@ namespace BLL
|
|||
/// <param name="rulesRegulationsTypeId"></param>
|
||||
public static void DeleteRulesRegulationsTypeById(string rulesRegulationsTypeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_RulesRegulationsType rulesRegulationType = db.Base_RulesRegulationsType.FirstOrDefault(e => e.RulesRegulationsTypeId == rulesRegulationsTypeId);
|
||||
if (rulesRegulationType != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class SafetyMeasuresService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全措施
|
||||
|
|
@ -62,7 +62,7 @@ namespace BLL
|
|||
/// <param name="SafetyMeasures"></param>
|
||||
public static void UpdateSafetyMeasures(Model.Base_SafetyMeasures SafetyMeasures)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_SafetyMeasures newSafetyMeasures = db.Base_SafetyMeasures.FirstOrDefault(e => e.SafetyMeasuresId == SafetyMeasures.SafetyMeasuresId);
|
||||
if (newSafetyMeasures != null)
|
||||
{
|
||||
|
|
@ -79,7 +79,7 @@ namespace BLL
|
|||
/// <param name="SafetyMeasuresId"></param>
|
||||
public static void DeleteSafetyMeasuresById(string SafetyMeasuresId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_SafetyMeasures SafetyMeasures = db.Base_SafetyMeasures.FirstOrDefault(e => e.SafetyMeasuresId == SafetyMeasuresId);
|
||||
if (SafetyMeasures != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class SecretLevelService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取密级
|
||||
|
|
@ -26,7 +26,7 @@ namespace BLL
|
|||
/// <param name="secretLevel"></param>
|
||||
public static void AddSecretLevel(Model.Base_SecretLevel secretLevel)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_SecretLevel newSecretLevel = new Model.Base_SecretLevel
|
||||
{
|
||||
SecretLevelId = secretLevel.SecretLevelId,
|
||||
|
|
@ -44,7 +44,7 @@ namespace BLL
|
|||
/// <param name="secretLevel"></param>
|
||||
public static void UpdateSecretLevel(Model.Base_SecretLevel secretLevel)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_SecretLevel newSecretLevel = db.Base_SecretLevel.FirstOrDefault(e => e.SecretLevelId == secretLevel.SecretLevelId);
|
||||
if (newSecretLevel != null)
|
||||
{
|
||||
|
|
@ -61,7 +61,7 @@ namespace BLL
|
|||
/// <param name="secretLevelId"></param>
|
||||
public static void DeleteSecretLevelById(string secretLevelId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_SecretLevel secretLevel = db.Base_SecretLevel.FirstOrDefault(e => e.SecretLevelId == secretLevelId);
|
||||
if (secretLevel != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class SolutionTempleteTypeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取施工方案模板类型
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class SpecialEquipmentService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取机具设备
|
||||
|
|
@ -27,7 +27,7 @@ namespace BLL
|
|||
/// <param name="specialEquipment"></param>
|
||||
public static void AddSpecialEquipment(Model.Base_SpecialEquipment specialEquipment)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_SpecialEquipment newSpecialEquipment = new Model.Base_SpecialEquipment
|
||||
{
|
||||
SpecialEquipmentId = specialEquipment.SpecialEquipmentId,
|
||||
|
|
@ -47,7 +47,7 @@ namespace BLL
|
|||
/// <param name="specialEquipment"></param>
|
||||
public static void UpdateSpecialEquipment(Model.Base_SpecialEquipment specialEquipment)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_SpecialEquipment newSpecialEquipment = db.Base_SpecialEquipment.FirstOrDefault(e => e.SpecialEquipmentId == specialEquipment.SpecialEquipmentId);
|
||||
if (newSpecialEquipment != null)
|
||||
{
|
||||
|
|
@ -66,7 +66,7 @@ namespace BLL
|
|||
/// <param name="specialEquipmentId"></param>
|
||||
public static void DeleteSpecialEquipmentById(string specialEquipmentId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_SpecialEquipment specialEquipment = db.Base_SpecialEquipment.FirstOrDefault(e => e.SpecialEquipmentId == specialEquipmentId);
|
||||
if (specialEquipment != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace BLL
|
|||
{
|
||||
public static class SpecialSchemeTypeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
|
|
@ -25,7 +25,7 @@ namespace BLL
|
|||
/// <param name="?"></param>
|
||||
public static void AddSpecialSchemeType(Model.Base_SpecialSchemeType specialSchemeType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_SpecialSchemeType newSpecialSchemeType = new Model.Base_SpecialSchemeType
|
||||
{
|
||||
SpecialSchemeTypeId = specialSchemeType.SpecialSchemeTypeId,
|
||||
|
|
@ -44,7 +44,7 @@ namespace BLL
|
|||
/// <param name="teamGroup"></param>
|
||||
public static void UpdateSpecialSchemeType(Model.Base_SpecialSchemeType specialSchemeType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_SpecialSchemeType newSpecialSchemeType = db.Base_SpecialSchemeType.FirstOrDefault(e => e.SpecialSchemeTypeId == specialSchemeType.SpecialSchemeTypeId);
|
||||
if (newSpecialSchemeType != null)
|
||||
{
|
||||
|
|
@ -62,7 +62,7 @@ namespace BLL
|
|||
/// <param name="specialSchemeTypeId"></param>
|
||||
public static void DeleteSpecialSchemeTypeById(string specialSchemeTypeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_SpecialSchemeType specialSchemeType = db.Base_SpecialSchemeType.FirstOrDefault(e => e.SpecialSchemeTypeId == specialSchemeTypeId);
|
||||
{
|
||||
db.Base_SpecialSchemeType.DeleteOnSubmit(specialSchemeType);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace BLL
|
|||
{
|
||||
public static class SteelService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
|
|
@ -141,7 +141,7 @@ namespace BLL
|
|||
/// <param name="steel"></param>
|
||||
public static void AddSteel(Model.BS_Steel steel)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.BS_Steel newSteel = new Model.BS_Steel();
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.BS_Steel));
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ namespace BLL
|
|||
/// <param name="steel"></param>
|
||||
public static void UpdateSteel(Model.BS_Steel steel)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
|
||||
Model.BS_Steel newSteel = db.BS_Steel.FirstOrDefault(e => e.STE_ID == steel.STE_ID);
|
||||
newSteel.STE_Code = steel.STE_Code;
|
||||
|
|
@ -182,7 +182,7 @@ namespace BLL
|
|||
/// <param name="ste_Id"></param>
|
||||
public static void DeleteSteel(string ste_Id)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
|
||||
Model.BS_Steel steel = db.BS_Steel.FirstOrDefault(e => e.STE_ID == ste_Id);
|
||||
db.BS_Steel.DeleteOnSubmit(steel);
|
||||
|
|
@ -196,7 +196,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static bool IsExitSteelCode(string ste_name ,string SteelId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
|
||||
var q = from x in db.BS_Steel where x.STE_Name == ste_name && x.STE_ID != SteelId select x;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class TrainLevelService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取主键
|
||||
|
|
@ -28,7 +28,7 @@ namespace BLL
|
|||
/// <param name="trainLevel"></param>
|
||||
public static void AddTrainLevel(Model.Base_TrainLevel trainLevel)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_TrainLevel newTrainLevel = new Model.Base_TrainLevel
|
||||
{
|
||||
TrainLevelId = trainLevel.TrainLevelId,
|
||||
|
|
@ -46,7 +46,7 @@ namespace BLL
|
|||
/// <param name="trainLevel"></param>
|
||||
public static void UpdateTrainLevel(Model.Base_TrainLevel trainLevel)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_TrainLevel newTrainLevel = db.Base_TrainLevel.FirstOrDefault(e => e.TrainLevelId == trainLevel.TrainLevelId);
|
||||
if (newTrainLevel != null)
|
||||
{
|
||||
|
|
@ -63,7 +63,7 @@ namespace BLL
|
|||
/// <param name="trainLevelId"></param>
|
||||
public static void DeleteTrainLevelById(string trainLevelId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_TrainLevel trainLevel = db.Base_TrainLevel.FirstOrDefault(e => e.TrainLevelId == trainLevelId);
|
||||
if (trainLevel != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class TrainTypeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取培训类型
|
||||
|
|
@ -28,7 +28,7 @@ namespace BLL
|
|||
/// <param name="trainType"></param>
|
||||
public static void AddTrainType(Model.Base_TrainType trainType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_TrainType newTrainType = new Model.Base_TrainType
|
||||
{
|
||||
TrainTypeId = trainType.TrainTypeId,
|
||||
|
|
@ -49,7 +49,7 @@ namespace BLL
|
|||
/// <param name="trainType"></param>
|
||||
public static void UpdateTrainType(Model.Base_TrainType trainType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_TrainType newTrainType = db.Base_TrainType.FirstOrDefault(e => e.TrainTypeId == trainType.TrainTypeId);
|
||||
if (newTrainType != null)
|
||||
{
|
||||
|
|
@ -69,7 +69,7 @@ namespace BLL
|
|||
/// <param name="trainTypeId"></param>
|
||||
public static void DeleteTrainTypeById(string trainTypeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_TrainType trainType = db.Base_TrainType.FirstOrDefault(e => e.TrainTypeId == trainTypeId);
|
||||
if (trainType != null)
|
||||
{
|
||||
|
|
@ -147,7 +147,7 @@ namespace BLL
|
|||
/// <param name="getTrainTypeItem"></param>
|
||||
public static void AddTrainTypeItem(Model.Base_TrainTypeItem getTrainTypeItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_TrainTypeItem newTrainTypeItem = new Model.Base_TrainTypeItem
|
||||
{
|
||||
TrainTypeItemId = SQLHelper.GetNewID(),
|
||||
|
|
@ -167,7 +167,7 @@ namespace BLL
|
|||
/// <param name="trainTypeId"></param>
|
||||
public static void DeleteTrainTypeItemById(string trainTypeItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_TrainTypeItem delTrainTypeItem = db.Base_TrainTypeItem.FirstOrDefault(e => e.TrainTypeItemId == trainTypeItemId);
|
||||
if (delTrainTypeItem != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace BLL
|
|||
public static class UnitTypeService
|
||||
{
|
||||
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
|
|
@ -36,7 +36,7 @@ namespace BLL
|
|||
/// <param name="?"></param>
|
||||
public static void AddUnitType(Model.Base_UnitType unitType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_UnitType newUnitType = new Model.Base_UnitType
|
||||
{
|
||||
UnitTypeId = unitType.UnitTypeId,
|
||||
|
|
@ -55,7 +55,7 @@ namespace BLL
|
|||
/// <param name="teamGroup"></param>
|
||||
public static void UpdateUnitType(Model.Base_UnitType unitType)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_UnitType newUnitType = db.Base_UnitType.FirstOrDefault(e => e.UnitTypeId == unitType.UnitTypeId);
|
||||
if (newUnitType != null)
|
||||
{
|
||||
|
|
@ -72,7 +72,7 @@ namespace BLL
|
|||
/// <param name="unitTypeId"></param>
|
||||
public static void DeleteUnitTypeById(string unitTypeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_UnitType unitType = db.Base_UnitType.FirstOrDefault(e => e.UnitTypeId == unitTypeId);
|
||||
{
|
||||
db.Base_UnitType.DeleteOnSubmit(unitType);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class VehicleService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取机具设备
|
||||
|
|
@ -27,7 +27,7 @@ namespace BLL
|
|||
/// <param name="specialEquipment"></param>
|
||||
public static void AddVehicle(Model.HSSE_Vehicle vehicle)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_Vehicle newVehicle = new Model.HSSE_Vehicle
|
||||
{
|
||||
VehicleId = vehicle.VehicleId,
|
||||
|
|
@ -53,7 +53,7 @@ namespace BLL
|
|||
/// <param name="specialEquipment"></param>
|
||||
public static void UpdateVehicle(Model.HSSE_Vehicle vehicle)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_Vehicle newVehicle = db.HSSE_Vehicle.FirstOrDefault(e => e.VehicleId == vehicle.VehicleId);
|
||||
if (newVehicle != null)
|
||||
{
|
||||
|
|
@ -78,7 +78,7 @@ namespace BLL
|
|||
/// <param name="specialEquipmentId"></param>
|
||||
public static void DeleteVehicleById(string vehicleId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_Vehicle vehicle = db.HSSE_Vehicle.FirstOrDefault(e => e.VehicleId == vehicleId);
|
||||
if (vehicle != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace BLL
|
|||
{
|
||||
public static class WorkPostService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
|
|
@ -29,7 +29,7 @@ namespace BLL
|
|||
/// <param name="?"></param>
|
||||
public static void AddWorkPost(Model.Base_WorkPost workPost)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_WorkPost newWorkPost = new Model.Base_WorkPost
|
||||
{
|
||||
WorkPostId = workPost.WorkPostId,
|
||||
|
|
@ -52,7 +52,7 @@ namespace BLL
|
|||
/// <param name="teamGroup"></param>
|
||||
public static void UpdateWorkPost(Model.Base_WorkPost workPost)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_WorkPost newWorkPost = db.Base_WorkPost.FirstOrDefault(e => e.WorkPostId == workPost.WorkPostId);
|
||||
if (newWorkPost != null)
|
||||
{
|
||||
|
|
@ -73,7 +73,7 @@ namespace BLL
|
|||
/// <param name="workPostId"></param>
|
||||
public static void DeleteWorkPostById(string workPostId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Base_WorkPost workPost = db.Base_WorkPost.FirstOrDefault(e => e.WorkPostId == workPostId);
|
||||
{
|
||||
db.Base_WorkPost.DeleteOnSubmit(workPost);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
/// </summary>
|
||||
public static class WorkStageService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取工作阶段
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
{
|
||||
public class CheckControlApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 获取质量巡检模板列表
|
||||
/// </summary>
|
||||
|
|
@ -40,7 +40,7 @@ namespace BLL
|
|||
/// <param name="CheckControlCode">质量巡检编号</param>
|
||||
public static void DeleteCheckControlApprovesByCheckControlCode(string CheckControlCode)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Check_CheckControlApprove where x.CheckControlCode == CheckControlCode select x).ToList();
|
||||
db.Check_CheckControlApprove.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
|
@ -53,7 +53,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IQueryable getList(string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var res = from x in db.Check_CheckControlApprove
|
||||
join ca in db.Check_CheckControl on x.CheckControlCode equals ca.CheckControlCode
|
||||
|
|
@ -84,7 +84,7 @@ namespace BLL
|
|||
}
|
||||
public static void See(string CheckControlCode, string userId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var res = db.Check_CheckControlApprove.FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
if (res != null)
|
||||
|
|
@ -109,7 +109,7 @@ namespace BLL
|
|||
/// <param name="managerRuleApprove">质量巡检审批实体</param>
|
||||
public static void UpdateCheckControlApprove(Model.Check_CheckControlApprove approve)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckControlApprove newApprove = db.Check_CheckControlApprove.First(e => e.CheckControlApproveId == approve.CheckControlApproveId && e.ApproveDate == null);
|
||||
newApprove.CheckControlCode = approve.CheckControlCode;
|
||||
newApprove.ApproveMan = approve.ApproveMan;
|
||||
|
|
@ -126,7 +126,7 @@ namespace BLL
|
|||
/// <param name="managerRuleApprove">质量巡检审批实体</param>
|
||||
public static void AddCheckControlApprove(Model.Check_CheckControlApprove approve)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.Check_CheckControlApprove));
|
||||
Model.Check_CheckControlApprove newApprove = new Model.Check_CheckControlApprove();
|
||||
newApprove.CheckControlApproveId = newKeyID;
|
||||
|
|
@ -142,7 +142,7 @@ namespace BLL
|
|||
}
|
||||
public static string AddCheckControlApproveForApi(Model.Check_CheckControlApprove approve)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.Check_CheckControlApprove));
|
||||
Model.Check_CheckControlApprove newApprove = new Model.Check_CheckControlApprove();
|
||||
|
|
@ -215,7 +215,7 @@ namespace BLL
|
|||
}
|
||||
public static List<Model.Check_CheckControlApprove> GetListDataByCodeForApi(string code)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var q = from x in db.Check_CheckControlApprove
|
||||
where x.CheckControlCode == code && x.ApproveDate != null && x.ApproveType != "S"
|
||||
|
|
@ -250,7 +250,7 @@ namespace BLL
|
|||
}
|
||||
public static Model.Check_CheckControlApprove getCurrApproveForApi(string checkControlCode)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_CheckControlApprove newApprove = db.Check_CheckControlApprove.FirstOrDefault(e => e.CheckControlCode == checkControlCode && e.ApproveType != "S" && e.ApproveDate == null);
|
||||
if (newApprove != null)
|
||||
|
|
@ -266,7 +266,7 @@ namespace BLL
|
|||
}
|
||||
public static void UpdateCheckControlApproveForApi(Model.Check_CheckControlApprove approve)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_CheckControlApprove newApprove = db.Check_CheckControlApprove.FirstOrDefault(e => e.CheckControlApproveId == approve.CheckControlApproveId && e.ApproveDate == null);
|
||||
if (newApprove != null)
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@ namespace BLL
|
|||
{
|
||||
public class CheckControlService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 根据质量检查与控制Id删除一个质量检查与控制信息
|
||||
/// </summary>
|
||||
/// <param name="CheckControlId"></param>
|
||||
public static void DeleteCheckControl(string CheckControlId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckControl CheckControl = db.Check_CheckControl.First(e => e.CheckControlCode == CheckControlId);
|
||||
var projectId = CheckControl.ProjectId;
|
||||
db.Check_CheckControl.DeleteOnSubmit(CheckControl);
|
||||
|
|
@ -63,7 +63,7 @@ namespace BLL
|
|||
/// <param name="CheckControl"></param>
|
||||
public static void AddCheckControl(Model.Check_CheckControl CheckControl)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckControl newCheckControl = new Model.Check_CheckControl();
|
||||
newCheckControl.CheckControlCode = CheckControl.CheckControlCode;
|
||||
newCheckControl.ProposeUnitId = CheckControl.ProposeUnitId;
|
||||
|
|
@ -93,7 +93,7 @@ namespace BLL
|
|||
}
|
||||
public static void AddCheckControlForApi(Model.Check_CheckControl CheckControl)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_CheckControl newCheckControl = new Model.Check_CheckControl();
|
||||
newCheckControl.CheckControlCode = CheckControl.CheckControlCode;
|
||||
|
|
@ -133,7 +133,7 @@ namespace BLL
|
|||
}
|
||||
public static Model.Check_CheckControl GetCheckControlForApi(string CheckControlCode)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_CheckControl x = db.Check_CheckControl.FirstOrDefault(e => e.CheckControlCode == CheckControlCode);
|
||||
x.AttachUrl = AttachFileService.getFileUrl(x.CheckControlCode);
|
||||
|
|
@ -219,7 +219,7 @@ namespace BLL
|
|||
/// <param name="CheckControl"></param>
|
||||
public static void UpdateCheckControl(Model.Check_CheckControl CheckControl)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckControl newCheckControl = db.Check_CheckControl.First(e => e.CheckControlCode == CheckControl.CheckControlCode);
|
||||
newCheckControl.DocCode = CheckControl.DocCode;
|
||||
newCheckControl.ProposeUnitId = CheckControl.ProposeUnitId;
|
||||
|
|
@ -246,7 +246,7 @@ namespace BLL
|
|||
}
|
||||
public static List<Model.Check_CheckControl> GetListDataForApi(string state, string name, string projectId, int index, int page)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
IQueryable<Model.Check_CheckControl> q = db.Check_CheckControl;
|
||||
List<string> ids = new List<string>();
|
||||
|
|
@ -360,7 +360,7 @@ namespace BLL
|
|||
// 查询数量
|
||||
public static string GetListCountStr(string projectId, string searchWord, string unitId, string unitWork, string problemType, string professional, string dateA, string dateZ)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
IQueryable<Model.Check_CheckControl> q = db.Check_CheckControl;
|
||||
|
||||
|
|
@ -422,7 +422,7 @@ namespace BLL
|
|||
}
|
||||
public static List<Model.Check_CheckControl> GetListDataForApi(string state, string unitId, string unitWork, string problemType, string professional, string dateA, string dateZ, string projectId, int index, int page)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
IQueryable<Model.Check_CheckControl> q = db.Check_CheckControl;
|
||||
|
||||
|
|
@ -605,7 +605,7 @@ namespace BLL
|
|||
public static void UpdateCheckControlForApi(Model.Check_CheckControl CheckControl)
|
||||
{
|
||||
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_CheckControl newCheckControl = db.Check_CheckControl.First(e => e.CheckControlCode == CheckControl.CheckControlCode);
|
||||
if (!string.IsNullOrEmpty(CheckControl.DocCode))
|
||||
|
|
@ -651,7 +651,7 @@ namespace BLL
|
|||
}
|
||||
public static int GetListCount(string projectId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
IQueryable<Model.Check_CheckControl> q = db.Check_CheckControl;
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
|
|
@ -668,7 +668,7 @@ namespace BLL
|
|||
// 项目质量验收一次合格率
|
||||
public static string GetOneCount(string projectId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.View_Check_SoptCheckDetail> TotalCheckDetailOKLists = SpotCheckDetailService.GetTotalOKSpotCheckDetailListByTime1(projectId, DateTime.Now);
|
||||
List<Model.View_Check_SoptCheckDetail> TotalCheckDetailLists = SpotCheckDetailService.GetTotalAllSpotCheckDetailListByTime(projectId, DateTime.Now);
|
||||
|
|
@ -688,7 +688,7 @@ namespace BLL
|
|||
// 项目施工资料同步率
|
||||
public static string GetConstruction(string projectId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.View_Check_SoptCheckDetail> totalCheckDetailDataOKLists = SpotCheckDetailService.GetAllDataOkSpotCheckDetailListByTime(projectId, DateTime.Now);
|
||||
List<Model.View_Check_SoptCheckDetail> totalCheckDetailOKLists = SpotCheckDetailService.GetTotalOKSpotCheckDetailListByTime1(projectId, DateTime.Now);
|
||||
|
|
@ -709,7 +709,7 @@ namespace BLL
|
|||
// 项目质量验收一次合格率
|
||||
public static string GetQuSuccess(string projectId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.View_Check_JointCheckDetail> totalCheckLists = JointCheckDetailService.GetTotalJointCheckDetailListByTime(projectId, DateTime.Now);
|
||||
int a = totalCheckLists.Where(x => x.OK == 1).Count();
|
||||
|
|
@ -728,7 +728,7 @@ namespace BLL
|
|||
// 项目质量控制点统计完成率
|
||||
public static string GetConSuccess(string projectId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Num num = new Model.Num();
|
||||
var controlItemAndCycles = (from x in db.WBS_ControlItemAndCycle
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace BLL
|
|||
{
|
||||
public class CheckEquipmentApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取设计变更模板列表
|
||||
|
|
@ -80,7 +80,7 @@ namespace BLL
|
|||
/// <param name="managerRuleApprove">设计变更审批实体</param>
|
||||
public static string AddCheckEquipmentApprove(Model.Check_CheckEquipmentApprove approve)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.Check_CheckEquipmentApprove));
|
||||
Model.Check_CheckEquipmentApprove newApprove = new Model.Check_CheckEquipmentApprove();
|
||||
|
|
@ -104,7 +104,7 @@ namespace BLL
|
|||
/// <param name="managerRuleApprove">检实验设备批实体</param>
|
||||
public static string AddCheckEquipmentApproveApi(Model.Check_CheckEquipmentApprove approve)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.Check_CheckEquipmentApprove));
|
||||
Model.Check_CheckEquipmentApprove newApprove = new Model.Check_CheckEquipmentApprove();
|
||||
|
|
@ -128,7 +128,7 @@ namespace BLL
|
|||
/// <param name="managerRuleApprove">检实验设备实体</param>
|
||||
public static void UpdateCheckEquipmentApproveApi(Model.Check_CheckEquipmentApprove approve)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_CheckEquipmentApprove newApprove = db.Check_CheckEquipmentApprove.FirstOrDefault(e => e.CheckEquipmentApproveId == approve.CheckEquipmentApproveId && e.ApproveDate == null);
|
||||
//newApprove.CheckEquipmentId = approve.CheckEquipmentId;
|
||||
|
|
@ -150,7 +150,7 @@ namespace BLL
|
|||
/// <param name="managerRuleApprove">设计变更审批实体</param>
|
||||
public static void UpdateCheckEquipmentApprove(Model.Check_CheckEquipmentApprove approve)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_CheckEquipmentApprove newApprove = db.Check_CheckEquipmentApprove.First(e => e.CheckEquipmentApproveId == approve.CheckEquipmentApproveId && e.ApproveDate == null);
|
||||
newApprove.CheckEquipmentId = approve.CheckEquipmentId;
|
||||
|
|
@ -170,7 +170,7 @@ namespace BLL
|
|||
/// <param name="CheckEquipmentCode">设计变更编号</param>
|
||||
public static void DeleteCheckEquipmentApprovesByCheckEquipmentId(string CheckEquipmentId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var q = (from x in db.Check_CheckEquipmentApprove where x.CheckEquipmentId == CheckEquipmentId select x).ToList();
|
||||
db.Check_CheckEquipmentApprove.DeleteAllOnSubmit(q);
|
||||
|
|
@ -223,7 +223,7 @@ namespace BLL
|
|||
// 当前办理状态
|
||||
public static Model.Check_CheckEquipmentApprove CurrentApproveType(string code)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_CheckEquipmentApprove newApprove = db.Check_CheckEquipmentApprove.FirstOrDefault(e => e.CheckEquipmentId == code
|
||||
&& e.ApproveType != "S" && e.ApproveDate == null);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace BLL
|
|||
{
|
||||
public class CheckEquipmentService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
|
|
@ -106,7 +106,7 @@ namespace BLL
|
|||
}
|
||||
public static Model.Check_CheckEquipment GetCheckEquipmentByCheckEquipmentIdForApi(string CheckEquipmentId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_CheckEquipment res = db.Check_CheckEquipment.FirstOrDefault(a => a.CheckEquipmentId == CheckEquipmentId);
|
||||
//res.AttachUrl = AttachFileService.getFileUrl(res.CheckEquipmentId);
|
||||
|
|
@ -147,7 +147,7 @@ namespace BLL
|
|||
/// <param name="CheckEquipment">检试验设备及测量器具信息实体</param>
|
||||
public static void AddCheckEquipment(Model.Check_CheckEquipment CheckEquipment)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_CheckEquipment newCheckEquipment = new Model.Check_CheckEquipment();
|
||||
newCheckEquipment.CheckEquipmentId = CheckEquipment.CheckEquipmentId;
|
||||
|
|
@ -181,7 +181,7 @@ namespace BLL
|
|||
/// <param name="CheckEquipment">检试验设备及测量器具信息实体</param>
|
||||
public static void UpdateCheckEquipment(Model.Check_CheckEquipment CheckEquipment)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_CheckEquipment newCheckEquipment = db.Check_CheckEquipment.First(e => e.CheckEquipmentId == CheckEquipment.CheckEquipmentId);
|
||||
if (!string.IsNullOrEmpty(CheckEquipment.UserUnitId))
|
||||
|
|
@ -220,7 +220,7 @@ namespace BLL
|
|||
/// <param name="CheckEquipmentCode">检试验设备及测量器具信息Id</param>
|
||||
public static void DeleteCheckEquipment(string CheckEquipmentId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_CheckEquipment CheckEquipment = db.Check_CheckEquipment.First(e => e.CheckEquipmentId == CheckEquipmentId);
|
||||
|
||||
|
|
@ -280,7 +280,7 @@ namespace BLL
|
|||
{
|
||||
List<Model.Check_CheckEquipment> listRes = new List<Model.Check_CheckEquipment>();
|
||||
List<String> unitids = new List<string>();
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@ namespace BLL
|
|||
{
|
||||
public class CheckFineService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 根据质量检查与控制Id删除一个质量检查与控制信息
|
||||
/// </summary>
|
||||
/// <param name="CheckControlId"></param>
|
||||
public static void DeleteCheckList(string id)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckFine CheckFine = db.Check_CheckFine.First(e => e.CheckFineId == id);
|
||||
db.Check_CheckFine.DeleteOnSubmit(CheckFine);
|
||||
db.SubmitChanges();
|
||||
|
|
@ -31,7 +31,7 @@ namespace BLL
|
|||
/// <param name="CheckControl"></param>
|
||||
public static void AddCheckFine(Model.Check_CheckFine CheckControl)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckFine newCheckControl = new Model.Check_CheckFine();
|
||||
newCheckControl.CheckFineId = CheckControl.CheckFineId;
|
||||
newCheckControl.CheckControlCode = CheckControl.CheckControlCode;
|
||||
|
|
@ -69,7 +69,7 @@ namespace BLL
|
|||
/// <param name="CheckControl"></param>
|
||||
public static void UpdateCheckControl(Model.Check_CheckFine CheckControl)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckFine newCheckControl = db.Check_CheckFine.First(e => e.CheckFineId == CheckControl.CheckFineId);
|
||||
newCheckControl.DocCode = CheckControl.DocCode;
|
||||
newCheckControl.ProposeUnitId = CheckControl.ProposeUnitId;
|
||||
|
|
@ -95,7 +95,7 @@ namespace BLL
|
|||
|
||||
public static int GetListCount(string projectId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
IQueryable<Model.Check_CheckFine> q = db.Check_CheckFine;
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace BLL
|
|||
{
|
||||
public class CheckMonthService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
|
|
@ -81,7 +81,7 @@ namespace BLL
|
|||
/// <param name="CheckMonth"></param>
|
||||
public static void AddCheckMonth(Model.Check_CheckMonth CheckMonth)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckMonth newCheckMonth = new Model.Check_CheckMonth();
|
||||
newCheckMonth.CheckMonthId = CheckMonth.CheckMonthId;
|
||||
newCheckMonth.ProjectId = CheckMonth.ProjectId;
|
||||
|
|
@ -112,7 +112,7 @@ namespace BLL
|
|||
/// <param name="CheckMonth"></param>
|
||||
public static void UpdateCheckMonth(Model.Check_CheckMonth CheckMonth)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckMonth newCheckMonth = db.Check_CheckMonth.First(e => e.CheckMonthId == CheckMonth.CheckMonthId);
|
||||
newCheckMonth.ThisRectifyNum = CheckMonth.ThisRectifyNum;
|
||||
newCheckMonth.ThisOKRectifyNum = CheckMonth.ThisOKRectifyNum;
|
||||
|
|
@ -137,7 +137,7 @@ namespace BLL
|
|||
/// <param name="CheckMonthId"></param>
|
||||
public static void DeleteCheckMonth(string CheckMonthId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckMonth CheckMonth = db.Check_CheckMonth.First(e => e.CheckMonthId == CheckMonthId);
|
||||
db.Check_CheckMonth.DeleteOnSubmit(CheckMonth);
|
||||
db.SubmitChanges();
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace BLL
|
|||
{
|
||||
public class DesignApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取设计变更模板列表
|
||||
|
|
@ -85,7 +85,7 @@ namespace BLL
|
|||
/// <param name="managerRuleApprove">设计变更审批实体</param>
|
||||
public static void AddDesignApprove(Model.Check_DesignApprove approve)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.Check_DesignApprove));
|
||||
Model.Check_DesignApprove newApprove = new Model.Check_DesignApprove();
|
||||
newApprove.DesignApproveId = newKeyID;
|
||||
|
|
@ -101,7 +101,7 @@ namespace BLL
|
|||
}
|
||||
public static string AddDesignApproveForApi(Model.Check_DesignApprove approve)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.Check_DesignApprove));
|
||||
Model.Check_DesignApprove newApprove = new Model.Check_DesignApprove();
|
||||
|
|
@ -124,7 +124,7 @@ namespace BLL
|
|||
/// <param name="managerRuleApprove">设计变更审批实体</param>
|
||||
public static void UpdateDesignApprove(Model.Check_DesignApprove approve)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_DesignApprove newApprove = db.Check_DesignApprove.First(e => e.DesignApproveId == approve.DesignApproveId && e.ApproveDate == null);
|
||||
newApprove.DesignId = approve.DesignId;
|
||||
newApprove.ApproveMan = approve.ApproveMan;
|
||||
|
|
@ -141,7 +141,7 @@ namespace BLL
|
|||
/// <param name="managerRuleApprove">设计变更审批实体</param>
|
||||
public static void UpdateDesignApproveForApi(Model.Check_DesignApprove approve)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_DesignApprove newApprove = db.Check_DesignApprove.FirstOrDefault(e => e.DesignApproveId == approve.DesignApproveId);
|
||||
if (newApprove != null)
|
||||
|
|
@ -169,7 +169,7 @@ namespace BLL
|
|||
/// <param name="DesignCode">设计变更编号</param>
|
||||
public static void DeleteDesignApprovesByDesignId(string DesignId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Check_DesignApprove where x.DesignId == DesignId select x).ToList();
|
||||
db.Check_DesignApprove.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
|
@ -187,7 +187,7 @@ namespace BLL
|
|||
}
|
||||
public static List<Model.Check_DesignApprove> getListDataByIdForApi(string DesignId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var q = from x in db.Check_DesignApprove
|
||||
where x.DesignId == DesignId && x.ApproveDate != null && x.ApproveType != "S"
|
||||
|
|
@ -221,7 +221,7 @@ namespace BLL
|
|||
}
|
||||
public static Model.Check_DesignApprove getCurrApproveForApi(string id)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_DesignApprove newApprove = db.Check_DesignApprove.FirstOrDefault(e => e.DesignId == id && e.ApproveType != "S" && e.ApproveDate == null);
|
||||
if (newApprove != null)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace BLL
|
|||
{
|
||||
public class DesignService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
|
|
@ -63,7 +63,7 @@ namespace BLL
|
|||
}
|
||||
public static Model.Check_Design GetDesignByDesignIdForApi(string DesignId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
Model.Check_Design res = db.Check_Design.FirstOrDefault(x => x.DesignId == DesignId);
|
||||
|
|
@ -83,7 +83,7 @@ namespace BLL
|
|||
/// <param name="Design">设计变更信息实体</param>
|
||||
public static void AddDesign(Model.Check_Design Design)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_Design newDesign = new Model.Check_Design();
|
||||
newDesign.DesignId = Design.DesignId;
|
||||
newDesign.ProjectId = Design.ProjectId;
|
||||
|
|
@ -113,7 +113,7 @@ namespace BLL
|
|||
}
|
||||
public static void AddDesignForApi(Model.Check_Design Design)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_Design newDesign = new Model.Check_Design();
|
||||
newDesign.DesignId = Design.DesignId;
|
||||
|
|
@ -149,7 +149,7 @@ namespace BLL
|
|||
/// <param name="Design">设计变更信息实体</param>
|
||||
public static void UpdateDesign(Model.Check_Design Design)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_Design newDesign = db.Check_Design.First(e => e.DesignId == Design.DesignId);
|
||||
newDesign.DesignCode = Design.DesignCode;
|
||||
newDesign.MainItemId = Design.MainItemId;
|
||||
|
|
@ -179,7 +179,7 @@ namespace BLL
|
|||
/// <param name="DesignCode">设计变更信息Id</param>
|
||||
public static void DeleteDesign(string DesignId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_Design Design = db.Check_Design.First(e => e.DesignId == DesignId);
|
||||
|
||||
db.Check_Design.DeleteOnSubmit(Design);
|
||||
|
|
@ -235,7 +235,7 @@ namespace BLL
|
|||
/// <param name="endTime">结束时间</param>
|
||||
public static IEnumerable GetDesignListByTime(string projectId, DateTime startTime, DateTime endTime)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return from x in db.Check_Design
|
||||
where x.ProjectId == projectId && x.DesignDate >= startTime && x.DesignDate < endTime
|
||||
select new
|
||||
|
|
@ -329,7 +329,7 @@ namespace BLL
|
|||
}
|
||||
public static List<Model.Check_Design> getListDataForApi(string projectId, string unitName, int startRowIndex, int maximumRows)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
IQueryable<Model.Check_Design> q = db.Check_Design;
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
|
|
@ -462,7 +462,7 @@ namespace BLL
|
|||
|
||||
public static List<Model.Check_Design> getListDataForApi(string carryUnitIds, string state, string mainItemId, string cNProfessionalCode, string designType, string designDateA, string designDateZ, string projectId, int startRowIndex, int maximumRows)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
IQueryable<Model.Check_Design> q = db.Check_Design;
|
||||
if (!string.IsNullOrEmpty(projectId) && "undefined" != projectId)
|
||||
|
|
@ -611,7 +611,7 @@ namespace BLL
|
|||
|
||||
public static void UpdateDesignForApi(Model.Check_Design Design)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Check_Design newDesign = db.Check_Design.FirstOrDefault(e => e.DesignId == Design.DesignId);
|
||||
if (newDesign != null)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue