public EntityEmpresa SelectByKey(KeyEmpresa oKeyEmpresa) { try { return(EmpresaApp.SelectByKey(oKeyEmpresa)); } catch (Exception) { throw new FaultException("Error al seleccionar Empresas"); } }
public EntityEmpresa SelectByKey(KeyEmpresa oKeyEmpresa) { try { return(EmpresaService.SelectByKey(oKeyEmpresa)); } catch (Exception ex) { throw ex; } }
public EntityEmpresa SelectByKey(KeyEmpresa oKeyEmpresa, CTransaction oCTransaction) { try { DataEmpresaRepository data = new DataEmpresaRepository(EntityEmpresa.Empty, "empresa"); return(data.SelectByKey(oKeyEmpresa, oCTransaction)); } catch (Exception ex) { throw ex; } }
public EntityEmpresa SelectByKey(KeyEmpresa oKeyEmpresa, CTransaction oCTransaction) { DataProcedure run = new DataProcedure(); run.CollectionParams.AddInputParameter("IDEmpresa", oKeyEmpresa.IDEmpresa); using (IDataReader reader = run.ExecuteReader(oCTransaction, Procedimientos.Empresa_Select)) { if (reader.Read()) { return(EntityEmpresa.Create(reader)); } } return(EntityEmpresa.Empty); }
public EntityEmpresa Insert(EntityEmpresa oEntityEmpresa, CTransaction oCTransaction) { try { DataEmpresaRepository data = new DataEmpresaRepository(oEntityEmpresa, "empresa"); oEntityEmpresa = data.Insert(oCTransaction); KeyEmpresa key = new KeyEmpresa(DataCreator.CreateInt32(data.CollectionParams.GetParameter("IDEmpresa").Value)); oEntityEmpresa.Key = key; return(oEntityEmpresa); } catch (Exception ex) { throw ex; } }
public ActionResult Edit(KeyEmpresa oKey) { EmpresaServicesController oServices = new EmpresaServicesController(); UsuarioServicesController oUsuarioServices = new UsuarioServicesController(); EmpresaViewModel oEmpresaViewModel = new EmpresaViewModel(); EntityEmpresa oEntityEmpresa = oServices.SelectByKey(oKey); oEmpresaViewModel.EntityEmpresa = oEntityEmpresa; oEmpresaViewModel.ListTipoEmpresa = oServices.SelectTipoEmpresa( new EntityTipoEmpresa { Key = new KeyTipoEmpresa { IDTipoEmpresa = Constantes.UnoNegativo }, Estado = Constantes.Activo }); return(PartialView(Constantes.EmpresaEdit, oEmpresaViewModel)); }
public EntityEmpresa( Keys.KeyEmpresa okey, String oCodigoEmpresa, String oRazonComercial, String oRazonSocial, String oRuc, String oTelefono, String oContacto, String oDireccion, Int32 oIdTipoEmpresa, Int32 oEstado) { this.key = okey; this.codigoEmpresa = oCodigoEmpresa; this.razonComercial = oRazonComercial; this.razonSocial = oRazonSocial; this.ruc = oRuc; this.telefono = oTelefono; this.direccion = oDireccion; this.idTipoEmpresa = oIdTipoEmpresa; this.estado = oEstado; }
public ActionResult InnerEdit(KeyEmpresa key) { return(Edit(key)); }