本文整理汇总了C#中HelMagEntity.OperationLog类的典型用法代码示例。如果您正苦于以下问题:C# OperationLog类的具体用法?C# OperationLog怎么用?C# OperationLog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OperationLog类属于HelMagEntity命名空间,在下文中一共展示了OperationLog类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: AddRecord
/// <summary>
/// 添加记录操作
/// </summary>
protected void AddRecord()
{
HttpContext context = HttpContext.Current;
HttpRequest request = context.Request;
HttpResponse response = context.Response;
OperationLog operationLog = new OperationLog();
string addTime = request.Params["textAddTime"];
string conLogId = request.Params["textConLogId"];
string isSuccessId = request.Params["textIsSuccessId"];
string objectRecordId = request.Params["textObjectRecordId"];
string operationContent = request.Params["textOperationContent"];
string operationTable = request.Params["textOperationTable"];
string operationType = request.Params["textOperationType"];
string resultCode = request.Params["textResultCode"];
string resultMessage = request.Params["textResultMessage"];
string userId = request.Params["textUserId"];
string totalCount = request.Params["textTotalCount"];
operationLog.AddTime = DateTime.Now;
if (!String.IsNullOrEmpty(conLogId))
operationLog.ConLogId = conLogId;
if (!String.IsNullOrEmpty(isSuccessId))
operationLog.IsSuccessId = isSuccessId;
operationLog.OperationLogId = Guid.NewGuid().ToString("N");
if (!String.IsNullOrEmpty(objectRecordId))
operationLog.ObjectRecordId = objectRecordId;
if (!String.IsNullOrEmpty(operationContent))
operationLog.OperationContent = operationContent;
if (!String.IsNullOrEmpty(operationTable))
operationLog.OperationTable = operationTable;
if (!String.IsNullOrEmpty(operationType))
operationLog.OperationTypeCode = operationType;
if (!String.IsNullOrEmpty(resultCode))
operationLog.ResultCode = Convert.ToInt32(resultCode);
if (!String.IsNullOrEmpty(resultMessage))
operationLog.ResultMessage = resultMessage;
if (!String.IsNullOrEmpty(userId))
operationLog.UserId = userId;
if (!String.IsNullOrEmpty(totalCount))
operationLog.TotalCount = Convert.ToInt32(totalCount);
ResultModel result = OperationLogBll.Insert(operationLog);
string jsonString = JsonConvert.SerializeObject(result);
response.Write(result);
}
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:49,代码来源:OperationLogApp.ashx.cs
示例2: Delete
/// <summary>
/// 根据记录主键,删除指定记录。
/// </summary>
/// <param name="cardUserId">记录主键</param>
/// <returns>删除结果,包括是否删除成功、记录主键等信息</returns>
public static ResultModel Delete(string cardUserId)
{
OperationLog log = new OperationLog();
ResultModel result = new ResultModel();
try
{
log.OperationLogId = System.Guid.NewGuid().ToString("N");
log.UserId = CurrentSession.getUser().UserId;
log.OperationTypeCode = SymbolicConstant.OPERATIONTYPE_DELETE;
log.OperationContent = SymbolicConstant.OPERATIONCONTENT_DELETE;
log.AddTime = DateTime.Now;
log.ObjectRecordId = cardUserId;
log.OperationTable = typeof(CardUser).Name;
log.IsSuccessId = SymbolicConstant.ISSUCCESS_TRUE;
log.ResultCode = SymbolicConstant.RESULTCODE_DELETE_SUCCESS;
log.ResultMessage=SymbolicConstant.RESULTMESSAGE_DELETE_SUCCESS;
CardUser cardUser =(CardUser)GetCardUserById(cardUserId).Data;
CardUserDal.Delete(cardUser);
result.IsSuccess = true;
result.ObjectRecordId = cardUserId;
result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_SUCCESS;
result.ResultMessage = SymbolicConstant.RESULTMESSAGE_DELETE_SUCCESS;
return result;
}
catch (Exception exception)
{
log.IsSuccessId = SymbolicConstant.ISSUCCESS_FALSE;
log.ResultCode = SymbolicConstant.RESULTCODE_DELETE_ERROR;
log.ResultMessage=exception.Message;
result.IsSuccess = false;
result.ObjectRecordId = cardUserId;
result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_ERROR;
result.ResultMessage = exception.Message;
return result;
}
finally
{
OperationLogBll.Insert(log);
}
}
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:50,代码来源:CardUserBll.cs
示例3: Delete
public static ResultModel Delete(string operationLogId)
{
OperationLog log = new OperationLog();
ResultModel result = new ResultModel();
try
{
log = (OperationLog)GetOperationLogById(operationLogId).Data;
OperationLogDal.Delete(log);
result.IsSuccess = true;
result.ObjectRecordId = log.OperationLogId;
result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_SUCCESS;
return result;
}
catch (Exception e)
{
System.Console.Write(e.Message);
result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_ERROR;
result.IsSuccess = false;
return result;
}
}
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:22,代码来源:OperationLogBll.cs
示例4: GetOperationLogById
public static ResultModel GetOperationLogById(string operationLogId)
{
OperationLog log = new OperationLog();
ResultModel result = new ResultModel();
try
{
log = OperationLogDal.GetModel(operationLogId);
result.Data = log;
result.DataSize = 1;
result.IsSuccess = true;
result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_SUCCESS;
return result;
}
catch (Exception exception)
{
result.Data = log;
result.DataSize = 1;
result.IsSuccess = false;
result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_ERROR;
result.ResultMessage = exception.Message;
return result;
}
}
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:23,代码来源:OperationLogBll.cs
示例5: Insert
/// <summary>
/// 添加一条新记录
/// </summary>
/// <param name="cardUser">CardUser实体</param>
/// <returns>添加结果,包括是否插入成功、记录主键等信息</returns>
public static ResultModel Insert(CardUser cardUser)
{
OperationLog log = new OperationLog();
ResultModel result = new ResultModel();
object id = "";
try
{
log.OperationLogId = Guid.NewGuid().ToString("N");
log.UserId = CurrentSession.getUser().UserId;
log.OperationTypeCode = SymbolicConstant.OPERATIONTYPE_INSERT;
log.OperationContent = SymbolicConstant.OPERATIONCONTENT_INSERT;
log.AddTime = DateTime.Now;
log.OperationTable = typeof(CardUser).Name;
id = CardUserDal.Insert(cardUser);
log.ObjectRecordId = Convert.ToString(id);
log.ResultCode = SymbolicConstant.RESULTCODE_INSERT_SUCCESS;
log.IsSuccessId = SymbolicConstant.ISSUCCESS_TRUE;
log.ResultMessage=SymbolicConstant.RESULTMESSAGE_INSERT_SUCCESS;
result.IsSuccess = true;
result.ObjectRecordId = id.ToString();
result.ResultCode = SymbolicConstant.RESULTCODE_INSERT_SUCCESS;
result.ResultMessage = SymbolicConstant.RESULTMESSAGE_INSERT_SUCCESS;
return result;
}
catch (Exception exception)
{
log.IsSuccessId = SymbolicConstant.ISSUCCESS_FALSE;
log.ObjectRecordId = Convert.ToString(id);
log.ResultCode = SymbolicConstant.RESULTCODE_INSERT_ERROR;
log.ResultMessage=exception.Message;
result.IsSuccess = false;
result.ObjectRecordId = id.ToString();
result.ResultCode = SymbolicConstant.RESULTCODE_INSERT_ERROR;
result.ResultMessage = exception.Message;
return result;
}
finally
{
OperationLogBll.Insert(log);
}
}
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:52,代码来源:CardUserBll.cs
示例6: GetCardUserList
/// <summary>
/// 根据查询条件获取CardUser表中符合查询条件的记录
/// </summary>
/// <param name="queryTerms">自定义查询条件</param>
/// <returns>查询结果,封装了查询的数据信息</returns>
public static ResultModel GetCardUserList(QueryTerms queryTerms)
{
List<CardUser> cardUserList = new List<CardUser>();
OperationLog log = new OperationLog();
int totalCount = 0;
ResultModel result = new ResultModel();
try
{
log.AddTime = DateTime.Now;
log.IsSuccessId = SymbolicConstant.ISSUCCESS_TRUE;
log.OperationLogId = System.Guid.NewGuid().ToString("N");
log.OperationContent = SymbolicConstant.OPERATIONCONTENT_GETLIST;
log.OperationTable = typeof(CardUser).Name;
log.OperationTypeCode =SymbolicConstant.OPERATIONTYPE_GETLIST;
log.ResultCode = SymbolicConstant.RESULTCODE_GETLIST_SUCCESS;
log.ResultMessage=SymbolicConstant.RESULTMESSAGE_GETLIST_SUCCESS;
log.UserId = CurrentSession.getUser().UserId;
cardUserList = (List<CardUser>)(CardUserDal.GetList(queryTerms));
totalCount=Convert.ToInt32(SystemUserDal.GetTotalCount(queryTerms));
log.TotalCount = totalCount;
result.Data = cardUserList;
result.DataSize = totalCount;
result.IsSuccess = true;
result.ResultCode = SymbolicConstant.RESULTCODE_GETLIST_SUCCESS;
result.ResultMessage = SymbolicConstant.RESULTMESSAGE_GETLIST_SUCCESS;
return result;
}
catch (Exception exception)
{
log.ResultCode = SymbolicConstant.RESULTCODE_GETLIST_ERROR;
log.IsSuccessId = SymbolicConstant.ISSUCCESS_FALSE;
log.ResultMessage=exception.Message;
result.IsSuccess = false;
result.ResultCode = SymbolicConstant.RESULTCODE_GETLIST_ERROR;
result.ResultMessage = exception.Message;
return result;
}
finally
{
OperationLogBll.Insert(log);
}
}
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:53,代码来源:CardUserBll.cs
示例7: DeleteAll
/// <summary>
/// 删除数据库CardUser表中的所有记录
/// </summary>
/// <returns>删除结果,包括是删除成功、删除的记录数等信息</returns>
public static ResultModel DeleteAll()
{
OperationLog log = new OperationLog();
ResultModel result = new ResultModel();
try
{
log.AddTime = DateTime.Now;
log.IsSuccessId = SymbolicConstant.ISSUCCESS_TRUE;
log.OperationLogId = System.Guid.NewGuid().ToString("N");
log.OperationContent = SymbolicConstant.OPERATIONCONTENT_DELETEALL;
log.OperationTable = typeof(CardUser).Name;
log.OperationTypeCode = SymbolicConstant.OPERATIONTYPE_DELETEALL;
log.ResultCode = SymbolicConstant.RESULTCODE_DELETEALL_SUCCESS;
log.ResultMessage=SymbolicConstant.RESULTMESSAGE_DELETEALL_SUCCESS;
log.UserId = CurrentSession.getUser().UserId;
//删除的记录数
int count=(int)WebPageDal.DeleteAll();
log.TotalCount = count;
result.DataSize = count;
result.IsSuccess = true;
result.ResultCode = SymbolicConstant.RESULTCODE_DELETEALL_SUCCESS;
result.ResultMessage=SymbolicConstant.RESULTMESSAGE_DELETEALL_SUCCESS;
return result;
}
catch (Exception exception)
{
log.IsSuccessId = SymbolicConstant.ISSUCCESS_FALSE;
log.ResultCode = SymbolicConstant.RESULTCODE_DELETEALL_ERROR;
log.ResultMessage=exception.Message;
result.IsSuccess = false;
result.ResultCode = SymbolicConstant.RESULTCODE_DELETEALL_ERROR;
result.ResultMessage = exception.Message;
return result;
}
finally
{
OperationLogBll.Insert(log);
}
}
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:48,代码来源:CardUserBll.cs
示例8: Update
/// <summary>
/// 修改某条记录
/// </summary>
/// <param name="user">要修改记录对应的实体</param>
/// <returns>修改结果,包括是否修改成功、记录主键等信息</returns>
public static ResultModel Update(ServiceItem serviceItem)
{
OperationLog log = new OperationLog();
ResultModel result = new ResultModel();
try
{
log.AddTime = DateTime.Now;
log.IsSuccessId = SymbolicConstant.ISSUCCESS_TRUE;
log.OperationLogId = System.Guid.NewGuid().ToString("N");
log.OperationContent = SymbolicConstant.OPERATIONCONTENT_UPDATE;
log.OperationTable = typeof(ServiceItem).Name;
log.OperationTypeCode = SymbolicConstant.OPERATIONTYPE_UPDATE;
log.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_SUCCESS;
log.ResultMessage=SymbolicConstant.RESULTMESSAGE_UPDATE_SUCCESS;
log.UserId = CurrentSession.getUser().UserId;
log.ObjectRecordId = serviceItem.ItemId;
ServiceItemDal.Update(serviceItem);
result.IsSuccess = true;
result.ObjectRecordId = serviceItem.ItemId;
result.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_SUCCESS;
result.ResultMessage = SymbolicConstant.RESULTMESSAGE_UPDATE_SUCCESS;
return result;
}
catch (Exception exception)
{
log.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_ERROR;
log.IsSuccessId = SymbolicConstant.ISSUCCESS_FALSE;
log.ResultMessage=exception.Message;
result.IsSuccess = false;
result.ObjectRecordId =serviceItem.ItemId;
result.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_ERROR;
result.ResultMessage = exception.Message;
return result;
}
finally
{
OperationLogBll.Insert(log);
}
}
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:51,代码来源:ServiceItemBll.cs
示例9: Insert
public static ResultModel Insert(OperationLog log)
{
ResultModel result = new ResultModel();
object id = "";
try
{
OperationLogDal.Insert(log);
result.IsSuccess = true;
result.ObjectRecordId = id.ToString();
result.ResultCode = SymbolicConstant.RESULTCODE_INSERT_SUCCESS;
return result;
}
catch (Exception exception)
{
result.ResultCode = SymbolicConstant.RESULTCODE_INSERT_ERROR;
result.IsSuccess = false;
result.ResultMessage = exception.Message;
return result;
}
}
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:21,代码来源:OperationLogBll.cs
示例10: Update
public static ResultModel Update(OperationLog log)
{
ResultModel result = new ResultModel();
object id = new object();
try
{
OperationLogDal.Update(log);
result.IsSuccess = true;
result.ObjectRecordId = log.OperationLogId;
result.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_SUCCESS;
return result;
}
catch (Exception exception)
{
result.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_ERROR;
result.IsSuccess = false;
result.ResultMessage = exception.Message;
return result;
}
}
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:20,代码来源:OperationLogBll.cs
示例11: GetConsultationById
/// <summary>
/// 根据主键查询指定记录
/// </summary>
/// <param name="userId">主键</param>
/// <returns>查询结果,封装了查询出的实体</returns>
public static ResultModel GetConsultationById(string consultationId)
{
OperationLog log = new OperationLog();
Consultation consultation = new Consultation();
ResultModel result = new ResultModel();
try
{
consultation = ConsultationDal.GetModel(consultationId);
log.AddTime = DateTime.Now;
log.OperationLogId = System.Guid.NewGuid().ToString("N");
log.OperationTypeCode = SymbolicConstant.OPERATIONTYPE_GETMODEL;
log.OperationContent = SymbolicConstant.OPERATIONCONTENT_GETMODEL;
log.OperationTable = typeof(Consultation).Name;
log.ObjectRecordId = consultationId;
log.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_SUCCESS;
log.ResultMessage=SymbolicConstant.RESULTMESSAGE_GETMODEL_SUCCESS;
log.UserId = CurrentSession.getUser().UserId;
log.IsSuccessId = SymbolicConstant.ISSUCCESS_TRUE;
result.Data = consultation;
result.IsSuccess = true;
result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_SUCCESS;
result.ResultMessage=SymbolicConstant.RESULTMESSAGE_GETMODEL_SUCCESS;
return result;
}
catch (Exception exception)
{
log.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_ERROR;
log.IsSuccessId = SymbolicConstant.ISSUCCESS_FALSE;
log.ResultMessage=exception.Message;
result.IsSuccess = false;
result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_ERROR;
result.ResultMessage = exception.Message;
return result;
}
finally
{
OperationLogBll.Insert(log);
}
}
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:49,代码来源:ConsultationBll.cs
示例12: Update
/// <summary>
/// 修改OperationLog表中的某条记录
/// </summary>
/// <param name="user">要修改记录对应的实体</param>
public static void Update(OperationLog operationLog)
{
DataAccessUtility.Update<OperationLog>(operationLog);
}
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:8,代码来源:OperationLogDal.cs
示例13: Insert
/// <summary>
/// 插入一条新记录
/// </summary>
/// <param name="operationLog">OperationLog实体</param>
/// <returns>插入记录的主键</returns>
public static object Insert(OperationLog operationLog)
{
Object id = DataAccessUtility.Insert<OperationLog>(operationLog);
return id;
}
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:10,代码来源:OperationLogDal.cs
示例14: Delete
/// <summary>
/// 删除OperationLog表中的某条记录
/// </summary>
/// <param name="user">要删除记录的对应的实体</param>
public static void Delete(OperationLog operationLog)
{
DataAccessUtility.Delete<OperationLog>(operationLog);
}
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:8,代码来源:OperationLogDal.cs
注:本文中的HelMagEntity.OperationLog类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论