Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromDrplogresults(ref DataRow row, Drplogresults entity)
 {
     row.SetField("log_seq", entity.logSeq);
     row.SetField("rule_code", entity.ruleCode);
     row.SetField("log_text", entity.logText);
     row.SetField("drplogrowid", entity.drplogrowid.ToByteArray());
     row.SetField("drplogresultsuserfield", entity.drplogresultsuserfield);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Drplogresults BuildDrplogresultsFromRow(DataRow row)
        {
            Drplogresults entity = new Drplogresults();

            entity.logSeq                 = row.IsNull("log_seq") ? 0 : row.Field <int>("log_seq");
            entity.ruleCode               = row.IsNull("rule_code") ? string.Empty : row.Field <string>("rule_code");
            entity.logText                = row.IsNull("log_text") ? string.Empty : row.Field <string>("log_text");
            entity.drplogrowid            = row.Field <byte[]>("drplogrowid").ToStringEncoded();
            entity.drplogresultsuserfield = row.IsNull("drplogresultsuserfield") ? string.Empty : row.Field <string>("drplogresultsuserfield");
            entity.userfield              = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }