/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdemexcelimportnewresults(ref DataRow row, Pdemexcelimportnewresults entity) { row.SetField("iSeqNo", entity.iSeqNo); row.SetField("iCustNo", entity.iCustNo); row.SetField("cShipTo", entity.cShipTo); row.SetField("cSetID", entity.cSetID); row.SetField("cDesc", entity.cDesc); row.SetField("cProd", entity.cProd); row.SetField("cProdPrcTy", entity.cProdPrcTy); row.SetField("cCustType", entity.cCustType); row.SetField("lPriceRebFl", entity.lPriceRebFl); row.SetField("userfield", entity.userfield); }
public static Pdemexcelimportnewresults BuildPdemexcelimportnewresultsFromRow(DataRow row) { Pdemexcelimportnewresults entity = new Pdemexcelimportnewresults(); entity.iSeqNo = row.IsNull("iSeqNo") ? 0 : row.Field <int>("iSeqNo"); entity.iCustNo = row.IsNull("iCustNo") ? decimal.Zero : row.Field <decimal>("iCustNo"); entity.cShipTo = row.IsNull("cShipTo") ? string.Empty : row.Field <string>("cShipTo"); entity.cSetID = row.IsNull("cSetID") ? string.Empty : row.Field <string>("cSetID"); entity.cDesc = row.IsNull("cDesc") ? string.Empty : row.Field <string>("cDesc"); entity.cProd = row.IsNull("cProd") ? string.Empty : row.Field <string>("cProd"); entity.cProdPrcTy = row.IsNull("cProdPrcTy") ? string.Empty : row.Field <string>("cProdPrcTy"); entity.cCustType = row.IsNull("cCustType") ? string.Empty : row.Field <string>("cCustType"); entity.lPriceRebFl = row.Field <bool>("lPriceRebFl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }