/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeonetimerebleavefield(ref DataRow row, Oeonetimerebleavefield entity) { row.SetField("fieldname", entity.fieldname); row.SetField("costtype", entity.costtype); row.SetField("vendno", entity.vendno); row.SetField("oeonetimerebleavefielduserfield", entity.oeonetimerebleavefielduserfield); row.SetField("userfield", entity.userfield); }
public static Oeonetimerebleavefield BuildOeonetimerebleavefieldFromRow(DataRow row) { Oeonetimerebleavefield entity = new Oeonetimerebleavefield(); entity.fieldname = row.IsNull("fieldname") ? string.Empty : row.Field <string>("fieldname"); entity.costtype = row.IsNull("costtype") ? string.Empty : row.Field <string>("costtype"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.oeonetimerebleavefielduserfield = row.IsNull("oeonetimerebleavefielduserfield") ? string.Empty : row.Field <string>("oeonetimerebleavefielduserfield"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }