/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromWteireceivelistresults(ref DataRow row, Wteireceivelistresults entity) { row.SetField("wtno", entity.wtno); row.SetField("wtsuf", entity.wtsuf); row.SetField("wtnox", entity.wtnox); row.SetField("notesfl", entity.notesfl); row.SetField("stagecd", entity.stagecd); row.SetField("stagecdx", entity.stagecdx); row.SetField("transtype", entity.transtype); row.SetField("orderdt", entity.orderdt); row.SetField("shipdt", entity.shipdt); row.SetField("reqshipdt", entity.reqshipdt); row.SetField("duedt", entity.duedt); row.SetField("fromcono", entity.fromcono); row.SetField("shipfmwhse", entity.shipfmwhse); row.SetField("shipfmname", entity.shipfmname); row.SetField("tocono", entity.tocono); row.SetField("shiptowhse", entity.shiptowhse); row.SetField("shiptoname", entity.shiptoname); row.SetField("statusinfo", entity.statusinfo); row.SetField("sortdt1", entity.sortdt1); row.SetField("sortdt2", entity.sortdt2); row.SetField("sortfld", entity.sortfld); row.SetField("amounti", entity.amounti); row.SetField("rowid-wteh", entity.rowidWteh.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Wteireceivelistresults BuildWteireceivelistresultsFromRow(DataRow row) { Wteireceivelistresults entity = new Wteireceivelistresults(); entity.wtno = row.IsNull("wtno") ? 0 : row.Field <int>("wtno"); entity.wtsuf = row.IsNull("wtsuf") ? 0 : row.Field <int>("wtsuf"); entity.wtnox = row.IsNull("wtnox") ? string.Empty : row.Field <string>("wtnox"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.stagecdx = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.orderdt = row.Field <DateTime?>("orderdt"); entity.shipdt = row.Field <DateTime?>("shipdt"); entity.reqshipdt = row.Field <DateTime?>("reqshipdt"); entity.duedt = row.Field <DateTime?>("duedt"); entity.fromcono = row.IsNull("fromcono") ? 0 : row.Field <int>("fromcono"); entity.shipfmwhse = row.IsNull("shipfmwhse") ? string.Empty : row.Field <string>("shipfmwhse"); entity.shipfmname = row.IsNull("shipfmname") ? string.Empty : row.Field <string>("shipfmname"); entity.tocono = row.IsNull("tocono") ? 0 : row.Field <int>("tocono"); entity.shiptowhse = row.IsNull("shiptowhse") ? string.Empty : row.Field <string>("shiptowhse"); entity.shiptoname = row.IsNull("shiptoname") ? string.Empty : row.Field <string>("shiptoname"); entity.statusinfo = row.IsNull("statusinfo") ? string.Empty : row.Field <string>("statusinfo"); entity.sortdt1 = row.Field <DateTime?>("sortdt1"); entity.sortdt2 = row.Field <DateTime?>("sortdt2"); entity.sortfld = row.IsNull("sortfld") ? string.Empty : row.Field <string>("sortfld"); entity.amounti = row.IsNull("amounti") ? 0 : row.Field <int>("amounti"); entity.rowidWteh = row.Field <byte[]>("rowid-wteh").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }