/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdemloadpdsc1criteria(ref DataRow row, Pdemloadpdsc1criteria entity) { row.SetField("cSetid", entity.cSetid); row.SetField("deCustNo", entity.deCustNo); row.SetField("cShipTo", entity.cShipTo); row.SetField("cContractNo", entity.cContractNo); row.SetField("dtStartFrom", entity.dtStartFrom); row.SetField("dtStartTo", entity.dtStartTo); row.SetField("cProd", entity.cProd); row.SetField("cReference", entity.cReference); row.SetField("dtEndFrom", entity.dtEndFrom); row.SetField("dtEndTo", entity.dtEndTo); row.SetField("cWhse", entity.cWhse); row.SetField("lRefresh-click", entity.lRefreshClick); row.SetField("cRegion", entity.cRegion); row.SetField("userfield", entity.userfield); }
public static Pdemloadpdsc1criteria BuildPdemloadpdsc1criteriaFromRow(DataRow row) { Pdemloadpdsc1criteria entity = new Pdemloadpdsc1criteria(); entity.cSetid = row.IsNull("cSetid") ? string.Empty : row.Field <string>("cSetid"); entity.deCustNo = row.IsNull("deCustNo") ? decimal.Zero : row.Field <decimal>("deCustNo"); entity.cShipTo = row.IsNull("cShipTo") ? string.Empty : row.Field <string>("cShipTo"); entity.cContractNo = row.IsNull("cContractNo") ? string.Empty : row.Field <string>("cContractNo"); entity.dtStartFrom = row.Field <DateTime?>("dtStartFrom"); entity.dtStartTo = row.Field <DateTime?>("dtStartTo"); entity.cProd = row.IsNull("cProd") ? string.Empty : row.Field <string>("cProd"); entity.cReference = row.IsNull("cReference") ? string.Empty : row.Field <string>("cReference"); entity.dtEndFrom = row.Field <DateTime?>("dtEndFrom"); entity.dtEndTo = row.Field <DateTime?>("dtEndTo"); entity.cWhse = row.IsNull("cWhse") ? string.Empty : row.Field <string>("cWhse"); entity.lRefreshClick = row.Field <bool>("lRefresh-click"); entity.cRegion = row.IsNull("cRegion") ? string.Empty : row.Field <string>("cRegion"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }