Exemplo n.º 1
0
 public void SaveMapField(Action<List<int>> callback, List<MapFieldModel> mapFields)
 {
     MapFieldRepository mapFieldRep = new MapFieldRepository();
     ViewSaveCallback = callback;
     SaveMapFieldCallback handler = new SaveMapFieldCallback(SaveMapFieldCompleted);
     mapFieldRep.SaveMapField(new Action<List<int>>(handler), mapFields);
 }
Exemplo n.º 2
0
 public void SaveFieldCompleted(int id)
 {
     fieldId = id;
     //insert field-map with mapid, fieldid
     MapFieldModel mapFieldModel = new MapFieldModel();
     List<MapFieldModel> mapFieldRecords = new List<MapFieldModel>();
     foreach (int mapId in mapIds)
     {
         MapFieldModel mfm = new MapFieldModel();
         mfm.FieldId = fieldId;
         mfm.MapId = mapId;
         mapFieldRecords.Add(mfm);
     }
     SaveMapFieldCallback handler = new SaveMapFieldCallback(SaveMapFieldCompleted);
     mapFieldModel.SaveMapField(new Action<List<int>>(handler), mapFieldRecords);
 }