Ejemplo n.º 1
0
 /// <summary>
 /// 获取单条数据
 /// </summary>
 /// <param name="predicate"></param>
 /// <returns></returns>
 public SeeDoctorHistory GetOne(Expression <Func <HR_SEEDOCTORHISTORY, bool> > predicate = null)
 {
     using (SeeDoctorHistoryDAL dal = new SeeDoctorHistoryDAL())
     {
         return(EntityToModel(dal.GetOne(predicate)));
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool Edit(SeeDoctorHistory model)
        {
            if (model == null)
            {
                return(false);
            }

            using (SeeDoctorHistoryDAL dal = new SeeDoctorHistoryDAL())
            {
                HR_SEEDOCTORHISTORY entity = ModelToEntity(model);
                return(dal.Edit(entity));
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public string Add(SeeDoctorHistory model)
        {
            if (model == null)
            {
                return(string.Empty);
            }

            using (SeeDoctorHistoryDAL dal = new SeeDoctorHistoryDAL())
            {
                HR_SEEDOCTORHISTORY entity = ModelToEntity(model);
                entity.HISTORYID = string.IsNullOrEmpty(model.HISTORYID) ? Guid.NewGuid().ToString("N") : model.HISTORYID;

                return(dal.Add(entity));
            }
        }