Ejemplo n.º 1
0
 public ContentResult DeleteTerraPoint(int id)
 {
     TerraPointSetDefaultTerraPointModel model = new TerraPointSetDefaultTerraPointModel {Error = string.Empty};
     try
     {
         RequestBl.DeleteTerraPoint(id);
     }
     catch (Exception ex)
     {
         Log.Error("Exception on DeleteTerraPoint:", ex);
         string error = ex.GetBaseException().Message;
         model = new TerraPointSetDefaultTerraPointModel
         {
             Error = string.Format("Ошибка: {0}", error),
         };
     }
     var jsonSerializer = new JavaScriptSerializer();
     string jsonString = jsonSerializer.Serialize(model);
     return Content(jsonString);
 }
Ejemplo n.º 2
0
 public ContentResult SetDefaultTerraPoint(int pointId, int userId)
 {
     TerraPointSetDefaultTerraPointModel model;
     try
     {
         model = RequestBl.SetDefaultTerraPoint(pointId/*, userId*/);
     }
     catch (Exception ex)
     {
         Log.Error("Exception on SetDefaultTerraPoint:", ex);
         string error = ex.GetBaseException().Message;
         model = new TerraPointSetDefaultTerraPointModel
         {
             Error = string.Format("Ошибка: {0}", error),
         };
     }
     var jsonSerializer = new JavaScriptSerializer();
     string jsonString = jsonSerializer.Serialize(model);
     return Content(jsonString);
 }