Пример #1
0
 /// <summary>
 /// 根据主键删除信息
 /// </summary>
 /// <param name="projectFolderId"></param>
 public static void DeleteProjectFolderByID(string projectFolderId)
 {
     Model.SUBHSSEDB db = Funs.DB;
     Model.InformationProject_ProjectFolder ProjectFolder = db.InformationProject_ProjectFolder.FirstOrDefault(e => e.ProjectFolderId == projectFolderId);
     if (ProjectFolder != null)
     {
         db.InformationProject_ProjectFolder.DeleteOnSubmit(ProjectFolder);
         db.SubmitChanges();
     }
 }
Пример #2
0
 /// <summary>
 /// 修改项目文件夹
 /// </summary>
 /// <param name="projectFolder"></param>
 public static void UpdateProjectFolder(Model.InformationProject_ProjectFolder projectFolder)
 {
     Model.SUBHSSEDB db = Funs.DB;
     Model.InformationProject_ProjectFolder newProjectFolder = db.InformationProject_ProjectFolder.FirstOrDefault(e => e.ProjectFolderId == projectFolder.ProjectFolderId);
     if (newProjectFolder != null)
     {
         newProjectFolder.Code       = projectFolder.Code;
         newProjectFolder.Title      = projectFolder.Title;
         newProjectFolder.IsEndLever = projectFolder.IsEndLever;
         db.SubmitChanges();
     }
 }
Пример #3
0
 /// <summary>
 /// 添加项目文件夹
 /// </summary>
 /// <param name="projectFolder"></param>
 public static void AddProjectFolder(Model.InformationProject_ProjectFolder projectFolder)
 {
     Model.SUBHSSEDB db = Funs.DB;
     Model.InformationProject_ProjectFolder newProjectFolder = new Model.InformationProject_ProjectFolder
     {
         ProjectFolderId    = projectFolder.ProjectFolderId,
         ProjectId          = projectFolder.ProjectId,
         Code               = projectFolder.Code,
         Title              = projectFolder.Title,
         SupProjectFolderId = projectFolder.SupProjectFolderId,
         IsEndLever         = projectFolder.IsEndLever
     };
     db.InformationProject_ProjectFolder.InsertOnSubmit(newProjectFolder);
     db.SubmitChanges();
 }