Skip to content

Commit

Permalink
Cambios por errores
Browse files Browse the repository at this point in the history
  • Loading branch information
Angel Arciniega committed Mar 3, 2017
1 parent dc52170 commit 69cdeb7
Show file tree
Hide file tree
Showing 18 changed files with 152 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Renova/Renova/Controllers/alumnoesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Web.Mvc;
using Renova.Models;

namespace RenoEnergy.Controllers
namespace Renova.Controllers
{
public class alumnoesController : Controller
{
Expand Down
2 changes: 1 addition & 1 deletion Renova/Renova/Controllers/asistenciasController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Web.Mvc;
using Renova.Models;

namespace RenoEnergy.Controllers
namespace Renova.Controllers
{
public class asistenciasController : Controller
{
Expand Down
22 changes: 22 additions & 0 deletions Renova/Renova/Models/RenoContext.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace Renova.Models
{
using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;

public partial class RenoContext : DbContext
{
public RenoContext()
: base("name=RenoContext")
{
}

public virtual DbSet<alumno> alumnos { get; set; }
public virtual DbSet<asistencia> asistencias { get; set; }

protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
}
}
}
48 changes: 48 additions & 0 deletions Renova/Renova/Models/alumno.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
namespace Renova.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;

[Table("alumnos")]
public partial class alumno
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public alumno()
{
asistencias = new HashSet<asistencia>();
}

[Key]
public int IDAlumno { get; set; }

[Required]
[StringLength(60)]
public string nombre { get; set; }

[Required]
[StringLength(100)]
public string apellidos { get; set; }

[Required]
[StringLength(75)]
public string universidad { get; set; }

[Required]
[StringLength(100)]
public string carrera { get; set; }

public int matricula { get; set; }

[Required]
[StringLength(100)]
public string correo { get; set; }

public DateTime? fechareg { get; set; }

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<asistencia> asistencias { get; set; }
}
}
41 changes: 41 additions & 0 deletions Renova/Renova/Models/asistencia.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
namespace Renova.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;

public partial class asistencia
{
[Key]
public int IDAsistencia { get; set; }

public int IDAlumno { get; set; }

public byte? A1 { get; set; }

public byte? A2 { get; set; }

public byte? A3 { get; set; }

public byte? A4 { get; set; }

public byte? A5 { get; set; }

public byte? A6 { get; set; }

public byte? A7 { get; set; }

public byte? A8 { get; set; }

public byte? A9 { get; set; }

public byte? A10 { get; set; }

[StringLength(55)]
public string estado { get; set; }

public virtual alumno alumno { get; set; }
}
}
15 changes: 14 additions & 1 deletion Renova/Renova/Renova.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,21 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Security" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
Expand Down Expand Up @@ -147,6 +155,9 @@
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Models\alumno.cs" />
<Compile Include="Models\asistencia.cs" />
<Compile Include="Models\RenoContext.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
Expand All @@ -160,6 +171,9 @@
<Content Include="ApplicationInsights.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="Properties\PublishProfiles\RenoEnergy2017 - FTP.pubxml" />
<None Include="Properties\PublishProfiles\RenoEnergy2017 - Web Deploy.pubxml" />
<None Include="Properties\PublishProfiles\samplewebfb - Web Deploy.pubxml" />
<None Include="Scripts\jquery-1.10.2.intellisense.js" />
<Content Include="Scripts\jquery-1.10.2.js" />
<Content Include="Scripts\jquery-1.10.2.min.js" />
Expand Down Expand Up @@ -198,7 +212,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
<Folder Include="Models\" />
</ItemGroup>
<ItemGroup>
<Content Include="fonts\glyphicons-halflings-regular.woff" />
Expand Down
2 changes: 1 addition & 1 deletion Renova/Renova/Views/alumnoes/Create.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model RenoEnergy.Models.alumno
@model Renova.Models.alumno
<h2>Registro</h2>


Expand Down
2 changes: 1 addition & 1 deletion Renova/Renova/Views/alumnoes/Delete.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model RenoEnergy.Models.alumno
@model Renova.Models.alumno

@{
ViewBag.Title = "Delete";
Expand Down
2 changes: 1 addition & 1 deletion Renova/Renova/Views/alumnoes/Details.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model RenoEnergy.Models.alumno
@model Renova.Models.alumno

@{
ViewBag.Title = "Details";
Expand Down
2 changes: 1 addition & 1 deletion Renova/Renova/Views/alumnoes/Edit.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model RenoEnergy.Models.alumno
@model Renova.Models.alumno

@{
ViewBag.Title = "Edit";
Expand Down
2 changes: 1 addition & 1 deletion Renova/Renova/Views/alumnoes/Index.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model IEnumerable<RenoEnergy.Models.alumno>
@model IEnumerable<Renova.Models.alumno>



Expand Down
2 changes: 1 addition & 1 deletion Renova/Renova/Views/asistencias/Create.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model RenoEnergy.Models.asistencia
@model Renova.Models.asistencia

@{
ViewBag.Title = "Create";
Expand Down
2 changes: 1 addition & 1 deletion Renova/Renova/Views/asistencias/Delete.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model RenoEnergy.Models.asistencia
@model Renova.Models.asistencia



Expand Down
2 changes: 1 addition & 1 deletion Renova/Renova/Views/asistencias/Details.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model RenoEnergy.Models.asistencia
@model Renova.Models.asistencia

<h2>Detalles</h2>

Expand Down
2 changes: 1 addition & 1 deletion Renova/Renova/Views/asistencias/Edit.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model RenoEnergy.Models.asistencia
@model Renova.Models.asistencia



Expand Down
2 changes: 1 addition & 1 deletion Renova/Renova/Views/asistencias/Index.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model IEnumerable<RenoEnergy.Models.asistencia>
@model IEnumerable<Renova.Models.asistencia>

@{
ViewBag.Title = "Index";
Expand Down
15 changes: 14 additions & 1 deletion Renova/Renova/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
https://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
Expand Down Expand Up @@ -58,4 +62,13 @@
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
</compilers>
</system.codedom>
</configuration>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<connectionStrings>
<add name="RenoContext" connectionString="data source=renovablesserver.database.windows.net;initial catalog=Renovables;user id=renoAdmin@renovablesserver;password=Renovables2017;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
1 change: 1 addition & 0 deletions Renova/Renova/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<packages>
<package id="Antlr" version="3.4.1.9004" targetFramework="net452" />
<package id="bootstrap" version="3.0.0" targetFramework="net452" />
<package id="EntityFramework" version="6.1.3" targetFramework="net452" />
<package id="jQuery" version="1.10.2" targetFramework="net452" />
<package id="jQuery.Validation" version="1.11.1" targetFramework="net452" />
<package id="Microsoft.ApplicationInsights" version="2.2.0" targetFramework="net452" />
Expand Down

0 comments on commit 69cdeb7

Please sign in to comment.