/** 版本信息模板在安装目录下,可自行修改。 * pow_user_exam.cs * * 功 能: N/A * 类 名: pow_user_exam * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── * V0.01 2022/8/3 11:04:16 N/A 初版 * * Copyright (c) 2012 Maticsoft Corporation. All rights reserved. *┌──────────────────────────────────┐ *│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ *│ 版权所有:动软卓越(北京)科技有限公司              │ *└──────────────────────────────────┘ */ using System; using System.Data; using System.Collections.Generic; using Maticsoft.Common; using Competition.Mysql.Model; namespace Competition.Mysql.BLL { /// /// pow_user_exam /// public partial class pow_user_exam { private readonly Competition.Mysql.DAL.pow_user_exam dal = new Competition.Mysql.DAL.pow_user_exam(); public pow_user_exam() { } #region BasicMethod /// /// 是否存在该记录 /// public bool Exists(string UserExamId) { return dal.Exists(UserExamId); } /// /// 增加一条数据 /// public bool Add(Competition.Mysql.Model.pow_user_exam model) { return dal.Add(model); } /// /// 更新一条数据 /// public bool Update(Competition.Mysql.Model.pow_user_exam model) { return dal.Update(model); } /// /// 删除一条数据 /// public bool Delete(string UserExamId) { return dal.Delete(UserExamId); } /// /// 删除一条数据 /// public bool DeleteList(string UserExamIdlist) { return dal.DeleteList(UserExamIdlist); } /// /// 得到一个对象实体 /// public Competition.Mysql.Model.pow_user_exam GetModel(string UserExamId) { return dal.GetModel(UserExamId); } /// /// 得到一个对象实体,从缓存中 /// public Competition.Mysql.Model.pow_user_exam GetModelByCache(string UserExamId) { string CacheKey = "pow_user_examModel-" + UserExamId; object objModel = Maticsoft.Common.DataCache.GetCache(CacheKey); if (objModel == null) { try { objModel = dal.GetModel(UserExamId); if (objModel != null) { int ModelCache = Maticsoft.Common.ConfigHelper.GetConfigInt("ModelCache"); Maticsoft.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero); } } catch { } } return (Competition.Mysql.Model.pow_user_exam)objModel; } /// /// 获得数据列表 /// public DataSet GetList(string strWhere) { return dal.GetList(strWhere); } /// /// 获得数据列表 /// public List GetModelList(string strWhere) { DataSet ds = dal.GetList(strWhere); return DataTableToList(ds.Tables[0]); } /// /// 获得数据列表 /// public List DataTableToList(DataTable dt) { List modelList = new List(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { Competition.Mysql.Model.pow_user_exam model; for (int n = 0; n < rowsCount; n++) { model = dal.DataRowToModel(dt.Rows[n]); if (model != null) { modelList.Add(model); } } } return modelList; } /// /// 获得数据列表 /// public DataSet GetAllList() { return GetList(""); } /// /// 分页获取数据列表 /// public int GetRecordCount(string strWhere) { return dal.GetRecordCount(strWhere); } /// /// 分页获取数据列表 /// public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex) { return dal.GetListByPage(strWhere, orderby, startIndex, endIndex); } /// /// 分页获取数据列表 /// //public DataSet GetList(int PageSize,int PageIndex,string strWhere) //{ //return dal.GetList(PageSize,PageIndex,strWhere); //} #endregion BasicMethod #region ExtensionMethod /// /// 更新一条数据 /// public bool UpdateExaminationDuration(string UserExamId, string ExaminationDuration) { return dal.UpdateExaminationDuration(UserExamId, ExaminationDuration); } /// /// 更新场景设备状态 /// public bool UpdateRestoreSceneMsg(string UserExamId, string RestoreSceneMsg) { return dal.UpdateRestoreSceneMsg(UserExamId, RestoreSceneMsg); } /// /// 更新考试时间 /// public bool UpdateUserExamTime(string UserExamId) { return dal.UpdateUserExamTime(UserExamId); } /// /// 更新考试环节 /// /// 用户考试id /// 考试环节 /// public bool UpdateExaminationLink(string UserExamId, string ExaminationLink) { return dal.UpdateExaminationLink(UserExamId, ExaminationLink); } /// /// 更新巡线验电结果 /// /// 用户考试id /// public bool UpdateExamLineElectricity(string UserExamId) { return dal.UpdateExamLineElectricity(UserExamId); } /// /// 更新排故验电结果 /// /// 用户考试id /// public bool UpdateExamFaultElectricity(string UserExamId) { return dal.UpdateExamFaultElectricity(UserExamId); } /// /// 更新巡检爬杆结果 /// /// 用户考试id /// public bool UpdateClimbrod(string UserExamId) { return dal.UpdateClimbrod(UserExamId); } /// /// 更新未分闸状态拉合熔芯结果 /// /// 用户考试id /// public bool UpdateExamFusibleCore(string UserExamId) { return dal.UpdateExamFusibleCore(UserExamId); } /// /// 更新围栏结果 /// /// 用户考试id /// public bool UpdateExamEnclosure(string UserExamId, string EnclosureIsScore) { return dal.UpdateExamEnclosure(UserExamId, EnclosureIsScore); } /// /// 使用事务批量操作新增 /// /// public int OperationAddAllData(Competition.Mysql.Model.pow_user_exam user_exam_model, List tool_list, Competition.Mysql.Model.pow_achievement achievement_model, List exam_fault_list, List list_operation_ticket) { return dal.OperationAddAllData(user_exam_model, tool_list, achievement_model, exam_fault_list, list_operation_ticket); } /// /// 使用事务批量操作新增 /// /// public int OperationUpdateAllData(DateTime end_time, string status, string user_exam_id, string achievement_id, decimal? total_score, List details_list, Competition.Mysql.Model.pow_train_record record_model) { return dal.OperationUpdateAllData(end_time, status, user_exam_id, achievement_id, total_score, details_list, record_model); } /// /// 使用事务批量操作删除 /// /// public int OperationDelAllData() { return dal.OperationDelAllData(); } /// /// 使用事务批量操作删除 /// /// 考试id /// 考生id /// 成绩id /// public int OperationDelData(string exam_id, string user_id, string achievement_id) { return dal.OperationDelData(exam_id, user_id, achievement_id); } #endregion ExtensionMethod } }