/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdspupdatebrowsercriteria(ref DataRow row, Pdspupdatebrowsercriteria entity) { row.SetField("pdrecno", entity.pdrecno); row.SetField("cLevelcd", entity.cLevelcd); row.SetField("seqno", entity.seqno); row.SetField("price", entity.price); row.SetField("prcbreak", entity.prcbreak); row.SetField("disc", entity.disc); row.SetField("vendno", entity.vendno); row.SetField("prod", entity.prod); row.SetField("startdt", entity.startdt); row.SetField("userfield", entity.userfield); }
public static Pdspupdatebrowsercriteria BuildPdspupdatebrowsercriteriaFromRow(DataRow row) { Pdspupdatebrowsercriteria entity = new Pdspupdatebrowsercriteria(); entity.pdrecno = row.IsNull("pdrecno") ? 0 : row.Field <int>("pdrecno"); entity.cLevelcd = row.IsNull("cLevelcd") ? string.Empty : row.Field <string>("cLevelcd"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.price = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price"); entity.prcbreak = row.IsNull("prcbreak") ? 0 : row.Field <int>("prcbreak"); entity.disc = row.IsNull("disc") ? decimal.Zero : row.Field <decimal>("disc"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.startdt = row.Field <DateTime?>("startdt"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }