/// <summary> /// SaveSite /// </summary> /// <returns></returns> public ServiceResponse SaveFeature(FeatureDC feature) { ServiceResponse addFeatureResponse = new ServiceResponse(); try { SetContext(); Feature featureModel = Mapper.Map <FeatureDC, Feature>(feature); _securityManager.SaveFeature(featureModel); } catch (Exception ex) { HandleError(ex, addFeatureResponse); } return(addFeatureResponse); }
public NaturalFeature(FeatureDC base_feature) { my_fType = (Feature_Type)Enum.Parse(typeof(Feature_Type), base_feature.FeatureType); my_rivType = (River_Type)Enum.Parse(typeof(River_Type), base_feature.RiverType); feature_startCoord = grid_c_from_matrix_c(base_feature.Start_Coord); feature_endCoord = grid_c_from_matrix_c(base_feature.End_Coord); banks_thickness = -1; shallow_thickness = -1; deepwater_thickness = -1; lake_roomthickness = -1; lake_shorethickness = -1; lake_shallowsthickness = -1; if (my_fType == Feature_Type.Lake) { lake_roomthickness = base_feature.Lake_Room_Thickness; lake_shorethickness = base_feature.Lake_Shore_Thickness; lake_shallowsthickness = base_feature.Lake_Shallows_Thickness; } else if (my_fType == Feature_Type.River) { banks_thickness = base_feature.River_Shore_Thickness; shallow_thickness = base_feature.River_Shallows_Thickness; deepwater_thickness = base_feature.River_Depths_Thickness; calculate_crossing_points(); } }