Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSasbrcriteria(ref DataRow row, Sasbrcriteria entity)
 {
     row.SetField("dochandler", entity.dochandler);
     row.SetField("nodenm", entity.nodenm);
     row.SetField("attrnm", entity.attrnm);
     row.SetField("direction", entity.direction);
     row.SetField("ruletype", entity.ruletype);
     row.SetField("rulevalue", entity.rulevalue);
     row.SetField("rulelevel", entity.rulelevel);
     row.SetField("category", entity.category);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Sasbrcriteria BuildSasbrcriteriaFromRow(DataRow row)
        {
            Sasbrcriteria entity = new Sasbrcriteria();

            entity.dochandler       = row.IsNull("dochandler") ? string.Empty : row.Field <string>("dochandler");
            entity.nodenm           = row.IsNull("nodenm") ? string.Empty : row.Field <string>("nodenm");
            entity.attrnm           = row.IsNull("attrnm") ? string.Empty : row.Field <string>("attrnm");
            entity.direction        = row.IsNull("direction") ? string.Empty : row.Field <string>("direction");
            entity.ruletype         = row.IsNull("ruletype") ? string.Empty : row.Field <string>("ruletype");
            entity.rulevalue        = row.IsNull("rulevalue") ? string.Empty : row.Field <string>("rulevalue");
            entity.rulelevel        = row.IsNull("rulelevel") ? string.Empty : row.Field <string>("rulelevel");
            entity.category         = row.IsNull("category") ? string.Empty : row.Field <string>("category");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }