public static Vasplinenonstock BuildVasplinenonstockFromRow(DataRow row) { Vasplinenonstock entity = new Vasplinenonstock(); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.arpprodline = row.IsNull("arpprodline") ? string.Empty : row.Field <string>("arpprodline"); entity.arpvendno = row.IsNull("arpvendno") ? decimal.Zero : row.Field <decimal>("arpvendno"); entity.arpwhse = row.IsNull("arpwhse") ? string.Empty : row.Field <string>("arpwhse"); entity.availqtydspl = row.IsNull("availqtydspl") ? string.Empty : row.Field <string>("availqtydspl"); entity.dspldesc = row.IsNull("dspldesc") ? string.Empty : row.Field <string>("dspldesc"); entity.cubes = row.IsNull("cubes") ? decimal.Zero : row.Field <decimal>("cubes"); entity.nonstockty = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty"); entity.prodcat = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat"); entity.prodcost = row.IsNull("prodcost") ? decimal.Zero : row.Field <decimal>("prodcost"); entity.prodcostdspl = row.IsNull("prodcostdspl") ? string.Empty : row.Field <string>("prodcostdspl"); entity.proddesc = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc"); entity.proddesc2 = row.IsNull("proddesc2") ? string.Empty : row.Field <string>("proddesc2"); entity.rushfl = row.Field <bool>("rushfl"); entity.weight = row.IsNull("weight") ? decimal.Zero : row.Field <decimal>("weight"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.asknsoanfl = row.Field <bool>("asknsoanfl"); entity.nonstkmessage = row.IsNull("nonstkmessage") ? string.Empty : row.Field <string>("nonstkmessage"); entity.prcavlmessage = row.IsNull("prcavlmessage") ? string.Empty : row.Field <string>("prcavlmessage"); entity.warningmessage = row.IsNull("warningmessage") ? string.Empty : row.Field <string>("warningmessage"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromVasplinenonstock(ref DataRow row, Vasplinenonstock entity) { row.SetField("shipprod", entity.shipprod); row.SetField("arpprodline", entity.arpprodline); row.SetField("arpvendno", entity.arpvendno); row.SetField("arpwhse", entity.arpwhse); row.SetField("availqtydspl", entity.availqtydspl); row.SetField("dspldesc", entity.dspldesc); row.SetField("cubes", entity.cubes); row.SetField("nonstockty", entity.nonstockty); row.SetField("prodcat", entity.prodcat); row.SetField("prodcost", entity.prodcost); row.SetField("prodcostdspl", entity.prodcostdspl); row.SetField("proddesc", entity.proddesc); row.SetField("proddesc2", entity.proddesc2); row.SetField("rushfl", entity.rushfl); row.SetField("weight", entity.weight); row.SetField("whse", entity.whse); row.SetField("asknsoanfl", entity.asknsoanfl); row.SetField("nonstkmessage", entity.nonstkmessage); row.SetField("prcavlmessage", entity.prcavlmessage); row.SetField("warningmessage", entity.warningmessage); row.SetField("userfield", entity.userfield); }