Ejemplo n.º 1
0
 public StrategyInfo()
 {
     Id           = -1;
     Name         = "";
     Description  = "";
     UserId       = -1;
     Script       = "";
     DateCreated  = DateTime.MinValue;
     DateModified = DateTime.MinValue;
     Options      = new StrategyOptions();
 }
Ejemplo n.º 2
0
 public StrategyInfo(DataRow row)
 {
     Id           = Convert.ToInt32(row["Id"]);
     Name         = (string)row["Name"];
     UserId       = Convert.ToInt32(row["UserId"]);
     Script       = (string)row["Script"];
     Description  = (string)row["Description"];
     DateCreated  = row["DateCreated"].ToString().ToSqlDateTime();
     DateModified = row["DateModified"].ToString().ToSqlDateTime();
     if (row["Options"] != DBNull.Value && row["Options"].ToString() != "null")
     {
         Options = JsonConvert.DeserializeObject <StrategyOptions>(row["Options"].ToString());
     }
     else
     {
         Options = new StrategyOptions();
     }
 }