/// <summary> /// 根据主键删除特种设备机具入场报批 /// </summary> /// <param name="equipmentInId"></param> public static void DeleteEquipmentInById(string equipmentInId) { Model.SUBHSSEDB db = Funs.DB; Model.InApproveManager_EquipmentIn equipmentIn = db.InApproveManager_EquipmentIn.FirstOrDefault(e => e.EquipmentInId == equipmentInId); if (equipmentIn != null) { CodeRecordsService.DeleteCodeRecordsByDataId(equipmentInId); //删除编号 CommonService.DeleteAttachFileById(equipmentInId); //删除附件 BLL.CommonService.DeleteFlowOperateByID(equipmentInId); ////删除审核流程表 db.InApproveManager_EquipmentIn.DeleteOnSubmit(equipmentIn); db.SubmitChanges(); } }
/// <summary> /// 根据主键删除安全措施费使用计划 /// </summary> /// <param name="measuresPlanId"></param> public static void DeleteMeasuresPlanById(string measuresPlanId) { Model.SUBHSSEDB db = Funs.DB; Model.CostGoods_MeasuresPlan measuresPlan = db.CostGoods_MeasuresPlan.FirstOrDefault(e => e.MeasuresPlanId == measuresPlanId); if (measuresPlan != null) { CodeRecordsService.DeleteCodeRecordsByDataId(measuresPlanId); CommonService.DeleteAttachFileById(measuresPlanId); ////删除审核流程表 BLL.CommonService.DeleteFlowOperateByID(measuresPlanId); db.CostGoods_MeasuresPlan.DeleteOnSubmit(measuresPlan); db.SubmitChanges(); } }
/// <summary> /// 根据主键删除费用管理 /// </summary> /// <param name="HSSECostManageId"></param> public static void DeleteHSSECostManageById(string HSSECostManageId) { Model.SUBHSSEDB db = Funs.DB; Model.CostGoods_HSSECostManage HSSECostManage = db.CostGoods_HSSECostManage.FirstOrDefault(e => e.HSSECostManageId == HSSECostManageId); if (HSSECostManage != null) { CodeRecordsService.DeleteCodeRecordsByDataId(HSSECostManageId); //删除编号 ProjectDataFlowSetService.DeleteFlowSetByDataId(HSSECostManageId); //删除流程 CommonService.DeleteFlowOperateByID(HSSECostManageId); //删除审核流程 CommonService.DeleteAttachFileById(HSSECostManageId); //删除附件 db.CostGoods_HSSECostManage.DeleteOnSubmit(HSSECostManage); db.SubmitChanges(); } }
/// <summary> /// 根据主键删除物资出库管理 /// </summary> /// <param name="goodsOutId"></param> public static void DeleteGoodsOutById(string goodsOutId) { Model.SUBHSSEDB db = Funs.DB; Model.CostGoods_GoodsOut goodsOut = db.CostGoods_GoodsOut.FirstOrDefault(e => e.GoodsOutId == goodsOutId); if (goodsOut != null) { CodeRecordsService.DeleteCodeRecordsByDataId(goodsOutId); //删除编号 ProjectDataFlowSetService.DeleteFlowSetByDataId(goodsOutId); //删除流程 ////删除审核流程表 BLL.CommonService.DeleteFlowOperateByID(goodsOutId); db.CostGoods_GoodsOut.DeleteOnSubmit(goodsOut); db.SubmitChanges(); } }
/// <summary> /// 保存Solution_ConstructSolution /// </summary> /// <param name="newItem">施工方案</param> /// <returns></returns> public static void SaveConstructSolution(Model.ConstructSolutionItem newItem) { Model.SUBHSSEDB db = Funs.DB; Model.Solution_ConstructSolution newConstructSolution = new Model.Solution_ConstructSolution { ConstructSolutionId = newItem.ConstructSolutionId, ProjectId = newItem.ProjectId, ConstructSolutionCode = newItem.ConstructSolutionCode, ConstructSolutionName = newItem.ConstructSolutionName, VersionNo = newItem.VersionNo, UnitId = newItem.UnitId, InvestigateType = newItem.InvestigateType, SolutinType = newItem.SolutinTypeId, FileContents = System.Web.HttpUtility.HtmlEncode(newItem.FileContents), CompileMan = newItem.CompileManId, CompileManName = UserService.GetUserNameByUserId(newItem.CompileManId), States = Const.State_2, }; if (newItem.States != "1") { newConstructSolution.States = Const.State_0; } var updateConstructSolution = Funs.DB.Solution_ConstructSolution.FirstOrDefault(x => x.ConstructSolutionId == newItem.ConstructSolutionId); if (updateConstructSolution == null) { newConstructSolution.CompileDate = DateTime.Now; newConstructSolution.ConstructSolutionId = SQLHelper.GetNewID(); newConstructSolution.ConstructSolutionCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectConstructSolutionMenuId, newConstructSolution.ProjectId, newConstructSolution.UnitId); ConstructSolutionService.AddConstructSolution(newConstructSolution); } else { ConstructSolutionService.UpdateConstructSolution(newConstructSolution); } if (newConstructSolution.States == "1") { CommonService.btnSaveData(newConstructSolution.ProjectId, Const.ProjectConstructSolutionMenuId, newConstructSolution.ConstructSolutionId, newConstructSolution.CompileMan, true, newConstructSolution.CompileManName, "../Solution/ConstructSolutionView.aspx?ConstructSolutionId={0}"); } if (!string.IsNullOrEmpty(newItem.AttachUrl)) { ////保存附件 UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(newItem.AttachUrl, 10, null), newItem.AttachUrl, Const.ProjectConstructSolutionMenuId, newConstructSolution.ConstructSolutionId); } else { CommonService.DeleteAttachFileById(newConstructSolution.ConstructSolutionId); } }
/// <summary> /// 根据主键删除违章曝光台 /// </summary> /// <param name="exposureId"></param> public static void DeleteExposureById(string exposureId) { Model.SUBHSSEDB db = Funs.DB; Model.InformationProject_Exposure exposure = db.InformationProject_Exposure.FirstOrDefault(e => e.ExposureId == exposureId); if (exposure != null) { CommonService.DeleteAttachFileById(exposureId); //删除附件 CodeRecordsService.DeleteCodeRecordsByDataId(exposureId); //删除编号 ProjectDataFlowSetService.DeleteFlowSetByDataId(exposureId); //删除流程 ////删除审核流程表 BLL.CommonService.DeleteFlowOperateByID(exposureId); db.InformationProject_Exposure.DeleteOnSubmit(exposure); db.SubmitChanges(); } }
/// <summary> /// 添加个人绩效评价 /// </summary> /// <param name="personPerfomance"></param> public static void AddPersonPerfomance(Model.Perfomance_PersonPerfomance personPerfomance) { Model.SUBHSSEDB db = Funs.DB; Model.Perfomance_PersonPerfomance newPersonPerfomance = new Model.Perfomance_PersonPerfomance { PersonPerfomanceId = personPerfomance.PersonPerfomanceId, ProjectId = personPerfomance.ProjectId, PersonPerfomanceCode = personPerfomance.PersonPerfomanceCode, UnitId = personPerfomance.UnitId, TeamGroupId = personPerfomance.TeamGroupId, PersonId = personPerfomance.PersonId, SubContractNum = personPerfomance.SubContractNum, EvaluationDate = personPerfomance.EvaluationDate, EvaluationDef = personPerfomance.EvaluationDef, RewardOrPunish = personPerfomance.RewardOrPunish, RPMoney = personPerfomance.RPMoney, AssessmentGroup = personPerfomance.AssessmentGroup, Behavior_1 = personPerfomance.Behavior_1, Behavior_2 = personPerfomance.Behavior_2, Behavior_3 = personPerfomance.Behavior_3, Behavior_4 = personPerfomance.Behavior_4, Behavior_5 = personPerfomance.Behavior_5, Behavior_6 = personPerfomance.Behavior_6, Behavior_7 = personPerfomance.Behavior_7, Behavior_8 = personPerfomance.Behavior_8, Behavior_9 = personPerfomance.Behavior_9, Behavior_10 = personPerfomance.Behavior_10, Score_1 = personPerfomance.Score_1, Score_2 = personPerfomance.Score_2, Score_3 = personPerfomance.Score_3, Score_4 = personPerfomance.Score_4, Score_5 = personPerfomance.Score_5, Score_6 = personPerfomance.Score_6, Score_7 = personPerfomance.Score_7, Score_8 = personPerfomance.Score_8, Score_9 = personPerfomance.Score_9, Score_10 = personPerfomance.Score_10, TotalJudging = personPerfomance.TotalJudging, TotalScore = personPerfomance.TotalScore, States = personPerfomance.States, CompileMan = personPerfomance.CompileMan, CompileDate = personPerfomance.CompileDate, AttachUrl = personPerfomance.AttachUrl }; db.Perfomance_PersonPerfomance.InsertOnSubmit(newPersonPerfomance); db.SubmitChanges(); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.PersonPerfomanceMenuId, personPerfomance.ProjectId, null, personPerfomance.PersonPerfomanceId, personPerfomance.CompileDate); }
/// <summary> /// 根据主键删除断路(占道)作业票 /// </summary> /// <param name="openCircuitId"></param> public static void DeleteOpenCircuitById(string openCircuitId) { Model.SUBHSSEDB db = Funs.DB; Model.License_OpenCircuit openCircuit = db.License_OpenCircuit.FirstOrDefault(e => e.OpenCircuitId == openCircuitId); if (openCircuit != null) { ///删除编码表记录 CodeRecordsService.DeleteCodeRecordsByDataId(openCircuitId); ///删除-安全措施 DeleteLicenseItemByDataId(openCircuitId); ///删除作业票审核信息 DeleteFlowOperateByDataId(openCircuitId); db.License_OpenCircuit.DeleteOnSubmit(openCircuit); db.SubmitChanges(); } }
/// <summary> /// 根据主键删除知识竞赛计划 /// </summary> /// <param name="TestPlanId"></param> public static void DeleteTestPlanById(string TestPlanId) { Model.SUBHSSEDB db = Funs.DB; Model.Test_TestPlan TestPlan = db.Test_TestPlan.FirstOrDefault(e => e.TestPlanId == TestPlanId); if (TestPlan != null) { ///删除编码表记录 CodeRecordsService.DeleteCodeRecordsByDataId(TestPlan.TestPlanId); ////删除附件表 CommonService.DeleteAttachFileById(TestPlan.TestPlanId); ///删除题目类型 ServerTestPlanTrainingService.DeleteTestPlanTrainingByTestPlanId(TestPlan.TestPlanId); db.Test_TestPlan.DeleteOnSubmit(TestPlan); db.SubmitChanges(); } }
/// <summary> /// 根据主键删除吊装作业票 /// </summary> /// <param name="liftingWorkId"></param> public static void DeleteLiftingWorkById(string liftingWorkId) { Model.SUBHSSEDB db = Funs.DB; Model.License_LiftingWork liftingWork = db.License_LiftingWork.FirstOrDefault(e => e.LiftingWorkId == liftingWorkId); if (liftingWork != null) { ///删除编码表记录 CodeRecordsService.DeleteCodeRecordsByDataId(liftingWorkId); ///删除-安全措施 DeleteLicenseItemByDataId(liftingWorkId); ///删除作业票审核信息 DeleteFlowOperateByDataId(liftingWorkId); db.License_LiftingWork.DeleteOnSubmit(liftingWork); db.SubmitChanges(); } }
/// <summary> /// 保存QualityAudit_EquipmentQuality /// </summary> /// <param name="newItem">机具设备资质</param> /// <returns></returns> public static void SaveEquipmentQuality(Model.EquipmentQualityItem newItem) { Model.SUBHSSEDB db = Funs.DB; Model.QualityAudit_EquipmentQuality newEquipmentQuality = new Model.QualityAudit_EquipmentQuality { EquipmentQualityId = newItem.EquipmentQualityId, ProjectId = newItem.ProjectId, EquipmentQualityCode = newItem.EquipmentQualityCode, UnitId = newItem.UnitId, SpecialEquipmentId = newItem.SpecialEquipmentId, EquipmentQualityName = newItem.EquipmentQualityName, SizeModel = newItem.SizeModel, FactoryCode = newItem.FactoryCode, CertificateCode = newItem.CertificateCode, CheckDate = Funs.GetNewDateTime(newItem.CheckDate), LimitDate = Funs.GetNewDateTimeOrNow(newItem.LimitDate), InDate = Funs.GetNewDateTime(newItem.InDate), OutDate = Funs.GetNewDateTime(newItem.OutDate), ApprovalPerson = newItem.ApprovalPerson, CarNum = newItem.CarNum, Remark = newItem.Remark, CompileMan = newItem.CompileManId, }; var updateEquipmentQuality = Funs.DB.QualityAudit_EquipmentQuality.FirstOrDefault(x => x.EquipmentQualityId == newItem.EquipmentQualityId); if (updateEquipmentQuality == null) { newEquipmentQuality.CompileDate = DateTime.Now; newEquipmentQuality.EquipmentQualityId = SQLHelper.GetNewID(); newEquipmentQuality.EquipmentQualityCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.EquipmentQualityMenuId, newEquipmentQuality.ProjectId, newEquipmentQuality.UnitId); EquipmentQualityService.AddEquipmentQuality(newEquipmentQuality); } else { EquipmentQualityService.UpdateEquipmentQuality(newEquipmentQuality); } if (!string.IsNullOrEmpty(newItem.AttachUrl)) { ////保存附件 UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(newItem.AttachUrl, 10, null), newItem.AttachUrl, Const.EquipmentQualityMenuId, newEquipmentQuality.EquipmentQualityId); } else { CommonService.DeleteAttachFileById(newEquipmentQuality.EquipmentQualityId); } }
/// <summary> /// 删除 /// </summary> /// <param name="ContactListId"></param> public static void DeleteContactListById(string ContactListId) { Model.SUBHSSEDB db = Funs.DB; Model.Check_ContactList ContactList = db.Check_ContactList.FirstOrDefault(e => e.ContactListId == ContactListId); if (ContactList != null) { if (!string.IsNullOrEmpty(ContactList.AttachUrl)) { BLL.UploadAttachmentService.DeleteFile(Funs.RootPath, ContactList.AttachUrl);//删除附件 } CodeRecordsService.DeleteCodeRecordsByDataId(ContactListId); CommonService.DeleteAttachFileById(ContactListId); db.Check_ContactList.DeleteOnSubmit(ContactList); db.SubmitChanges(); } }
/// <summary> /// 添加安全措施费使用计划 /// </summary> /// <param name="measuresPlan"></param> public static void AddMeasuresPlan(Model.CostGoods_MeasuresPlan measuresPlan) { Model.SUBHSSEDB db = Funs.DB; Model.CostGoods_MeasuresPlan newMeasuresPlan = new Model.CostGoods_MeasuresPlan { MeasuresPlanId = measuresPlan.MeasuresPlanId, ProjectId = measuresPlan.ProjectId, MeasuresPlanCode = measuresPlan.MeasuresPlanCode, UnitId = measuresPlan.UnitId, FileContents = measuresPlan.FileContents, CompileMan = measuresPlan.CompileMan, CompileDate = measuresPlan.CompileDate }; db.CostGoods_MeasuresPlan.InsertOnSubmit(newMeasuresPlan); db.SubmitChanges(); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectMeasuresPlanMenuId, measuresPlan.ProjectId, measuresPlan.UnitId, measuresPlan.MeasuresPlanId, measuresPlan.CompileDate); }
/// <summary> /// 根据主键删除动土作业票 /// </summary> /// <param name="breakGroundId"></param> public static void DeleteBreakGroundById(string breakGroundId) { Model.SUBHSSEDB db = Funs.DB; Model.License_BreakGround breakGround = db.License_BreakGround.FirstOrDefault(e => e.BreakGroundId == breakGroundId); if (breakGround != null) { ///删除编码表记录 CodeRecordsService.DeleteCodeRecordsByDataId(breakGroundId); ////删除附件 CommonService.DeleteAttachFileById(breakGroundId); ///删除-安全措施 DeleteLicenseItemByDataId(breakGroundId); ///删除作业票审核信息 DeleteFlowOperateByDataId(breakGroundId); db.License_BreakGround.DeleteOnSubmit(breakGround); db.SubmitChanges(); } }
/// <summary> /// 添加获奖证书或奖杯 /// </summary> /// <param name="hSECertificate"></param> public static void AddHSECertificate(Model.Check_HSECertificate hSECertificate) { Model.SUBHSSEDB db = Funs.DB; Model.Check_HSECertificate newHSECertificate = new Model.Check_HSECertificate { HSECertificateId = hSECertificate.HSECertificateId, ProjectId = hSECertificate.ProjectId, HSECertificateCode = hSECertificate.HSECertificateCode, HSECertificateName = hSECertificate.HSECertificateName, AttachUrl = hSECertificate.AttachUrl, CompileMan = hSECertificate.CompileMan, CompileDate = hSECertificate.CompileDate, States = hSECertificate.States }; db.Check_HSECertificate.InsertOnSubmit(newHSECertificate); db.SubmitChanges(); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectHSECertificateMenuId, hSECertificate.ProjectId, null, hSECertificate.HSECertificateId, hSECertificate.CompileDate); }
/// <summary> /// 添加项目协议记录 /// </summary> /// <param name="projectRecord"></param> public static void AddProjectRecord(Model.QualityAudit_ProjectRecord projectRecord) { Model.SUBHSSEDB db = Funs.DB; Model.QualityAudit_ProjectRecord newProjectRecord = new Model.QualityAudit_ProjectRecord { ProjectRecordId = projectRecord.ProjectRecordId, UnitId = projectRecord.UnitId, ProjectId = projectRecord.ProjectId, ProjectRecordCode = projectRecord.ProjectRecordCode, ProjectRecordName = projectRecord.ProjectRecordName, Remark = projectRecord.Remark, CompileMan = projectRecord.CompileMan, CompileDate = projectRecord.CompileDate }; db.QualityAudit_ProjectRecord.InsertOnSubmit(newProjectRecord); db.SubmitChanges(); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectRecordMenuId, projectRecord.ProjectId, null, projectRecord.ProjectRecordId, projectRecord.CompileDate); }
/// <summary> /// 根据主键删除射线作业票 /// </summary> /// <param name="radialWorkId"></param> public static void DeleteRadialWorkById(string radialWorkId) { Model.SUBHSSEDB db = Funs.DB; Model.License_RadialWork radialWork = db.License_RadialWork.FirstOrDefault(e => e.RadialWorkId == radialWorkId); if (radialWork != null) { ///删除编码表记录 CodeRecordsService.DeleteCodeRecordsByDataId(radialWorkId); ///删除附件 CommonService.DeleteAttachFileById(radialWorkId); ///删除-安全措施 DeleteLicenseItemByDataId(radialWorkId); ///删除作业票审核信息 DeleteFlowOperateByDataId(radialWorkId); db.License_RadialWork.DeleteOnSubmit(radialWork); db.SubmitChanges(); } }
/// <summary> /// 增加标准规范辨识信息 /// </summary> /// <param name="lawRegulationIdentify">标准规范辨识实体</param> public static void AddConstructionStandardIdentify(Model.InformationProject_ConstructionStandardIdentify constructionStandardIdentify) { Model.SUBHSSEDB db = Funs.DB; Model.InformationProject_ConstructionStandardIdentify newConstructionStandardIdentify = new Model.InformationProject_ConstructionStandardIdentify { ConstructionStandardIdentifyId = constructionStandardIdentify.ConstructionStandardIdentifyId, ConstructionStandardIdentifyCode = constructionStandardIdentify.ConstructionStandardIdentifyCode, VersionNumber = constructionStandardIdentify.VersionNumber, ProjectId = constructionStandardIdentify.ProjectId, IdentifyPerson = constructionStandardIdentify.IdentifyPerson, IdentifyDate = constructionStandardIdentify.IdentifyDate, State = constructionStandardIdentify.State, Remark = constructionStandardIdentify.Remark, UpdateDate = constructionStandardIdentify.UpdateDate }; db.InformationProject_ConstructionStandardIdentify.InsertOnSubmit(newConstructionStandardIdentify); db.SubmitChanges(); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ConstructionStandardIdentifyMenuId, constructionStandardIdentify.ProjectId, null, constructionStandardIdentify.ConstructionStandardIdentifyId, constructionStandardIdentify.IdentifyDate); }
/// <summary> /// 根据人员Id删除一个人员信息 /// </summary> /// <param name="personId">人员Id</param> public static void DeletePerson(string personId) { Model.SUBHSSEDB db = Funs.DB; Model.SitePerson_Person person = db.SitePerson_Person.FirstOrDefault(e => e.PersonId == personId); if (person != null) { ///删除编码表记录 BLL.CodeRecordsService.DeleteCodeRecordsByDataId(personId); //删除管理人员资质 Model.QualityAudit_ManagePersonQuality managePersonQuality = db.QualityAudit_ManagePersonQuality.FirstOrDefault(e => e.PersonId == personId); if (managePersonQuality != null) { CodeRecordsService.DeleteCodeRecordsByDataId(managePersonQuality.ManagePersonQualityId); CommonService.DeleteAttachFileById(managePersonQuality.ManagePersonQualityId); db.QualityAudit_ManagePersonQuality.DeleteOnSubmit(managePersonQuality); db.SubmitChanges(); } //删除特岗人员资质 var personQuality = PersonQualityService.GetPersonQualityByPersonId(personId); if (personQuality != null) { CodeRecordsService.DeleteCodeRecordsByDataId(personQuality.PersonQualityId); //删除编号 CommonService.DeleteAttachFileById(personQuality.PersonQualityId); //删除附件 db.QualityAudit_PersonQuality.DeleteOnSubmit(personQuality); db.SubmitChanges(); } //删除安全人员资质 Model.QualityAudit_SafePersonQuality safePersonQuality = db.QualityAudit_SafePersonQuality.FirstOrDefault(e => e.PersonId == personId); if (safePersonQuality != null) { CodeRecordsService.DeleteCodeRecordsByDataId(safePersonQuality.SafePersonQualityId); CommonService.DeleteAttachFileById(safePersonQuality.SafePersonQualityId); db.QualityAudit_SafePersonQuality.DeleteOnSubmit(safePersonQuality); db.SubmitChanges(); } ///删除人员出入场记录 BLL.PersonInOutService.DeletePersonInOutByPersonId(person.PersonId); db.SitePerson_Person.DeleteOnSubmit(person); db.SubmitChanges(); } }
/// <summary> /// 添加物资入库管理 /// </summary> /// <param name="goodsIn"></param> public static void AddGoodsIn(Model.CostGoods_GoodsIn goodsIn) { Model.SUBHSSEDB db = Funs.DB; Model.CostGoods_GoodsIn newGoodsIn = new Model.CostGoods_GoodsIn { GoodsInId = goodsIn.GoodsInId, ProjectId = goodsIn.ProjectId, GoodsInCode = goodsIn.GoodsInCode, GoodsDefId = goodsIn.GoodsDefId, GoodsNum = goodsIn.GoodsNum, InPerson = goodsIn.InPerson, InDate = goodsIn.InDate, States = goodsIn.States, CompileMan = goodsIn.CompileMan, CompileDate = goodsIn.CompileDate }; db.CostGoods_GoodsIn.InsertOnSubmit(newGoodsIn); db.SubmitChanges(); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.GoodsIn2MenuId, goodsIn.ProjectId, null, goodsIn.GoodsInId, goodsIn.CompileDate); }
/// <summary> /// 添加物资出库管理 /// </summary> /// <param name="goodsOut"></param> public static void AddGoodsOut(Model.CostGoods_GoodsOut goodsOut) { Model.SUBHSSEDB db = Funs.DB; Model.CostGoods_GoodsOut newGoodsOut = new Model.CostGoods_GoodsOut { GoodsOutId = goodsOut.GoodsOutId, ProjectId = goodsOut.ProjectId, GoodsOutCode = goodsOut.GoodsOutCode, GoodsDefId = goodsOut.GoodsDefId, GoodsNum = goodsOut.GoodsNum, OutPerson = goodsOut.OutPerson, OutDate = goodsOut.OutDate, States = goodsOut.States, CompileMan = goodsOut.CompileMan, CompileDate = goodsOut.CompileDate }; db.CostGoods_GoodsOut.InsertOnSubmit(newGoodsOut); db.SubmitChanges(); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.GoodsOut2MenuId, goodsOut.ProjectId, null, goodsOut.GoodsOutId, goodsOut.CompileDate); }
/// <summary> /// 添加一般机具设备资质 /// </summary> /// <param name="generalEquipmentQuality"></param> public static void AddGeneralEquipmentQuality(Model.QualityAudit_GeneralEquipmentQuality generalEquipmentQuality) { Model.SUBHSSEDB db = Funs.DB; Model.QualityAudit_GeneralEquipmentQuality newGeneralEquipmentQuality = new Model.QualityAudit_GeneralEquipmentQuality { GeneralEquipmentQualityId = generalEquipmentQuality.GeneralEquipmentQualityId, ProjectId = generalEquipmentQuality.ProjectId, GeneralEquipmentQualityCode = generalEquipmentQuality.GeneralEquipmentQualityCode, UnitId = generalEquipmentQuality.UnitId, SpecialEquipmentId = generalEquipmentQuality.SpecialEquipmentId, EquipmentCount = generalEquipmentQuality.EquipmentCount, IsQualified = generalEquipmentQuality.IsQualified, Remark = generalEquipmentQuality.Remark, CompileMan = generalEquipmentQuality.CompileMan, CompileDate = generalEquipmentQuality.CompileDate, InDate = generalEquipmentQuality.InDate }; db.QualityAudit_GeneralEquipmentQuality.InsertOnSubmit(newGeneralEquipmentQuality); db.SubmitChanges(); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.GeneralEquipmentQualityMenuId, generalEquipmentQuality.ProjectId, null, generalEquipmentQuality.GeneralEquipmentQualityId, generalEquipmentQuality.CompileDate); }
/// <summary> /// 根据主键删除分包商资质 /// </summary> /// <param name="subUnitQualityId"></param> public static void DeleteSubUnitQualityById(string subUnitQualityId) { Model.SUBHSSEDB db = Funs.DB; Model.QualityAudit_SubUnitQuality subUnitQuality = db.QualityAudit_SubUnitQuality.FirstOrDefault(e => e.SubUnitQualityId == subUnitQualityId); if (subUnitQuality != null) { if (!string.IsNullOrEmpty(subUnitQuality.BL_ScanUrl)) { UploadFileService.DeleteFile(Funs.RootPath, subUnitQuality.BL_ScanUrl); } if (!string.IsNullOrEmpty(subUnitQuality.O_ScanUrl)) { UploadFileService.DeleteFile(Funs.RootPath, subUnitQuality.O_ScanUrl); } if (!string.IsNullOrEmpty(subUnitQuality.C_ScanUrl)) { UploadFileService.DeleteFile(Funs.RootPath, subUnitQuality.C_ScanUrl); } if (!string.IsNullOrEmpty(subUnitQuality.QL_ScanUrl)) { UploadFileService.DeleteFile(Funs.RootPath, subUnitQuality.QL_ScanUrl); } if (!string.IsNullOrEmpty(subUnitQuality.H_ScanUrl)) { UploadFileService.DeleteFile(Funs.RootPath, subUnitQuality.H_ScanUrl); } if (!string.IsNullOrEmpty(subUnitQuality.H_ScanUrl2)) { UploadFileService.DeleteFile(Funs.RootPath, subUnitQuality.H_ScanUrl2); } if (!string.IsNullOrEmpty(subUnitQuality.SL_ScanUrl)) { UploadFileService.DeleteFile(Funs.RootPath, subUnitQuality.SL_ScanUrl); } CodeRecordsService.DeleteCodeRecordsByDataId(subUnitQualityId); db.QualityAudit_SubUnitQuality.DeleteOnSubmit(subUnitQuality); db.SubmitChanges(); } }
/// <summary> /// 添加事故调查报告 /// </summary> /// <param name="accidentReport"></param> public static void AddAccidentReport(Model.Accident_AccidentReport accidentReport) { Model.SUBHSSEDB db = Funs.DB; Model.Accident_AccidentReport newAccidentReport = new Model.Accident_AccidentReport { AccidentReportId = accidentReport.AccidentReportId, ProjectId = accidentReport.ProjectId, AccidentReportCode = accidentReport.AccidentReportCode, UnitId = accidentReport.UnitId, AccidentReportType = accidentReport.AccidentReportType, FileContent = accidentReport.FileContent, CompileMan = accidentReport.CompileMan, CompileDate = accidentReport.CompileDate, States = accidentReport.States, AccidentReportName = accidentReport.AccidentReportName, AccidentTypeId = accidentReport.AccidentTypeId, Abstract = accidentReport.Abstract, AccidentDate = accidentReport.AccidentDate, WorkAreaId = accidentReport.WorkAreaId, PeopleNum = accidentReport.PeopleNum, WorkingHoursLoss = accidentReport.WorkingHoursLoss, EconomicLoss = accidentReport.EconomicLoss, EconomicOtherLoss = accidentReport.EconomicOtherLoss, ReportMan = accidentReport.ReportMan, ReporterUnit = accidentReport.ReporterUnit, ReportDate = accidentReport.ReportDate, ProcessDescription = accidentReport.ProcessDescription, EmergencyMeasures = accidentReport.EmergencyMeasures, WorkArea = accidentReport.WorkArea, IsNotConfirm = accidentReport.IsNotConfirm, NotConfirmWorkingHoursLoss = accidentReport.NotConfirmWorkingHoursLoss, NotConfirmEconomicLoss = accidentReport.NotConfirmEconomicLoss, NotConfirmEconomicOtherLoss = accidentReport.NotConfirmEconomicOtherLoss, NotConfirmed = accidentReport.NotConfirmed }; db.Accident_AccidentReport.InsertOnSubmit(newAccidentReport); db.SubmitChanges(); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectAccidentReportMenuId, accidentReport.ProjectId, null, accidentReport.AccidentReportId, accidentReport.CompileDate); }
/// <summary> /// 添加一般设备机具入场报批 /// </summary> /// <param name="GeneralGeneralEquipmentIn"></param> public static void AddGeneralEquipmentIn(Model.InApproveManager_GeneralEquipmentIn generalEquipmentIn) { Model.SUBHSSEDB db = Funs.DB; Model.InApproveManager_GeneralEquipmentIn newGeneralEquipmentIn = new Model.InApproveManager_GeneralEquipmentIn { GeneralEquipmentInId = generalEquipmentIn.GeneralEquipmentInId, ProjectId = generalEquipmentIn.ProjectId, GeneralEquipmentInCode = generalEquipmentIn.GeneralEquipmentInCode, UnitId = generalEquipmentIn.UnitId, CarNumber = generalEquipmentIn.CarNumber, SubProjectName = generalEquipmentIn.SubProjectName, ContentDef = generalEquipmentIn.ContentDef, OtherDef = generalEquipmentIn.OtherDef, State = generalEquipmentIn.State, CompileMan = generalEquipmentIn.CompileMan, CompileDate = generalEquipmentIn.CompileDate }; db.InApproveManager_GeneralEquipmentIn.InsertOnSubmit(newGeneralEquipmentIn); db.SubmitChanges(); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.GeneralEquipmentInMenuId, generalEquipmentIn.ProjectId, null, generalEquipmentIn.GeneralEquipmentInId, generalEquipmentIn.CompileDate); }
/// <summary> /// 根据主键删除安全费用投入登记 /// </summary> /// <param name="costSmallDetailId"></param> public static void DeleteCostSmallDetailById(string costSmallDetailId) { Model.SUBHSSEDB db = Funs.DB; Model.CostGoods_CostSmallDetail costSmallDetail = db.CostGoods_CostSmallDetail.FirstOrDefault(e => e.CostSmallDetailId == costSmallDetailId); if (costSmallDetail != null) { CodeRecordsService.DeleteCodeRecordsByDataId(costSmallDetailId); //删除编号 CommonService.DeleteAttachFileById(costSmallDetailId); //删除附件 ///删除工程师日志收集记录 var flowOperate = from x in db.Sys_FlowOperate where x.DataId == costSmallDetail.CostSmallDetailId select x; if (flowOperate.Count() > 0) { foreach (var item in flowOperate) { BLL.HSSELogService.CollectHSSELog(costSmallDetail.ProjectId, item.OperaterId, item.OperaterTime, "33", "审核" + BLL.UnitService.GetUnitNameByUnitId(costSmallDetail.UnitId) + "的费用申请", Const.BtnDelete, 1); } ////删除流程表 BLL.CommonService.DeleteFlowOperateByID(costSmallDetail.CostSmallDetailId); } db.CostGoods_CostSmallDetail.DeleteOnSubmit(costSmallDetail); db.SubmitChanges(); } }
/// <summary> /// 添加安全费用投入登记 /// </summary> /// <param name="costSmallDetail"></param> public static void AddCostSmallDetail(Model.CostGoods_CostSmallDetail costSmallDetail) { Model.SUBHSSEDB db = Funs.DB; Model.CostGoods_CostSmallDetail newCostSmallDetail = new Model.CostGoods_CostSmallDetail { CostSmallDetailId = costSmallDetail.CostSmallDetailId, ProjectId = costSmallDetail.ProjectId, CostSmallDetailCode = costSmallDetail.CostSmallDetailCode, UnitId = costSmallDetail.UnitId, States = costSmallDetail.States, //newCostSmallDetail.CompileMan = costSmallDetail.CompileMan; CompileDate = costSmallDetail.CompileDate, Months = costSmallDetail.Months, ReportDate = costSmallDetail.ReportDate, //newCostSmallDetail.CheckMan = costSmallDetail.CheckMan; CheckDate = costSmallDetail.CheckDate, // newCostSmallDetail.ApproveMan = costSmallDetail.ApproveMan; ApproveDate = costSmallDetail.ApproveDate }; db.CostGoods_CostSmallDetail.InsertOnSubmit(newCostSmallDetail); db.SubmitChanges(); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectCostSmallDetailMenuId, costSmallDetail.ProjectId, null, costSmallDetail.CostSmallDetailId, costSmallDetail.CompileDate); }
/// <summary> /// 添加专家论证清单 /// </summary> /// <param name="expertArgument"></param> public static void AddExpertArgument(Model.Solution_ExpertArgument expertArgument) { Model.SUBHSSEDB db = Funs.DB; Model.Solution_ExpertArgument newExpertArgument = new Model.Solution_ExpertArgument { ExpertArgumentId = expertArgument.ExpertArgumentId, ExpertArgumentCode = expertArgument.ExpertArgumentCode, HazardType = expertArgument.HazardType, ProjectId = expertArgument.ProjectId, Address = expertArgument.Address, ExpectedTime = expertArgument.ExpectedTime, IsArgument = expertArgument.IsArgument, RecardMan = expertArgument.RecardMan, RecordTime = expertArgument.RecordTime, Remark = expertArgument.Remark, States = expertArgument.States, Descriptions = expertArgument.Descriptions }; db.Solution_ExpertArgument.InsertOnSubmit(newExpertArgument); db.SubmitChanges(); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectExpertArgumentMenuId, expertArgument.ProjectId, null, expertArgument.ExpertArgumentId, expertArgument.ExpectedTime); }
/// <summary> /// 添加气瓶入场报批 /// </summary> /// <param name="gasCylinderIn"></param> public static void AddGasCylinderIn(Model.InApproveManager_GasCylinderIn gasCylinderIn) { Model.SUBHSSEDB db = Funs.DB; Model.InApproveManager_GasCylinderIn newGasCylinderIn = new Model.InApproveManager_GasCylinderIn { GasCylinderInId = gasCylinderIn.GasCylinderInId, ProjectId = gasCylinderIn.ProjectId, GasCylinderInCode = gasCylinderIn.GasCylinderInCode, UnitId = gasCylinderIn.UnitId, InDate = gasCylinderIn.InDate, InTime = gasCylinderIn.InTime, DriverMan = gasCylinderIn.DriverMan, DriverNum = gasCylinderIn.DriverNum, CarNum = gasCylinderIn.CarNum, LeadCarMan = gasCylinderIn.LeadCarMan, States = gasCylinderIn.States, CompileMan = gasCylinderIn.CompileMan, CompileDate = gasCylinderIn.CompileDate }; db.InApproveManager_GasCylinderIn.InsertOnSubmit(newGasCylinderIn); db.SubmitChanges(); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.GasCylinderInMenuId, gasCylinderIn.ProjectId, null, gasCylinderIn.GasCylinderInId, gasCylinderIn.CompileDate); }
/// <summary> /// 添加联系单 /// </summary> /// <param name="ContactList"></param> public static void AddContactList(Model.Check_ContactList ContactList) { Model.SUBHSSEDB db = Funs.DB; Model.Check_ContactList newContactList = new Model.Check_ContactList { ContactListId = ContactList.ContactListId, ProjectId = ContactList.ProjectId, Code = ContactList.Code, SponsorUnitId = ContactList.SponsorUnitId, ReceivingUnits = ContactList.ReceivingUnits, ReceivingUnitNames = ContactList.ReceivingUnitNames, CompileDate = ContactList.CompileDate, CompileMan = ContactList.CompileMan, Remark = ContactList.Remark, AttachUrl = ContactList.AttachUrl, SeeFile = ContactList.SeeFile }; db.Check_ContactList.InsertOnSubmit(newContactList); db.SubmitChanges(); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectContactListMenuId, newContactList.ProjectId, ContactList.SponsorUnitId, newContactList.ContactListId, newContactList.CompileDate); }