95 lines
5.3 KiB
C#
95 lines
5.3 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace BLL
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// 其他巡检记录管理
|
|||
|
/// </summary>
|
|||
|
public static class PropertyRunOthersCheckService
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// 根据主键获取其他巡检记录管理信息
|
|||
|
/// </summary>
|
|||
|
/// <param name="PropertyRunOthersCheckId"></param>
|
|||
|
/// <returns></returns>
|
|||
|
public static Model.ProduceProperty_PropertyRunOthersCheck GetPropertyRunOthersCheckById(string PropertyRunOthersCheckId)
|
|||
|
{
|
|||
|
return Funs.DB.ProduceProperty_PropertyRunOthersCheck.FirstOrDefault(e => e.PropertyRunOthersCheckId == PropertyRunOthersCheckId);
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 添加其他巡检记录管理信息
|
|||
|
/// </summary>
|
|||
|
/// <param name="PropertyRunOthersCheck"></param>
|
|||
|
public static void AddPropertyRunOthersCheck(Model.ProduceProperty_PropertyRunOthersCheck PropertyRunOthersCheck)
|
|||
|
{
|
|||
|
Model.ProduceProperty_PropertyRunOthersCheck newPropertyRunOthersCheck = new Model.ProduceProperty_PropertyRunOthersCheck();
|
|||
|
newPropertyRunOthersCheck.PropertyRunOthersCheckId = PropertyRunOthersCheck.PropertyRunOthersCheckId;
|
|||
|
newPropertyRunOthersCheck.ProjectId = PropertyRunOthersCheck.ProjectId;
|
|||
|
newPropertyRunOthersCheck.Code = PropertyRunOthersCheck.Code;
|
|||
|
newPropertyRunOthersCheck.UnitWorkId = PropertyRunOthersCheck.UnitWorkId;
|
|||
|
newPropertyRunOthersCheck.InstallationMan = PropertyRunOthersCheck.InstallationMan;
|
|||
|
newPropertyRunOthersCheck.RecordName = PropertyRunOthersCheck.RecordName;
|
|||
|
newPropertyRunOthersCheck.RecordCode = PropertyRunOthersCheck.RecordCode;
|
|||
|
newPropertyRunOthersCheck.RecordMan = PropertyRunOthersCheck.RecordMan;
|
|||
|
newPropertyRunOthersCheck.StartDate = PropertyRunOthersCheck.StartDate;
|
|||
|
newPropertyRunOthersCheck.EndDate = PropertyRunOthersCheck.EndDate;
|
|||
|
newPropertyRunOthersCheck.RecordInstructions = PropertyRunOthersCheck.RecordInstructions;
|
|||
|
newPropertyRunOthersCheck.ProblemsSolutions = PropertyRunOthersCheck.ProblemsSolutions;
|
|||
|
newPropertyRunOthersCheck.AttachUrl = PropertyRunOthersCheck.AttachUrl;
|
|||
|
newPropertyRunOthersCheck.Remark = PropertyRunOthersCheck.Remark;
|
|||
|
newPropertyRunOthersCheck.Profession = PropertyRunOthersCheck.Profession;
|
|||
|
Funs.DB.ProduceProperty_PropertyRunOthersCheck.InsertOnSubmit(newPropertyRunOthersCheck);
|
|||
|
Funs.DB.SubmitChanges();
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 修改其他巡检记录管理
|
|||
|
/// </summary>
|
|||
|
/// <param name="PropertyRunOthersCheck"></param>
|
|||
|
public static void UpdatePropertyRunOthersCheck(Model.ProduceProperty_PropertyRunOthersCheck PropertyRunOthersCheck)
|
|||
|
{
|
|||
|
Model.ProduceProperty_PropertyRunOthersCheck newPropertyRunOthersCheck = Funs.DB.ProduceProperty_PropertyRunOthersCheck.FirstOrDefault(e => e.PropertyRunOthersCheckId == PropertyRunOthersCheck.PropertyRunOthersCheckId);
|
|||
|
if (newPropertyRunOthersCheck != null)
|
|||
|
{
|
|||
|
newPropertyRunOthersCheck.Code = PropertyRunOthersCheck.Code;
|
|||
|
newPropertyRunOthersCheck.UnitWorkId = PropertyRunOthersCheck.UnitWorkId;
|
|||
|
newPropertyRunOthersCheck.InstallationMan = PropertyRunOthersCheck.InstallationMan;
|
|||
|
newPropertyRunOthersCheck.RecordName = PropertyRunOthersCheck.RecordName;
|
|||
|
newPropertyRunOthersCheck.RecordCode = PropertyRunOthersCheck.RecordCode;
|
|||
|
//newPropertyRunOthersCheck.RecordMan = PropertyRunOthersCheck.RecordMan;
|
|||
|
newPropertyRunOthersCheck.StartDate = PropertyRunOthersCheck.StartDate;
|
|||
|
newPropertyRunOthersCheck.EndDate = PropertyRunOthersCheck.EndDate;
|
|||
|
newPropertyRunOthersCheck.RecordInstructions = PropertyRunOthersCheck.RecordInstructions;
|
|||
|
newPropertyRunOthersCheck.ProblemsSolutions = PropertyRunOthersCheck.ProblemsSolutions;
|
|||
|
newPropertyRunOthersCheck.AttachUrl = PropertyRunOthersCheck.AttachUrl;
|
|||
|
newPropertyRunOthersCheck.Remark = PropertyRunOthersCheck.Remark;
|
|||
|
newPropertyRunOthersCheck.Profession = PropertyRunOthersCheck.Profession;
|
|||
|
Funs.DB.SubmitChanges();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 根据主键删除其他巡检记录管理
|
|||
|
/// </summary>
|
|||
|
/// <param name="PropertyRunOthersCheckId"></param>
|
|||
|
public static void DeletePropertyRunOthersCheck(string PropertyRunOthersCheckId)
|
|||
|
{
|
|||
|
Model.ProduceProperty_PropertyRunOthersCheck PropertyRunOthersCheck = Funs.DB.ProduceProperty_PropertyRunOthersCheck.FirstOrDefault(e => e.PropertyRunOthersCheckId == PropertyRunOthersCheckId);
|
|||
|
if (PropertyRunOthersCheck != null)
|
|||
|
{
|
|||
|
if (!string.IsNullOrEmpty(PropertyRunOthersCheck.AttachUrl))
|
|||
|
{
|
|||
|
BLL.UploadAttachmentService.DeleteFile(Funs.RootPath, PropertyRunOthersCheck.AttachUrl);//删除附件
|
|||
|
}
|
|||
|
Funs.DB.ProduceProperty_PropertyRunOthersCheck.DeleteOnSubmit(PropertyRunOthersCheck);
|
|||
|
Funs.DB.SubmitChanges();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|