using System.Linq; namespace BLL { /// /// 附件6 /// public static class AttachUrl6Service { /// /// 根据Id获取附件6内容 /// /// /// public static Model.PHTGL_AttachUrl6 GetAttachUrl6ById(string attachUrlId) { return Funs.DB.PHTGL_AttachUrl6.FirstOrDefault(e => e.AttachUrlId == attachUrlId); } /// /// 增加附件6 /// /// public static void AddAttachUrl6(Model.PHTGL_AttachUrl6 url6) { Model.PHTGL_AttachUrl6 newUrl = new Model.PHTGL_AttachUrl6(); newUrl.AttachUrlItemId = url6.AttachUrlItemId; newUrl.AttachUrlId = url6.AttachUrlId; newUrl.AttachUrlContent = url6.AttachUrlContent; Funs.DB.PHTGL_AttachUrl6.InsertOnSubmit(newUrl); Funs.DB.SubmitChanges(); } /// /// 修改附件6 /// /// public static void UpdateAttachUrl6(Model.PHTGL_AttachUrl6 url6) { Model.PHTGL_AttachUrl6 newUrl = Funs.DB.PHTGL_AttachUrl6.FirstOrDefault(e => e.AttachUrlId == url6.AttachUrlId); if (newUrl != null) { newUrl.AttachUrlContent = url6.AttachUrlContent; Funs.DB.SubmitChanges(); } } } }