Improved conversion ot Referenced Objects and Transitions to text
Added code to implement deleting pdfs Fixed problems with searching by Textm Annotations, Referenced Objects and Transitions
This commit is contained in:
@@ -92,4 +92,51 @@ namespace VEPROMS.CSLA.Library
|
||||
public partial class PdfInfoList
|
||||
{
|
||||
}
|
||||
public class ExecuteStoredProcedure : CommandBase
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#region Factory Methods
|
||||
private string _StoredProcedure;
|
||||
public 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)
|
||||
{
|
||||
ExecuteStoredProcedure cmd = new ExecuteStoredProcedure();
|
||||
cmd.StoredProcedure = storedProcedure;
|
||||
DataPortal.Execute<ExecuteStoredProcedure>(cmd);
|
||||
return cmd.AffectedRows;
|
||||
}
|
||||
#endregion
|
||||
#region Server-Side code
|
||||
protected override void DataPortal_Execute()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cmd = new SqlCommand(StoredProcedure, cn))
|
||||
{
|
||||
cmd.CommandType = CommandType.StoredProcedure;
|
||||
cmd.CommandTimeout = 0;
|
||||
AffectedRows = cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (_MyLog.IsErrorEnabled) _MyLog.Error("ExecuteStoredProcedure Error", ex);
|
||||
throw new ApplicationException("Failure on ExecuteStoredProcedure", ex);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user