Beispiel #1
0
 public void DeleteContext(int id)
 {
     tb_TraderateContextEntity tce = new tb_TraderateContextEntity();
     tce.id = id;
     tce.Retrieve();
     if (tce.IsPersistent)
     {
         try
         {
             tce.Delete();
         }
         catch (PlException plex)
         { }
     }
 }
 public static void Save(tb_TraderateContextEntity obj)
 {
     if (obj!=null)
     {
         obj.Save();
     }
 }
 /// <summary>根据主键获取一个实体</summary>
 public static tb_TraderateContextEntity RetrieveAtb_TraderateContextEntity(int id)
 {
     tb_TraderateContextEntity obj=new tb_TraderateContextEntity();
     obj.id=id;
     obj.Retrieve();
     if (obj.IsPersistent)
     {
         return obj;
     }
     else
     {
         return null;
     }
 }
Beispiel #4
0
 public void UpdateContext(int id, string context)
 {
     tb_TraderateContextEntity tce = new tb_TraderateContextEntity();
     tce.id = id;
     tce.Retrieve();
     if (tce.IsPersistent)
     {
         tce.Context = context;
         try
         {
             tce.Save();
         }
         catch (PlException plex)
         { }
     }
 }