/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcepequickcntleavesingle(ref DataRow row, Icepequickcntleavesingle entity) { row.SetField("whse", entity.whse); row.SetField("runno", entity.runno); row.SetField("ticketno", entity.ticketno); row.SetField("prod", entity.prod); row.SetField("binloc", entity.binloc); row.SetField("qtycnt", entity.qtycnt); row.SetField("qtyexp", entity.qtyexp); row.SetField("qtyexpenabled", entity.qtyexpenabled); row.SetField("unit", entity.unit); row.SetField("uticketno", entity.uticketno); row.SetField("uticketnoenabled", entity.uticketnoenabled); row.SetField("proddesc", entity.proddesc); row.SetField("serlot", entity.serlot); row.SetField("prodnotesfl", entity.prodnotesfl); row.SetField("unavail", entity.unavail); row.SetField("userfield", entity.userfield); }
public static Icepequickcntleavesingle BuildIcepequickcntleavesingleFromRow(DataRow row) { Icepequickcntleavesingle entity = new Icepequickcntleavesingle(); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.runno = row.IsNull("runno") ? 0 : row.Field <int>("runno"); entity.ticketno = row.IsNull("ticketno") ? 0 : row.Field <int>("ticketno"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.binloc = row.IsNull("binloc") ? string.Empty : row.Field <string>("binloc"); entity.qtycnt = row.IsNull("qtycnt") ? decimal.Zero : row.Field <decimal>("qtycnt"); entity.qtyexp = row.IsNull("qtyexp") ? decimal.Zero : row.Field <decimal>("qtyexp"); entity.qtyexpenabled = row.Field <bool>("qtyexpenabled"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.uticketno = row.IsNull("uticketno") ? 0 : row.Field <int>("uticketno"); entity.uticketnoenabled = row.Field <bool>("uticketnoenabled"); entity.proddesc = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc"); entity.serlot = row.IsNull("serlot") ? string.Empty : row.Field <string>("serlot"); entity.prodnotesfl = row.IsNull("prodnotesfl") ? string.Empty : row.Field <string>("prodnotesfl"); entity.unavail = row.Field <bool>("unavail"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }