예제 #1
0
        private MunicipalityController GetMunicipalityController()
        {
            _placesServiceMock = new Mock <IPlacesService>();
            var municipalityCtrl = new MunicipalityController(_placesServiceMock.Object);

            return(municipalityCtrl);
        }
예제 #2
0
    protected void dvDataSource_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Municipality m = e.InputParameters["entityToInsert"] as Municipality;

        MunicipalityController.ValidateInsertCode(m.Code);
    }
예제 #3
0
    protected void dvDataSource_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Municipality m = e.InputParameters["newEntity"] as Municipality;

        MunicipalityController.ValidateUpdateCode(m.ID, m.Code);
    }