示例#1
0
 /// <summary>
 /// Update parameters.
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public GXParameterUpdateResponse Post(GXParameterUpdateRequest request)
 {
     lock (Db)
     {
         using (IDbTransaction trans = Db.OpenTransaction(IsolationLevel.ReadCommitted))
         {
             foreach (var it in request.Parameters)
             {
                 GXAmiParameter param = new GXAmiParameter();
                 param.Value = it.Value;
                 Db.UpdateOnly(param, p => p.Value, p => p.Id == it.Key);
             }
             trans.Commit();
         }
         return(new GXParameterUpdateResponse());
     }
 }
 /// <summary>
 /// Update parameters.
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public GXParameterUpdateResponse Post(GXParameterUpdateRequest request)
 {
     lock (Db)
     {
         using (IDbTransaction trans = Db.OpenTransaction(IsolationLevel.ReadCommitted))
         {
             foreach (var it in request.Parameters)
             {
                 GXAmiParameter param = new GXAmiParameter();
                 param.Value = it.Value;
                 Db.UpdateOnly(param, p => p.Value, p => p.Id == it.Key);
             }
             trans.Commit();
         }
         return new GXParameterUpdateResponse();
     }
 }