|
C#
public static bool
BeforeEdit(System.Web.UI.Page Page, IDictionary e)
{
//Check if specific record exists
Query query = new Query(AntTable.Scema).WHERE("AnyColumn",e["columnToLookFor"]);
int count=0;
try
{
count = query.GetRecordCount();
if (count >
0)
{
// if record exist do
something
}
else
{
// if don't exist do somthing
else
}
}
finally
{
}
return true;
// return true if you like to proceed with
editing this record
// return false in other case
}
|