Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Josue Jimenez committed Sep 10, 2024
0 parents commit 7d47c82
Show file tree
Hide file tree
Showing 252 changed files with 89,592 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Lab02_MVC_Chambilla_B.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.33328.57
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lab02_MVC_Chambilla_B", "Lab02_MVC_Chambilla_B\Lab02_MVC_Chambilla_B.csproj", "{66D63398-A5EE-43C1-A719-0C308BEBF409}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{66D63398-A5EE-43C1-A719-0C308BEBF409}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66D63398-A5EE-43C1-A719-0C308BEBF409}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66D63398-A5EE-43C1-A719-0C308BEBF409}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66D63398-A5EE-43C1-A719-0C308BEBF409}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D7849DDD-C54A-43F8-A819-49C80B1B6659}
EndGlobalSection
EndGlobal
23 changes: 23 additions & 0 deletions Lab02_MVC_Chambilla_B/App_Start/RouteConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Lab02_MVC_Chambilla_B
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
}
18 changes: 18 additions & 0 deletions Lab02_MVC_Chambilla_B/Content/Site.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
body {
padding-top: 50px;
padding-bottom: 20px;
}

/* Set padding to keep content from hitting the edges */
.body-content {
padding-left: 15px;
padding-right: 15px;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
max-width: 280px;
}

52 changes: 52 additions & 0 deletions Lab02_MVC_Chambilla_B/Controllers/DispensadorController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using System;
using System.Web.Mvc;
using Lab02_MVC_Chambilla_B.Models;

namespace Lab02_MVC_Chambilla_B.Controllers
{
public class DispensadorController : Controller
{
// GET: Dispensador
public ActionResult Index()
{
return View();
}

[HttpPost]
public ActionResult CalcularBilletes(ClsDispensador objDispensador)
{
if (objDispensador.monto > 0)
{
// Restante del residuo de cada denominación
objDispensador.b100 = (int)(objDispensador.monto / 100);
objDispensador.b50 = (int)((objDispensador.monto % 100) / 50);
objDispensador.b20 = (int)((objDispensador.monto % 100 % 50) / 20);
objDispensador.b10 = (int)((objDispensador.monto % 100 % 50 % 20) / 10);

objDispensador.m5 = (int)((objDispensador.monto % 100 % 50 % 20 % 10) / 5);
objDispensador.m2 = (int)((objDispensador.monto % 100 % 50 % 20 % 10 % 5) / 2);
objDispensador.m1 = (int)((objDispensador.monto % 100 % 50 % 20 % 10 % 5 % 2) / 1);

objDispensador.c05 = (objDispensador.monto % 100 % 50 % 20 % 10 % 5 % 2 % 1) / 0.5;
objDispensador.c02 = (objDispensador.monto % 100 % 50 % 20 % 10 % 5 % 2 % 1 % 0.5) / 0.2;
objDispensador.c01 = (objDispensador.monto % 100 % 50 % 20 % 10 % 5 % 2 % 1 % 0.5 % 0.2) / 0.1;

// Total de billetes
objDispensador.cantidad = objDispensador.b100 + objDispensador.b50 + objDispensador.b20 + objDispensador.b10 + objDispensador.m5 + objDispensador.m2 + objDispensador.m1;

objDispensador.cantidadb = objDispensador.b100 + objDispensador.b50 + objDispensador.b20 + objDispensador.b10;

objDispensador.cantidadm = objDispensador.m5 + objDispensador.m2 + objDispensador.m1;

objDispensador.cantidadc = objDispensador.c05 + objDispensador.c02 + objDispensador.c01;

return View("CalcularBilletes", objDispensador);
}
else
{
ModelState.AddModelError("", "Ingrese un monto correcto");
return View("Index", objDispensador);
}
}
}
}
84 changes: 84 additions & 0 deletions Lab02_MVC_Chambilla_B/Controllers/PersonaController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Lab02_MVC_Chambilla_B.Models;

