Skip to main content

Posts

Showing posts from July, 2014

Using jquery templates for adding form element dynamically in ASP.NET MVC

Hello friends. Today I wanna tell about some obstucles with validation which I've found when I had working with form. At first I've created two models for binding using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using DataAnnotationsExtensions; namespace DynamicForm.Models { public class FormViewModel { public int? Id { get; set; } [Required] [StringLength(25, ErrorMessage = "Max firstname length is 25 symbols.")] [DisplayName("First name")] public string FirstName { get; set; } [Required] [StringLength(25, ErrorMessage = "Max lastname length is 25 symbols.")] [DisplayName("Last name")] public string LastName { get; set; } [Required] [Email(ErrorMessage = "Provide correct email address, please.")] [DisplayName("Email")] public string Email { ge

Some notes about transportation problem

Hello guys. After work I remembered my studying at university. My first thoughts is about solving Monge–Kantorovich transportation problem using a modification of simplex method known as Method of Potentials. Transportation theory investigates methods for optimal allocation resources among consumers and transportation them with minimum cost. For example, suppose we have some factories which provide materials and shops which consume it. (To be continued)