/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromKpewtie(ref DataRow row, Kpewtie entity) { row.SetField("wono", entity.wono); row.SetField("wosuf", entity.wosuf); row.SetField("orderaltno", entity.orderaltno); row.SetField("orderaltsuf", entity.orderaltsuf); row.SetField("orderaltseqno", entity.orderaltseqno); row.SetField("ordertype", entity.ordertype); row.SetField("qtyord", entity.qtyord); row.SetField("qtyship", entity.qtyship); row.SetField("userfield", entity.userfield); }
public static Kpewtie BuildKpewtieFromRow(DataRow row) { Kpewtie entity = new Kpewtie(); entity.wono = row.IsNull("wono") ? 0 : row.Field <int>("wono"); entity.wosuf = row.IsNull("wosuf") ? 0 : row.Field <int>("wosuf"); entity.orderaltno = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno"); entity.orderaltsuf = row.IsNull("orderaltsuf") ? 0 : row.Field <int>("orderaltsuf"); entity.orderaltseqno = row.IsNull("orderaltseqno") ? 0 : row.Field <int>("orderaltseqno"); entity.ordertype = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype"); entity.qtyord = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord"); entity.qtyship = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }