/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOesflist(ref DataRow row, Oesflist entity) { row.SetField("recordtype", entity.recordtype); row.SetField("seqno", entity.seqno); row.SetField("listvalue", entity.listvalue); row.SetField("listlabel", entity.listlabel); row.SetField("whselisttype", entity.whselisttype); row.SetField("oesfwpointer", entity.oesfwpointer); row.SetField("selectedfl", entity.selectedfl); row.SetField("userfield", entity.userfield); }
public static Oesflist BuildOesflistFromRow(DataRow row) { Oesflist entity = new Oesflist(); entity.recordtype = row.IsNull("recordtype") ? string.Empty : row.Field <string>("recordtype"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.listvalue = row.IsNull("listvalue") ? string.Empty : row.Field <string>("listvalue"); entity.listlabel = row.IsNull("listlabel") ? string.Empty : row.Field <string>("listlabel"); entity.whselisttype = row.IsNull("whselisttype") ? string.Empty : row.Field <string>("whselisttype"); entity.oesfwpointer = row.IsNull("oesfwpointer") ? string.Empty : row.Field <string>("oesfwpointer"); entity.selectedfl = row.Field <bool>("selectedfl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }