示例#1
0
 /// <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;
     }
 }
示例#2
0
 /// <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;
     }
 }
示例#3
0
 /// <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;
     }
 }
示例#4
0
 /// <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;
     }
 }
示例#5
0
        public int UpdateReportTypeById(BaseReportTypeModel model)
        {
            int result = mapContext.Update("UpdateReportType", model);

            return(result);
        }
示例#6
0
        public int AddEntity(BaseReportTypeModel entity)
        {
            int id = (int)mapContext.Insert("InsertReportType", entity);

            return(id);
        }
示例#7
0
 public bool UpdateEntity(int id, BaseReportTypeModel newentity)
 {
     throw new NotImplementedException();
 }