CSLA - Extension
This commit is contained in:
@@ -5,31 +5,22 @@ using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using Csla;
|
||||
using Csla.Data;
|
||||
using Csla.Validation;
|
||||
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
public class ESP_FixHyphens : CommandBase
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#region Factory Methods
|
||||
private string _StoredProcedure;
|
||||
public string StoredProcedure
|
||||
#region Factory Methods
|
||||
public string StoredProcedure { get; set; }
|
||||
public int AffectedRows { get; set; }
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
get { return _StoredProcedure; }
|
||||
set { _StoredProcedure = value; }
|
||||
}
|
||||
private int _AffectedRows;
|
||||
public int AffectedRows
|
||||
{
|
||||
get { return _AffectedRows; }
|
||||
set { _AffectedRows = value; }
|
||||
}
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
ESP_DeletePDFs cmd = new ESP_DeletePDFs();
|
||||
cmd.StoredProcedure = storedProcedure;
|
||||
DataPortal.Execute<ESP_DeletePDFs>(cmd);
|
||||
ESP_DeletePDFs cmd = new ESP_DeletePDFs
|
||||
{
|
||||
StoredProcedure = storedProcedure
|
||||
};
|
||||
DataPortal.Execute<ESP_DeletePDFs>(cmd);
|
||||
return cmd.AffectedRows;
|
||||
}
|
||||
#endregion
|
||||
@@ -59,24 +50,16 @@ namespace VEPROMS.CSLA.Library
|
||||
public class ESP_DeletePDFs : CommandBase
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#region Factory Methods
|
||||
private string _StoredProcedure;
|
||||
public string StoredProcedure
|
||||
#region Factory Methods
|
||||
public string StoredProcedure { get; set; }
|
||||
public int AffectedRows { get; set; }
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
get { return _StoredProcedure; }
|
||||
set { _StoredProcedure = value; }
|
||||
}
|
||||
private int _AffectedRows;
|
||||
public int AffectedRows
|
||||
{
|
||||
get { return _AffectedRows; }
|
||||
set { _AffectedRows = value; }
|
||||
}
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
ESP_DeletePDFs cmd = new ESP_DeletePDFs();
|
||||
cmd.StoredProcedure = storedProcedure;
|
||||
DataPortal.Execute<ESP_DeletePDFs>(cmd);
|
||||
ESP_DeletePDFs cmd = new ESP_DeletePDFs
|
||||
{
|
||||
StoredProcedure = storedProcedure
|
||||
};
|
||||
DataPortal.Execute<ESP_DeletePDFs>(cmd);
|
||||
return cmd.AffectedRows;
|
||||
}
|
||||
#endregion
|
||||
@@ -106,24 +89,16 @@ namespace VEPROMS.CSLA.Library
|
||||
public class ESP_IdentifyDisconnectedItems : CommandBase
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#region Factory Methods
|
||||
private string _StoredProcedure;
|
||||
public string StoredProcedure
|
||||
#region Factory Methods
|
||||
public string StoredProcedure { get; set; }
|
||||
public int RowCount { get; set; }
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
get { return _StoredProcedure; }
|
||||
set { _StoredProcedure = value; }
|
||||
}
|
||||
private int _RowCount;
|
||||
public int RowCount
|
||||
{
|
||||
get { return _RowCount; }
|
||||
set { _RowCount = value; }
|
||||
}
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
ESP_IdentifyDisconnectedItems cmd = new ESP_IdentifyDisconnectedItems();
|
||||
cmd.StoredProcedure = storedProcedure;
|
||||
DataPortal.Execute<ESP_IdentifyDisconnectedItems>(cmd);
|
||||
ESP_IdentifyDisconnectedItems cmd = new ESP_IdentifyDisconnectedItems
|
||||
{
|
||||
StoredProcedure = storedProcedure
|
||||
};
|
||||
DataPortal.Execute<ESP_IdentifyDisconnectedItems>(cmd);
|
||||
return cmd.RowCount;
|
||||
}
|
||||
#endregion
|
||||
@@ -157,24 +132,16 @@ namespace VEPROMS.CSLA.Library
|
||||
public class ESP_PurgeDisconnectedItems : CommandBase
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#region Factory Methods
|
||||
private string _StoredProcedure;
|
||||
public string StoredProcedure
|
||||
#region Factory Methods
|
||||
public string StoredProcedure { get; set; }
|
||||
public int RowCount { get; set; }
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
get { return _StoredProcedure; }
|
||||
set { _StoredProcedure = value; }
|
||||
}
|
||||
private int _RowCount;
|
||||
public int RowCount
|
||||
{
|
||||
get { return _RowCount; }
|
||||
set { _RowCount = value; }
|
||||
}
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
ESP_PurgeDisconnectedItems cmd = new ESP_PurgeDisconnectedItems();
|
||||
cmd.StoredProcedure = storedProcedure;
|
||||
DataPortal.Execute<ESP_PurgeDisconnectedItems>(cmd);
|
||||
ESP_PurgeDisconnectedItems cmd = new ESP_PurgeDisconnectedItems
|
||||
{
|
||||
StoredProcedure = storedProcedure
|
||||
};
|
||||
DataPortal.Execute<ESP_PurgeDisconnectedItems>(cmd);
|
||||
return cmd.RowCount;
|
||||
}
|
||||
#endregion
|
||||
@@ -206,24 +173,16 @@ namespace VEPROMS.CSLA.Library
|
||||
public class ESP_GetROAssoc : CommandBase
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#region Factory Methods
|
||||
private string _StoredProcedure;
|
||||
public string StoredProcedure
|
||||
#region Factory Methods
|
||||
public string StoredProcedure { get; set; }
|
||||
public int RowCount { get; set; }
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
get { return _StoredProcedure; }
|
||||
set { _StoredProcedure = value; }
|
||||
}
|
||||
private int _RowCount;
|
||||
public int RowCount
|
||||
{
|
||||
get { return _RowCount; }
|
||||
set { _RowCount = value; }
|
||||
}
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
ESP_GetROAssoc cmd = new ESP_GetROAssoc();
|
||||
cmd.StoredProcedure = storedProcedure;
|
||||
DataPortal.Execute<ESP_GetROAssoc>(cmd);
|
||||
ESP_GetROAssoc cmd = new ESP_GetROAssoc
|
||||
{
|
||||
StoredProcedure = storedProcedure
|
||||
};
|
||||
DataPortal.Execute<ESP_GetROAssoc>(cmd);
|
||||
return cmd.RowCount;
|
||||
}
|
||||
#endregion
|
||||
@@ -257,24 +216,16 @@ namespace VEPROMS.CSLA.Library
|
||||
public class ESP_CleanupROAssoc : CommandBase
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#region Factory Methods
|
||||
private string _StoredProcedure;
|
||||
public string StoredProcedure
|
||||
#region Factory Methods
|
||||
public string StoredProcedure { get; set; }
|
||||
public int RowCount { get; set; }
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
get { return _StoredProcedure; }
|
||||
set { _StoredProcedure = value; }
|
||||
}
|
||||
private int _RowCount;
|
||||
public int RowCount
|
||||
{
|
||||
get { return _RowCount; }
|
||||
set { _RowCount = value; }
|
||||
}
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
ESP_CleanupROAssoc cmd = new ESP_CleanupROAssoc();
|
||||
cmd.StoredProcedure = storedProcedure;
|
||||
DataPortal.Execute<ESP_CleanupROAssoc>(cmd);
|
||||
ESP_CleanupROAssoc cmd = new ESP_CleanupROAssoc
|
||||
{
|
||||
StoredProcedure = storedProcedure
|
||||
};
|
||||
DataPortal.Execute<ESP_CleanupROAssoc>(cmd);
|
||||
return cmd.RowCount;
|
||||
}
|
||||
#endregion
|
||||
@@ -307,24 +258,16 @@ namespace VEPROMS.CSLA.Library
|
||||
public class ESP_GetUnusedRoFsts : CommandBase
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#region Factory Methods
|
||||
private string _StoredProcedure;
|
||||
public string StoredProcedure
|
||||
#region Factory Methods
|
||||
public string StoredProcedure { get; set; }
|
||||
public int RowCount { get; set; }
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
get { return _StoredProcedure; }
|
||||
set { _StoredProcedure = value; }
|
||||
}
|
||||
private int _RowCount;
|
||||
public int RowCount
|
||||
{
|
||||
get { return _RowCount; }
|
||||
set { _RowCount = value; }
|
||||
}
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
ESP_GetUnusedRoFsts cmd = new ESP_GetUnusedRoFsts();
|
||||
cmd.StoredProcedure = storedProcedure;
|
||||
DataPortal.Execute<ESP_GetUnusedRoFsts>(cmd);
|
||||
ESP_GetUnusedRoFsts cmd = new ESP_GetUnusedRoFsts
|
||||
{
|
||||
StoredProcedure = storedProcedure
|
||||
};
|
||||
DataPortal.Execute<ESP_GetUnusedRoFsts>(cmd);
|
||||
return cmd.RowCount;
|
||||
}
|
||||
#endregion
|
||||
@@ -358,24 +301,16 @@ namespace VEPROMS.CSLA.Library
|
||||
public class ESP_GetUnusedFigures : CommandBase
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#region Factory Methods
|
||||
private string _StoredProcedure;
|
||||
public string StoredProcedure
|
||||
#region Factory Methods
|
||||
public string StoredProcedure { get; set; }
|
||||
public int RowCount { get; set; }
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
get { return _StoredProcedure; }
|
||||
set { _StoredProcedure = value; }
|
||||
}
|
||||
private int _RowCount;
|
||||
public int RowCount
|
||||
{
|
||||
get { return _RowCount; }
|
||||
set { _RowCount = value; }
|
||||
}
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
ESP_GetUnusedFigures cmd = new ESP_GetUnusedFigures();
|
||||
cmd.StoredProcedure = storedProcedure;
|
||||
DataPortal.Execute<ESP_GetUnusedFigures>(cmd);
|
||||
ESP_GetUnusedFigures cmd = new ESP_GetUnusedFigures
|
||||
{
|
||||
StoredProcedure = storedProcedure
|
||||
};
|
||||
DataPortal.Execute<ESP_GetUnusedFigures>(cmd);
|
||||
return cmd.RowCount;
|
||||
}
|
||||
#endregion
|
||||
@@ -409,24 +344,16 @@ namespace VEPROMS.CSLA.Library
|
||||
public class ESP_PurgeUnusedRoFstsAndFigures : CommandBase
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#region Factory Methods
|
||||
private string _StoredProcedure;
|
||||
public string StoredProcedure
|
||||
#region Factory Methods
|
||||
public string StoredProcedure { get; set; }
|
||||
public int RowCount { get; set; }
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
get { return _StoredProcedure; }
|
||||
set { _StoredProcedure = value; }
|
||||
}
|
||||
private int _RowCount;
|
||||
public int RowCount
|
||||
{
|
||||
get { return _RowCount; }
|
||||
set { _RowCount = value; }
|
||||
}
|
||||
public static int Execute(string storedProcedure)
|
||||
{
|
||||
ESP_PurgeUnusedRoFstsAndFigures cmd = new ESP_PurgeUnusedRoFstsAndFigures();
|
||||
cmd.StoredProcedure = storedProcedure;
|
||||
DataPortal.Execute<ESP_PurgeUnusedRoFstsAndFigures>(cmd);
|
||||
ESP_PurgeUnusedRoFstsAndFigures cmd = new ESP_PurgeUnusedRoFstsAndFigures
|
||||
{
|
||||
StoredProcedure = storedProcedure
|
||||
};
|
||||
DataPortal.Execute<ESP_PurgeUnusedRoFstsAndFigures>(cmd);
|
||||
return cmd.RowCount;
|
||||
}
|
||||
#endregion
|
||||
@@ -458,24 +385,16 @@ namespace VEPROMS.CSLA.Library
|
||||
public class ESP_IdentifyNonEditableItems : CommandBase
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#region Factory Methods
|
||||
private string _StoredProcedure;
|
||||
public string StoredProcedure
|
||||
#region Factory Methods
|
||||
public string StoredProcedure { get; set; }
|
||||
public List<ItemInfo> ItemInfoList { get; set; } = new List<ItemInfo>();
|
||||
public static List<ItemInfo> Execute(string storedProcedure)
|
||||
{
|
||||
get { return _StoredProcedure; }
|
||||
set { _StoredProcedure = value; }
|
||||
}
|
||||
private List<ItemInfo> _ItemInfoList = new List<ItemInfo>();
|
||||
public List<ItemInfo> ItemInfoList
|
||||
{
|
||||
get { return _ItemInfoList; }
|
||||
set { _ItemInfoList = value; }
|
||||
}
|
||||
public static List<ItemInfo> Execute(string storedProcedure)
|
||||
{
|
||||
ESP_IdentifyNonEditableItems cmd = new ESP_IdentifyNonEditableItems();
|
||||
cmd.StoredProcedure = storedProcedure;
|
||||
DataPortal.Execute<ESP_IdentifyNonEditableItems>(cmd);
|
||||
ESP_IdentifyNonEditableItems cmd = new ESP_IdentifyNonEditableItems
|
||||
{
|
||||
StoredProcedure = storedProcedure
|
||||
};
|
||||
DataPortal.Execute<ESP_IdentifyNonEditableItems>(cmd);
|
||||
return cmd.ItemInfoList;
|
||||
}
|
||||
#endregion
|
||||
@@ -508,24 +427,16 @@ namespace VEPROMS.CSLA.Library
|
||||
public class ESP_GetDatabaseSessions : CommandBase
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#region Factory Methods
|
||||
private string _StoredProcedure;
|
||||
public string StoredProcedure
|
||||
#region Factory Methods
|
||||
public string StoredProcedure { get; set; }
|
||||
public string ResultsString { get; set; }
|
||||
public static string Execute(string storedProcedure)
|
||||
{
|
||||
get { return _StoredProcedure; }
|
||||
set { _StoredProcedure = value; }
|
||||
}
|
||||
private string _ResultsString;
|
||||
public string ResultsString
|
||||
{
|
||||
get { return _ResultsString; }
|
||||
set { _ResultsString = value; }
|
||||
}
|
||||
public static string Execute(string storedProcedure)
|
||||
{
|
||||
ESP_GetDatabaseSessions cmd = new ESP_GetDatabaseSessions();
|
||||
cmd.StoredProcedure = storedProcedure;
|
||||
DataPortal.Execute<ESP_GetDatabaseSessions>(cmd);
|
||||
ESP_GetDatabaseSessions cmd = new ESP_GetDatabaseSessions
|
||||
{
|
||||
StoredProcedure = storedProcedure
|
||||
};
|
||||
DataPortal.Execute<ESP_GetDatabaseSessions>(cmd);
|
||||
return cmd.ResultsString;
|
||||
}
|
||||
#endregion
|
||||
@@ -579,7 +490,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
_ResultsString = sbs.ToString();
|
||||
ResultsString = sbs.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -591,12 +502,4 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
public class ESP_FindROProblems : CommandBase
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#region Factory Methods
|
||||
#endregion
|
||||
#region Server-Side Code
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user