全局处理问题:public static Model.SGGLDB db = Funs.DB;
This commit is contained in:
@@ -12,7 +12,7 @@ namespace BLL
|
||||
{
|
||||
public static class AttachFileService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加附件存储信息
|
||||
@@ -20,6 +20,7 @@ namespace BLL
|
||||
/// <param name="workArea"></param>
|
||||
public static void AddAttachFile(Model.AttachFile attachFile)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.AttachFile));
|
||||
Model.AttachFile newAttachFile = new Model.AttachFile();
|
||||
newAttachFile.AttachFileId = newKeyID;
|
||||
@@ -38,6 +39,7 @@ namespace BLL
|
||||
/// <param name="workArea"></param>
|
||||
public static void updateAttachFile(Model.AttachFile attachFile)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.AttachFile newAttachFile = db.AttachFile.FirstOrDefault(x => x.AttachFileId == attachFile.AttachFileId);
|
||||
newAttachFile.ToKeyId = attachFile.ToKeyId;
|
||||
newAttachFile.AttachSource = attachFile.AttachSource;
|
||||
@@ -53,6 +55,7 @@ namespace BLL
|
||||
/// <param name="workAreaId"></param>
|
||||
public static void DeleteAttachFile(string rootPath, string toKeyId, string menuId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.AttachFile att = db.AttachFile.FirstOrDefault(e => e.ToKeyId == toKeyId && e.MenuId == menuId);
|
||||
if (att != null)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/// </summary>
|
||||
public static class ProjectDataFlowSetService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
@@ -27,6 +27,7 @@
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string dataId, int startRowIndex, int maximumRows)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
IQueryable<Model.View_ProjectData_FlowOperate> q = from x in db.View_ProjectData_FlowOperate
|
||||
where x.DataId == dataId && x.IsClosed == true
|
||||
orderby x.SortIndex descending
|
||||
@@ -168,6 +169,7 @@
|
||||
/// </summary>
|
||||
public static void CloseFlowOperate(string menuId, string dataId, string opinion)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var updateUnFlowOperate = db.ProjectData_FlowOperate.FirstOrDefault(x => x.MenuId == menuId && x.DataId == dataId && (x.IsClosed == false || !x.IsClosed.HasValue));
|
||||
if (updateUnFlowOperate != null)
|
||||
{
|
||||
@@ -311,6 +313,7 @@
|
||||
/// <param name="dataId">主表主键Id</param>
|
||||
public static bool IsExitOperate(string menuId, string dataId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return (from x in db.ProjectData_FlowOperate
|
||||
where x.MenuId == menuId && x.DataId == dataId
|
||||
select x).Count() > 0;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public class WeatherService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取事故类型
|
||||
|
||||
Reference in New Issue
Block a user