This file contains hidden or 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
Update all packages in a single project | |
Update-Package -Project MvcApplication1 | |
--------------------------------------------- | |
Update a package in all projects | |
Update-Package PackageId | |
--------------------------------------------- | |
Update all packages in all projects |
This file contains hidden or 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
https://github.com/loadfive/knwl.js | |
http://codigofonte.uol.com.br/artigos/30-plugins-de-jquery-e-ajax-para-autocomplete ////// http://xilinus.com/jquery-addresspicker/demos/index.html -- autocomplete para endereços com googleMaps | |
http://postmon.com.br/ - buscar endereço pelo cep com código do IBGE | |
http://evenancio.wordpress.com/2011/09/29/consulta-de-cep-gratuita-com-o-google-maps-api/ - buscar cep ou achar o cep através do endereço via WCF com .net | |
helvética - fonte mais usada no mundo | |
http://www.myfonts.com/WhatTheFont/ |
This file contains hidden or 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
//1 : 1 | |
public class Produto | |
{ | |
[Key] | |
public int Id {get;set;} | |
[ForeignKey("Categoria")] | |
public int CategoriaId {get;set;} | |
/*Outros atributos*/ |
This file contains hidden or 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
$.ajaxSettings.traditional = true; // <-- Important | |
$('#btn').click(function () { | |
var array = []; | |
var url = '/Controller/Action'; | |
$.post(url, { array : array }); | |
}); | |
}); |
This file contains hidden or 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.Collections.Generic; | |
using System.Linq.Expressions; | |
using System.Web.Mvc; | |
using System.Web.Mvc.Html; | |
namespace HtmlHelpers | |
{ | |
public static class HtmlHelperExtensions | |
{ |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<root> | |
<!-- | |
Microsoft ResX Schema | |
Version 2.0 | |
The primary goals of this format is to allow a simple XML format | |
that is mostly human readable. The generation and parsing of the | |
various data types are done through the TypeConverter classes |
This file contains hidden or 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
<configuration> | |
<system.web> | |
<customErrors mode="Off"/> | |
</system.web> | |
</configuration> |
This file contains hidden or 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
if (string.IsNullOrEmpty(input)) | |
return ""; | |
else | |
{ | |
var bytes = System.Text.Encoding.GetEncoding("iso-8859-8").GetBytes(input); | |
return System.Text.Encoding.UTF8.GetString(bytes); | |
} |
This file contains hidden or 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
Marcador: Significado | |
TODO: Elementos ainda não implementados | |
FIXME: Código que sabidamente apresenta problemas | |
HACK: Solução admitante deselegante para um problema | |
XXX: Perigo! Há um grande problema aqui |
This file contains hidden or 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
public class DecimalModelBinder : IModelBinder | |
{ | |
public object BindModel(ControllerContext controllerContext, | |
ModelBindingContext bindingContext) | |
{ | |
ValueProviderResult valueResult = bindingContext.ValueProvider | |
.GetValue(bindingContext.ModelName); | |
ModelState modelState = new ModelState { Value = valueResult }; | |
object actualValue = null; | |
try |