예제 #1
0
        public ServReportSuspectModel GetEntity(int id)
        {
            ServReportSuspectModel model = new ServReportSuspectModel();

            try
            {
                model = mapContext.QueryForList <ServReportSuspectModel>("GetReportSuspectById", id).FirstOrDefault();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(model);
        }
예제 #2
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        /// <param name="model"></param>
        public int UpdateReportSuspectById(ServReportSuspectModel model)
        {
            int result = mapContext.Update("UpdateReportSuspect", model);

            return(result);
        }
예제 #3
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        /// <param name="entity"></param>
        public int AddEntity(ServReportSuspectModel entity)
        {
            int id = (int)mapContext.Insert("InsertReportSuspect", entity);

            return(id);
        }
예제 #4
0
 public bool UpdateEntity(int id, ServReportSuspectModel newentity)
 {
     throw new NotImplementedException();
 }