This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace RefactorView.Infraestructure.Html | |
{ | |
public struct Size | |
{ | |
public Size(byte lg,byte md,byte sm,byte xs) | |
{ | |
this.Lg = lg; | |
this.Md = md; | |
this.Sm = sm; | |
this.Xs = xs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model RefactorView.Infraestructure.Html.FormControl | |
<div class="form-group"> | |
@Model.Label | |
<div class="@Model.ContainerSize"> | |
@Model.Control | |
@Model.Validation | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq.Expressions; | |
using System.Web.Mvc; | |
using System.Web.Mvc.Html; | |
namespace RefactorView.Infraestructure.Html | |
{ | |
public static class BootstrapHelpers | |
{ | |
private const string PartialBaseFolder = "~/Views/Shared/Controls/"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model RefactorView.Models.Product | |
@{ | |
ViewBag.Title = "Nuevo"; | |
var controlSize = new Size(10,10,6,12); | |
} | |
<h2>Nuevo</h2> | |
@using (Html.BeginForm()) | |
{ | |
@Html.AntiForgeryToken() | |
<div class="form-horizontal"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model AspMvcDemo.Models.FormModel | |
@{ | |
ViewBag.Title = "Index"; | |
var types = ViewBag.TypesList as List<SelectListItem>; | |
var subtypes = ViewBag.SubTypesList as List<SelectListItem>; | |
} | |
<div class="row"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).on('change', '[data-cascade-combo]', function (event) { | |
var id = $(this).attr('data-cascade-combo'); | |
var url = $(this).attr('data-cascade-combo-source'); | |
var paramName = $(this).attr('data-cascade-combo-param-name'); | |
var data = {}; | |
data[paramName] = id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web.Mvc; | |
using AspMvcDemo.Models; | |
namespace AspMvcDemo.Controllers | |
{ | |
public class HomeController : Controller | |
{ | |
// GET: Home |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
using Microsoft.AspNet.Identity; | |
namespace MVCDesdeCero.Security | |
{ | |
public class EmailService : IEmailService | |
{ | |
public Task SendAsync(IdentityMessage message) | |
{ | |
// Plug in your email service here to send an email. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
using Microsoft.AspNet.Identity; | |
namespace MVCDesdeCero.Security | |
{ | |
public class SmsService: ISmsService | |
{ | |
public Task SendAsync(IdentityMessage message) | |
{ | |
// Plug in your SMS service here to send a text message. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.AspNet.Identity; | |
using Microsoft.AspNet.Identity.Owin; | |
using Microsoft.Owin; | |
namespace MVCDesdeCero.Security | |
{ | |
public class AppUserManager: UserManager<AppUser> | |
{ | |
public AppUserManager(IUserStore<AppUser> store) : base(store) |