namespace Lab02_MVC_Chambilla_B.Controllers
{
public class PersonaController : Controller
{
// GET: Persona
public ActionResult MostrarUno()
{
ClsPersona objPersona = new ClsPersona();

objPersona.DNI = "12345678";
objPersona.Apellidos = "Chambilla Zuñiga";
objPersona.Nombre = "Josue";
objPersona.edad = 21;
objPersona.Sexo = true;
objPersona.talla = 1.74;
objPersona.peso = 68;

return View(objPersona);
}
public ActionResult ListarTodos()
{
List<ClsPersona> List = new List<ClsPersona>();

ClsPersona objPersona1 = new ClsPersona();
objPersona1.DNI = "12345678";
objPersona1.Apellidos = "Chambilla Zuñiga";
objPersona1.Nombre = "Josue";
objPersona1.edad = 21;
objPersona1.Sexo = true;
objPersona1.talla = 1.74;
objPersona1.peso = 68;
List.Add(objPersona1);

ClsPersona objPersona2 = new ClsPersona();
objPersona2.DNI = "87654321";
objPersona2.Apellidos = "Torres Robledo";
objPersona2.Nombre = "Jose";
objPersona2.edad = 24;
objPersona2.Sexo = true;
objPersona2.talla = 1.70;
objPersona2.peso = 65;
List.Add(objPersona2);

ClsPersona objPersona3 = new ClsPersona();
objPersona3.DNI = "11223344";
objPersona3.Apellidos = "Reynaldo Tamo";
objPersona3.Nombre = "Ricardo";
objPersona3.edad = 30;
objPersona3.Sexo = true;
objPersona3.talla = 1.80;
objPersona3.peso = 74;
List.Add(objPersona3);

ClsPersona objPersona4 = new ClsPersona();
objPersona4.DNI = "44332211";
objPersona4.Apellidos = "Santa Mora";
objPersona4.Nombre = "Lizbeth";
objPersona4.edad = 42;
objPersona4.Sexo = false;
objPersona4.talla = 1.65;
objPersona4.peso = 57;
List.Add(objPersona4);

ClsPersona objPersona5 = new ClsPersona();
objPersona5.DNI = "33221144";
objPersona5.Apellidos = "Conde Manzo";
objPersona5.Nombre = "Lisa";
objPersona5.edad = 18;
objPersona5.Sexo = false;
objPersona5.talla = 1.67;
objPersona5.peso = 60;
List.Add(objPersona5);

return View(List);
}
}
}
1 change: 1 addition & 0 deletions Lab02_MVC_Chambilla_B/Global.asax
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%@ Application Codebehind="Global.asax.cs" Inherits="Lab02_MVC_Chambilla_B.MvcApplication" Language="C#" %>
18 changes: 18 additions & 0 deletions Lab02_MVC_Chambilla_B/Global.asax.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Lab02_MVC_Chambilla_B
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RouteConfig.RegisterRoutes(RouteTable.Routes);
}
}
}
163 changes: 163 additions & 0 deletions Lab02_MVC_Chambilla_B/Lab02_MVC_Chambilla_B.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{66D63398-A5EE-43C1-A719-0C308BEBF409}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Lab02_MVC_Chambilla_B</RootNamespace>
<AssemblyName>Lab02_MVC_Chambilla_B</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Web.Razor">
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Web.Webpages">
<HintPath>..\packages\Microsoft.AspNet.Webpages.3.2.7\lib\net45\System.Web.Webpages.dll</HintPath>
</Reference>
<Reference Include="System.Web.Webpages.Deployment">
<HintPath>..\packages\Microsoft.AspNet.Webpages.3.2.7\lib\net45\System.Web.Webpages.Deployment.dll</HintPath>
</Reference>
<Reference Include="System.Web.Webpages.Razor">
<HintPath>..\packages\Microsoft.AspNet.Webpages.3.2.7\lib\net45\System.Web.Webpages.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Web.Helpers">
<HintPath>..\packages\Microsoft.AspNet.Webpages.3.2.7\lib\net45\System.Web.Helpers.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.Infrastructure">
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="System.Web.Mvc">
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform">
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="Content\Site.css" />
<Content Include="Global.asax" />
<Content Include="Web.config" />
</ItemGroup>
<ItemGroup>
<Compile Include="App_Start\RouteConfig.cs" />
<Compile Include="Controllers\DispensadorController.cs" />
<Compile Include="Controllers\PersonaController.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Models\ClsDispensador.cs" />
<Compile Include="Models\ClsPersona.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\web.config" />
<None Include="packages.config" />
<Content Include="Views\_ViewStart.cshtml" />
<Content Include="Views\Shared\_Layout.cshtml" />
<Content Include="Views\Persona\MostrarUno.cshtml" />
<Content Include="Views\Persona\ListarTodos.cshtml" />
<Content Include="Views\Dispensador\Index.cshtml" />
<Content Include="Views\Dispensador\CalcularBilletes.cshtml" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>
<None Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>50526</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:50526/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
Loading

0 comments on commit 7d47c82

Please sign in to comment.