/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPolinenonstockhdr(ref DataRow row, Polinenonstockhdr entity) { row.SetField("pono", entity.pono); row.SetField("posuf", entity.posuf); row.SetField("vendno", entity.vendno); row.SetField("whse", entity.whse); row.SetField("lineno", entity.lineno); row.SetField("userfield", entity.userfield); }
public static Polinenonstockhdr BuildPolinenonstockhdrFromRow(DataRow row) { Polinenonstockhdr entity = new Polinenonstockhdr(); entity.pono = row.IsNull("pono") ? 0 : row.Field <int>("pono"); entity.posuf = row.IsNull("posuf") ? 0 : row.Field <int>("posuf"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.lineno = row.IsNull("lineno") ? 0 : row.Field <int>("lineno"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }