本文整理汇总了C#中BusinessLayer类的典型用法代码示例。如果您正苦于以下问题:C#BusinessLayer类的具体用法?C#BusinessLayer怎么用?C#BusinessLayer使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:InsertLog
publicDataAccessLayer.SOAResultInsertLog(BusinessLayer.Loglog)
{
//FirstcheckifthisrecordexistsintheSQLite
using(varcontents=SQLiteUtilities.MainSQLiteConnection.CreateCommand())
{
using(varc=SQLiteUtilities.MainSQLiteConnection.CreateCommand())
{
c.CommandText="INSERTINTO[Log]([Date],[LogText])VALUES(+log.Date+,+
log.LogText+)";
try
{
varrowcount=c.ExecuteNonQuery();//rowcountwillbe1
if(rowcount==1)
returnDataAccessLayer.SOAResult.TRUE;
else
returnDataAccessLayer.SOAResult.FALSE;
}
catch(Exceptionex)
{
DataAccessLayer.ExceptionWriter.WriteLogFile(ex);
returnDataAccessLayer.SOAResult.FALSE;
}
}
}
}
原文链接:
http://www.jxszl.com/biancheng/C/556616.html