using System.Linq; namespace BLL { /// /// 附件1 /// public static class AttachUrl1Service { /// /// 根据Id获取附件1内容 /// /// /// public static Model.PHTGL_AttachUrl1 GetAttachUrl1ById(string attachUrlId) { return Funs.DB.PHTGL_AttachUrl1.FirstOrDefault(e => e.AttachUrlId == attachUrlId); } /// /// 增加附件1 /// /// public static void AddAttachUrl1(Model.PHTGL_AttachUrl1 url1) { Model.PHTGL_AttachUrl1 newUrl = new Model.PHTGL_AttachUrl1(); newUrl.AttachUrlItemId = url1.AttachUrlItemId; newUrl.AttachUrlId = url1.AttachUrlId; newUrl.AttachUrlContent = url1.AttachUrlContent; Funs.DB.PHTGL_AttachUrl1.InsertOnSubmit(newUrl); Funs.DB.SubmitChanges(); } /// /// 修改附件1 /// /// public static void UpdateAttachUrl1(Model.PHTGL_AttachUrl1 url1) { Model.PHTGL_AttachUrl1 newUrl = Funs.DB.PHTGL_AttachUrl1.FirstOrDefault(e => e.AttachUrlId == url1.AttachUrlId); if (newUrl != null) { newUrl.AttachUrlContent = url1.AttachUrlContent; Funs.DB.SubmitChanges(); } } } }