public bool CrearCT(string placa, int id) { bool resultado = false; try { BR.ConductoresXtaxis CT = new BR.ConductoresXtaxis(id, placa); db.ConductoresXtaxis.Add(CT); db.SaveChanges(); resultado = true; } catch (Exception) { throw; } return(resultado); }
public bool CrearProduccion(BR.Produccion produccion) { bool resultado = false; try { db.Produccion.Add(produccion); db.SaveChanges(); resultado = true; return(resultado); } catch (Exception ex) { throw ex; } }
public bool crearKilometraje(EN.Kilometrajes other) { bool resultado = false; try { BR.Kilometrajes kms = new BR.Kilometrajes(other.placa, other.kilometraje, other.fecha); db.Kilometrajes.Add(kms); db.SaveChanges(); resultado = true; } catch (Exception) { throw; } return(resultado); }
public bool CrearGastoV(EN.GastosVariables other) { bool resultado = false; try { BR.GastosVariables gastoVariable = new BR.GastosVariables(other.placa, other.descripcion, other.fecha, other.kilometraje, other.valor); db.GastosVariables.Add(gastoVariable); db.SaveChanges(); resultado = true; } catch (Exception) { throw; } return(resultado); }
public bool CrearLicencia(BR.Licencias other) { bool resultado = false; try { //Mapeo BR.Licencias lic = new BR.Licencias(other.Numero_pase, other.id_conductor, other.id_secretaria, other.categoria, other.expedicon, other.vencimiento); db.Licencias.Add(lic); db.SaveChanges(); resultado = true; } catch (Exception ex) { throw ex; } return(resultado); }
public bool Crear(EN.Soat other) { bool resultado = false; try { //Mapeo de EN a BR BR.Soat st = new BR.Soat(other.numero, other.placa_taxi, other.expedicion, other.expiracion, other.valor); //Insert en la bd db.Soat.Add(st); db.SaveChanges(); resultado = true; } catch (Exception) { throw; } return(resultado); }
public bool Crear(EN.Tecnomecanica other) { bool resultado = false; try { //Mapeo de EN a BR BR.Tecnomecanica tec = new BR.Tecnomecanica(other.placa, other.expedicion, other.vencimiento, other.valor); //Insert en la bd db.Tecnomecanica.Add(tec); db.SaveChanges(); resultado = true; } catch (Exception) { throw; } return(resultado); }
public bool Crear(EN.Responsabilidades other) { bool resultado = false; try { //Mapeo BR.Responsabilidades res = new BR.Responsabilidades(other.placa, other.poliza, other.aseguradora, other.vencimiento, other.valor); //Insert bd db.Responsabilidades.Add(res); db.SaveChanges(); resultado = true; } catch (Exception) { throw; } return(resultado); }
public bool Crear(EN.SeguridadSocial other, string cedula) { bool resultado = false; try { //Mapeo de EN BR BR.SeguridadSocial ss = new BR.SeguridadSocial(conductoresController.MostarIdConductor(cedula), other.pago_anterior, other.pago_siguiente, other.valor); //Inserte en la bd db.SeguridadSocial.Add(ss); db.SaveChanges(); resultado = true; } catch (Exception) { throw; } return(resultado); }
public bool Crear(EN.Toperacion other) { bool resultado = false; try { //Mapeo de entidad del negocio a la entidad de persistencia BR.Toperacion top = new BR.Toperacion(other.placa, other.vencimiento, other.valor); //Insert en la bd db.Toperacion.Add(top); db.SaveChanges(); resultado = true; } catch (Exception) { throw; } return(resultado); }
public bool CrearTaxi(EN.Taxis taxi) { bool resultado = false; try { //Mapeo de clases BR.Taxis tx = new BR.Taxis(taxi.placa, taxi.matricula, transitoController.MostrarSecretaria(taxi.transito), marcaController.MostrarMarca(taxi.marca), taxi.modelo, taxi.cilindraje, taxi.empresa_alfiliadora, taxi.avaluo); tx.avaluo = taxi.avaluo; tx.id_matricula = taxi.matricula; db.Taxis.Add(tx); db.SaveChanges(); resultado = true; } catch (Exception ex) { throw ex; } return(resultado); }
public bool CrearConductor(EN.Conductor conductor) { bool resultado = false; try { //Mapeo BR.Conductor other = new BR.Conductor(); other.apellido = conductor.apellido; other.cedula = conductor.cedula; other.nombre = conductor.nombre; other.telefono = conductor.telefono; //Persitencia db.Conductor.Add(other); db.SaveChanges(); resultado = true; } catch (Exception ex) { throw ex; } return(resultado); }