/// <summary> /// 获取报警类型 /// </summary> /// <param name="Id"></param> /// <returns></returns> public BaseReportTypeModel GetArchiveType(int Id) { try { BaseReportTypeModel ReportType = baseReportTypeDAL.GetEntity(Id); return(ReportType); } catch (Exception ex) { throw ex; } }
/// <summary> /// 根据名称获取id /// </summary> /// <param name="name"></param> /// <returns></returns> public BaseReportTypeModel GetArchiveTypeInfo(string name) { try { BaseReportTypeModel ReportTypInfo = mapContext.QueryForObject <BaseReportTypeModel>("GetArchiveTypeInfo", name); return(ReportTypInfo); } catch (Exception ex) { throw ex; } }
/// <summary> /// 根据id 获取名称 /// </summary> /// <param name="id"></param> /// <returns></returns> public BaseReportTypeModel GetEntity(int id) { try { BaseReportTypeModel ReportTypInfo = mapContext.QueryForObject <BaseReportTypeModel>("GetBaseReportTypeById", id); return(ReportTypInfo); } catch (Exception ex) { throw ex; } }
/// <summary> /// 根据类型名称查id /// </summary> /// <param name="TypeName"></param> /// <returns></returns> public int GetArchiveTypeInfo(string TypeName) { try { int reportType = 0; BaseReportTypeModel ReportType = baseReportTypeDAL.GetArchiveTypeInfo(TypeName); if (ReportType != null) { reportType = ReportType.id; } return(reportType); } catch (Exception ex) { throw ex; } }
public int UpdateReportTypeById(BaseReportTypeModel model) { int result = mapContext.Update("UpdateReportType", model); return(result); }
public int AddEntity(BaseReportTypeModel entity) { int id = (int)mapContext.Insert("InsertReportType", entity); return(id); }
public bool UpdateEntity(int id, BaseReportTypeModel newentity) { throw new NotImplementedException(); }