/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromApsplabelresults(ref DataRow row, Apsplabelresults entity) { row.SetField("PurcAmtLabel", entity.purcAmtLabel); row.SetField("QtySoldLabel", entity.qtySoldLabel); row.SetField("SalesAmtLabel", entity.salesAmtLabel); row.SetField("CogAmtLabel", entity.cogAmtLabel); row.SetField("PurchAmtTotal", entity.purchAmtTotal); row.SetField("QtySoldTotal", entity.qtySoldTotal); row.SetField("SalesAmtTotal", entity.salesAmtTotal); row.SetField("CogAmtTotal", entity.cogAmtTotal); row.SetField("userfield", entity.userfield); }
public static Apsplabelresults BuildApsplabelresultsFromRow(DataRow row) { Apsplabelresults entity = new Apsplabelresults(); entity.purcAmtLabel = row.IsNull("PurcAmtLabel") ? string.Empty : row.Field <string>("PurcAmtLabel"); entity.qtySoldLabel = row.IsNull("QtySoldLabel") ? string.Empty : row.Field <string>("QtySoldLabel"); entity.salesAmtLabel = row.IsNull("SalesAmtLabel") ? string.Empty : row.Field <string>("SalesAmtLabel"); entity.cogAmtLabel = row.IsNull("CogAmtLabel") ? string.Empty : row.Field <string>("CogAmtLabel"); entity.purchAmtTotal = row.IsNull("PurchAmtTotal") ? string.Empty : row.Field <string>("PurchAmtTotal"); entity.qtySoldTotal = row.IsNull("QtySoldTotal") ? string.Empty : row.Field <string>("QtySoldTotal"); entity.salesAmtTotal = row.IsNull("SalesAmtTotal") ? string.Empty : row.Field <string>("SalesAmtTotal"); entity.cogAmtTotal = row.IsNull("CogAmtTotal") ? string.Empty : row.Field <string>("CogAmtTotal"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }