Ejemplo n.º 1
0
 public void Update(EMVehicleGroup entity)
 {
     IList<EMVehicleGroup> list = Select(entity.TenantCode, entity.GroupName);
     if (list != null && list.Count > 0 && list[0].GroupID != entity.GroupID)
     {
         throw new Exception("已经有相同的名称的车辆组");
     }
     using (IRepository repository = SessionManager.CreateRepository(typeof(EMVehicleGroup)))
     {
         repository.Update(entity);
     }
 }
Ejemplo n.º 2
0
 public void Delete(EMVehicleGroup entity)
 {
     using (IRepository repository = SessionManager.CreateRepository(typeof(EMVehicleGroup)))
     {
         repository.Delete(entity);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 保存车辆组
 /// </summary>
 /// <param name="entity"></param>
 /// <param name="userName"></param>
 /// <returns></returns>
 public DBProcessResult SaveVehicleGroup(EMVehicleGroup entity)
 {
     EMVehicleGroupService service = new EMVehicleGroupService();
     DBProcessResult result = new DBProcessResult();
     try
     {
         service.Update(entity);
         result.IsSuccess = true;
     }
     catch (Exception ex)
     {
         result.IsSuccess = false;
         result.Message = ex.Message;
     }
     return result;
 }