public JsonResult Edit(Solution solution)
 {
     var res = false;
     if (solution.Id == null || solution.Id == Guid.Empty.ToSafeTrim())
     {
         solution.Id = Guid.NewGuid().ToSafeTrim();
         res = new BaseService().Insert<Solution>(solution);
     }
     else
         res = new BaseService().Update<Solution>(solution);
     return Json(new { res = res });
 }
Exemplo n.º 2
0
 public model.Solution Get()
 {
     var sql = "select * from [Solution]";
     var solution = new model.Solution();
     using (var sReader = SqlDBHelper.ExecuteReader(sql))
     {
         while (sReader.Read())
         {
             solution.Id = sReader["Id"].ToString();
             solution.Cont = sReader["Cont"].ToString();
         }
     }
     return solution;
 }