/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPdemexcelimportonchgrcrdty(ref DataRow row, Pdemexcelimportonchgrcrdty entity) { row.SetField("iCustno-Label", entity.iCustnoLabel); row.SetField("cShipTo-Label", entity.cShipToLabel); row.SetField("cCustType-Label", entity.cCustTypeLabel); row.SetField("cProd-Label", entity.cProdLabel); row.SetField("cProdPrcTy-Label", entity.cProdPrcTyLabel); row.SetField("iCustno-visible", entity.iCustnoVisible); row.SetField("cShipTo-visible", entity.cShipToVisible); row.SetField("cCustType-visible", entity.cCustTypeVisible); row.SetField("cProd-visible", entity.cProdVisible); row.SetField("cProdPrcTy-visible", entity.cProdPrcTyVisible); row.SetField("userfield", entity.userfield); }
public static Pdemexcelimportonchgrcrdty BuildPdemexcelimportonchgrcrdtyFromRow(DataRow row) { Pdemexcelimportonchgrcrdty entity = new Pdemexcelimportonchgrcrdty(); entity.iCustnoLabel = row.IsNull("iCustno-Label") ? string.Empty : row.Field <string>("iCustno-Label"); entity.cShipToLabel = row.IsNull("cShipTo-Label") ? string.Empty : row.Field <string>("cShipTo-Label"); entity.cCustTypeLabel = row.IsNull("cCustType-Label") ? string.Empty : row.Field <string>("cCustType-Label"); entity.cProdLabel = row.IsNull("cProd-Label") ? string.Empty : row.Field <string>("cProd-Label"); entity.cProdPrcTyLabel = row.IsNull("cProdPrcTy-Label") ? string.Empty : row.Field <string>("cProdPrcTy-Label"); entity.iCustnoVisible = row.Field <bool>("iCustno-visible"); entity.cShipToVisible = row.Field <bool>("cShipTo-visible"); entity.cCustTypeVisible = row.Field <bool>("cCustType-visible"); entity.cProdVisible = row.Field <bool>("cProd-visible"); entity.cProdPrcTyVisible = row.Field <bool>("cProdPrcTy-visible"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }