
Added SetData method to GridInfo class to allow updating grid data Added GetNonCached method to GridInfo class to allowing retrieving noncached grid data Added code to retrieve noncached grid data during printing of procedure with grids
40 lines
811 B
C#
40 lines
811 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using Csla;
|
|
|
|
namespace VEPROMS.CSLA.Library
|
|
{
|
|
public partial class GridInfo
|
|
{
|
|
public void ResetContent(Grid myGrid)
|
|
{
|
|
RefreshFields(myGrid);
|
|
}
|
|
public void SetData(string myData)
|
|
{
|
|
_Data = myData;
|
|
RemoveFromCache(this);
|
|
}
|
|
public static GridInfo GetNonCached(int contentID)
|
|
{
|
|
//if (!CanGetObject())
|
|
// throw new System.Security.SecurityException("User not authorized to view a Grid");
|
|
try
|
|
{
|
|
GridInfo tmp = DataPortal.Fetch<GridInfo>(new PKCriteria(contentID));
|
|
if (tmp.ErrorMessage == "No Record Found")
|
|
{
|
|
tmp.Dispose(); // Clean-up GridInfo
|
|
tmp = null;
|
|
}
|
|
return tmp;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new DbCslaException("Error on GridInfo.Get", ex);
|
|
}
|
|
}
|
|
}
|
|
}
|