/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeioloadordhist(ref DataRow row, Oeioloadordhist entity) { row.SetField("ordersuf", entity.ordersuf); row.SetField("notesfl", entity.notesfl); row.SetField("transtype", entity.transtype); row.SetField("custno", entity.custno); row.SetField("shipto", entity.shipto); row.SetField("promisedt", entity.promisedt); row.SetField("reqshipdt", entity.reqshipdt); row.SetField("pickeddt", entity.pickeddt); row.SetField("shipdt", entity.shipdt); row.SetField("invoicedt", entity.invoicedt); row.SetField("paiddt", entity.paiddt); row.SetField("takenby", entity.takenby); row.SetField("stagecd", entity.stagecd); row.SetField("cTotOrdAmt", entity.cTotOrdAmt); row.SetField("userfield", entity.userfield); }
public static Oeioloadordhist BuildOeioloadordhistFromRow(DataRow row) { Oeioloadordhist entity = new Oeioloadordhist(); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.shipto = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto"); entity.promisedt = row.Field <DateTime?>("promisedt"); entity.reqshipdt = row.Field <DateTime?>("reqshipdt"); entity.pickeddt = row.Field <DateTime?>("pickeddt"); entity.shipdt = row.Field <DateTime?>("shipdt"); entity.invoicedt = row.Field <DateTime?>("invoicedt"); entity.paiddt = row.Field <DateTime?>("paiddt"); entity.takenby = row.IsNull("takenby") ? string.Empty : row.Field <string>("takenby"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.cTotOrdAmt = row.IsNull("cTotOrdAmt") ? string.Empty : row.Field <string>("cTotOrdAmt"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }