示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromDcaosrecord(ref DataRow row, Dcaosrecord entity)
 {
     row.SetField("adminid", entity.adminid);
     row.SetField("filetype", entity.filetype);
     row.SetField("delim", entity.delim);
     row.SetField("xrefdelim", entity.xrefdelim);
     row.SetField("dirdata", entity.dirdata);
     row.SetField("dirsource", entity.dirsource);
     row.SetField("datetype", entity.datetype);
     row.SetField("autosasttfl", entity.autosasttfl);
     row.SetField("csvlogfl", entity.csvlogfl);
     row.SetField("convertrowid", entity.convertrowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Dcaosrecord BuildDcaosrecordFromRow(DataRow row)
        {
            Dcaosrecord entity = new Dcaosrecord();

            entity.adminid      = row.IsNull("adminid") ? string.Empty : row.Field <string>("adminid");
            entity.filetype     = row.IsNull("filetype") ? string.Empty : row.Field <string>("filetype");
            entity.delim        = row.IsNull("delim") ? string.Empty : row.Field <string>("delim");
            entity.xrefdelim    = row.IsNull("xrefdelim") ? string.Empty : row.Field <string>("xrefdelim");
            entity.dirdata      = row.IsNull("dirdata") ? string.Empty : row.Field <string>("dirdata");
            entity.dirsource    = row.IsNull("dirsource") ? string.Empty : row.Field <string>("dirsource");
            entity.datetype     = row.IsNull("datetype") ? string.Empty : row.Field <string>("datetype");
            entity.autosasttfl  = row.Field <bool>("autosasttfl");
            entity.csvlogfl     = row.Field <bool>("csvlogfl");
            entity.convertrowid = row.Field <byte[]>("convertrowid").ToStringEncoded();
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }