/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPorrarlinemsgresults(ref DataRow row, Porrarlinemsgresults entity) { row.SetField("reportno", entity.reportno); row.SetField("lineno", entity.lineno); row.SetField("seqno", entity.seqno); row.SetField("shipprod", entity.shipprod); row.SetField("proddesc", entity.proddesc); row.SetField("proddesc2", entity.proddesc2); row.SetField("qtyord", entity.qtyord); row.SetField("whse", entity.whse); row.SetField("unit", entity.unit); row.SetField("errorcd", entity.errorcd); row.SetField("errormsg", entity.errormsg); }
public static Porrarlinemsgresults BuildPorrarlinemsgresultsFromRow(DataRow row) { Porrarlinemsgresults entity = new Porrarlinemsgresults(); entity.reportno = row.IsNull("reportno") ? 0 : row.Field <int>("reportno"); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.proddesc = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc"); entity.proddesc2 = row.IsNull("proddesc2") ? string.Empty : row.Field <string>("proddesc2"); entity.qtyord = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.errorcd = row.IsNull("errorcd") ? string.Empty : row.Field <string>("errorcd"); entity.errormsg = row.IsNull("errormsg") ? string.Empty : row.Field <string>("errormsg"); return(entity); }