public HomeViewModel() { _logic = new EmpresaLogic(); _loginLogic = new LoginLogic(); IsWaiting = true; var login = _loginLogic.Get(); IsWaiting = false; if (login == null) { List(); } else { Init(login); } }
public ActionResult RenderLogoEmpresa() { // -- Obtengo usuario var usuario = SessionManager.Get <Usuario>(Global.SessionsKeys.USER_SESSION); // -- Obtengo empresa EmpresaLogic empresaLogic = new EmpresaLogic(); var empresa = empresaLogic.GetByID(usuario.Empresa.EntityID); string appPath = HttpContext.Server.MapPath("~/Imagenes/LogosEmpresas/" + empresa.Imagen); // -- Valido que exista imagen de la empresa if (System.IO.File.Exists(appPath)) { // -- Si existe la devuelvo return(PartialView("_RenderLogoEmpresa", "/Imagenes/LogosEmpresas/" + empresa.Imagen)); } else { // -- Si no existe muestro la de fortius return(PartialView("_RenderLogoEmpresa", "/Imagenes/header-logo-fortius.png")); } }
public EmpresaLogic Obtener(float codigo) { EmpresaLogic entidadLogic = new EmpresaLogic(); try { SQLServer.OpenConection(); SQLServer.CreateCommand("SEG.USP_SEL_EMPRESA_OBTENER", CommandType.StoredProcedure, SQLServer.CreateParameter("CODIGO_EMPRESA", SqlDbType.BigInt, codigo)); using (IDataReader oReader = SQLServer.GetDataReader(CommandBehavior.CloseConnection)) { entidadLogic = new GenericInstance <EmpresaLogic>().readDataReader(oReader); } } catch (Exception ex) { throw ex; } finally { SQLServer.CloseConection(); } return(entidadLogic); }
public EmpresaController(IConfiguration configuration) { _empresaLogic = new EmpresaLogic(configuration); }
public Int32 RegistrarEmpresa(EmpresaDC objDC) { EmpresaLogic objBC = new EmpresaLogic(); return objBC.Empresa_Registrar(objDC); }
public EmpresaCollectionDC ListarEmpresaXRazonSocialXRUC(EmpresaDC objDC) { EmpresaLogic objBC = new EmpresaLogic(); return EmpresaTL.TranslateEmpresaXRazonSocialXRUCToEmpresaCollectionDC(objBC.Empresa_ListarXRazonSocialXRUC(objDC.RazonSocial, objDC.RUC)); }
public EmpresasController() { _logic = new EmpresaLogic(); }
public ParceirosViewModel() { _logic = new EmpresaLogic(); List(); }