Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGliatranscriteria(ref DataRow row, Gliatranscriteria entity)
 {
     row.SetField("glno", entity.glno);
     row.SetField("glyear", entity.glyear);
     row.SetField("trcode", entity.trcode);
     row.SetField("stdt", entity.stdt);
     row.SetField("enddt", entity.enddt);
     row.SetField("sortord", entity.sortord);
     row.SetField("period", entity.period);
     row.SetField("recordlimit", entity.recordlimit);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Gliatranscriteria BuildGliatranscriteriaFromRow(DataRow row)
        {
            Gliatranscriteria entity = new Gliatranscriteria();

            entity.glno        = row.IsNull("glno") ? string.Empty : row.Field <string>("glno");
            entity.glyear      = row.IsNull("glyear") ? 0 : row.Field <int>("glyear");
            entity.trcode      = row.IsNull("trcode") ? 0 : row.Field <int>("trcode");
            entity.stdt        = row.Field <DateTime?>("stdt");
            entity.enddt       = row.Field <DateTime?>("enddt");
            entity.sortord     = row.Field <bool>("sortord");
            entity.period      = row.IsNull("period") ? 0 : row.Field <int>("period");
            entity.recordlimit = row.IsNull("recordlimit") ? 0 : row.Field <int>("recordlimit");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }