Exemplo n.º 1
0
 /// <summary>
 /// 根据ID获取系统参数表实体
 /// </summary>
 /// <param name="guid">主键ID</param>
 /// <returns>返回系统参数表实体</returns> 
 public SystemCode GetItemById(Guid guid)
 {
     SystemCode tem = new SystemCode();
     tem = Dal.Find<SystemCode>(SystemCode._.ID == guid);
     return tem;
 }
Exemplo n.º 2
0
 /// <summary>
 /// 是否存在相同编号,或名称
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public bool ExitCodeAndName(SystemCode entity)
 {
     return Dal.Exists<SystemCode>(SystemCode._.ID != entity.ID && (SystemCode._.Code == entity.Code || SystemCode._.Name == entity.Name));
 }