/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeblanketvalidatesingle(ref DataRow row, Oeblanketvalidatesingle entity) { row.SetField("transtype", entity.transtype); row.SetField("custno", entity.custno); row.SetField("custname", entity.custname); row.SetField("whse", entity.whse); row.SetField("whsename", entity.whsename); row.SetField("jmjobid", entity.jmjobid); row.SetField("jmjobrevno", entity.jmjobrevno); row.SetField("jmfulljobid", entity.jmfulljobid); row.SetField("ordernotesfl", entity.ordernotesfl); row.SetField("custnotesfl", entity.custnotesfl); }
public static Oeblanketvalidatesingle BuildOeblanketvalidatesingleFromRow(DataRow row) { Oeblanketvalidatesingle entity = new Oeblanketvalidatesingle(); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.custname = row.IsNull("custname") ? string.Empty : row.Field <string>("custname"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.whsename = row.IsNull("whsename") ? string.Empty : row.Field <string>("whsename"); entity.jmjobid = row.IsNull("jmjobid") ? string.Empty : row.Field <string>("jmjobid"); entity.jmjobrevno = row.IsNull("jmjobrevno") ? 0 : row.Field <int>("jmjobrevno"); entity.jmfulljobid = row.IsNull("jmfulljobid") ? string.Empty : row.Field <string>("jmfulljobid"); entity.ordernotesfl = row.IsNull("ordernotesfl") ? string.Empty : row.Field <string>("ordernotesfl"); entity.custnotesfl = row.IsNull("custnotesfl") ? string.Empty : row.Field <string>("custnotesfl"); return(entity); }