Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromDrplogcriteria(ref DataRow row, Drplogcriteria entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("rule_code", entity.ruleCode);
     row.SetField("find_string", entity.findString);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("drplogcriteriauserfield", entity.drplogcriteriauserfield);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Drplogcriteria BuildDrplogcriteriaFromRow(DataRow row)
        {
            Drplogcriteria entity = new Drplogcriteria();

            entity.coNum                   = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num");
            entity.whNum                   = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num");
            entity.ruleCode                = row.IsNull("rule_code") ? string.Empty : row.Field <string>("rule_code");
            entity.findString              = row.IsNull("find_string") ? string.Empty : row.Field <string>("find_string");
            entity.recordcountlimit        = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.drplogcriteriauserfield = row.IsNull("drplogcriteriauserfield") ? string.Empty : row.Field <string>("drplogcriteriauserfield");
            entity.userfield               = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }