个人开发框架总结(二)
2009-05-05 08:27:18 来源:WEB开发网GetSelectedInfo 获得当前选中的信息的实体信息,代码与上面的一样。
ConfirmDelete 确认删除信息
/// <summary>
/// 确认删除信息
/// </summary>
/// <param name="id">选中的id数组</param>
/// <returns></returns>
protected override bool ConfirmDelete(params string[] ids)
{
try
{
ATEmployee objDAL = (ATEmployee)DAFactory.CreateDA(typeof(ATEmployee));
//更改删除标记
bool result = objDAL.DataHelper.ExecuteNonQuery("UPDATE " + TEmployee._TableName +
" SET " + TEmployee._IsDelete + " = 1 WHERE " + TEmployee._PrimaryKey +
" IN (" + string.Join(",", ids) + ")") > 0;
//真正的删除
//bool result = objDAL.DeleteBy(ids);
objDAL.Dispose();
return result;
}
catch (System.Exception e)
{
Utility.ShowErrorMessage(e.Message);
}
return false;
}
更多精彩
赞助商链接