示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArsogcorpgroup(ref DataRow row, Arsogcorpgroup entity)
 {
     row.SetField("groupid", entity.groupid);
     row.SetField("custno", entity.custno);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("name", entity.name);
     row.SetField("rowID", entity.rowID.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Arsogcorpgroup BuildArsogcorpgroupFromRow(DataRow row)
        {
            Arsogcorpgroup entity = new Arsogcorpgroup();

            entity.groupid   = row.IsNull("groupid") ? string.Empty : row.Field <string>("groupid");
            entity.custno    = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.notesfl   = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.name      = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.rowID     = row.Field <byte[]>("rowID").ToStringEncoded();
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }