/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPocoreallocationsingle(ref DataRow row, Pocoreallocationsingle entity) { row.SetField("cProd", entity.cProd); row.SetField("cWhse", entity.cWhse); row.SetField("dProofAmt", entity.dProofAmt); row.SetField("viewtitle", entity.viewtitle); row.SetField("dConv", entity.dConv); row.SetField("cMode", entity.cMode); row.SetField("cOrigProd", entity.cOrigProd); row.SetField("dCoreQty", entity.dCoreQty); row.SetField("dAdjPrice", entity.dAdjPrice); row.SetField("cOrigWhse", entity.cOrigWhse); row.SetField("warrantyflenabled", entity.warrantyflenabled); row.SetField("prodenabled", entity.prodenabled); row.SetField("whseenabled", entity.whseenabled); row.SetField("cScrnProd", entity.cScrnProd); row.SetField("cScrnWhse", entity.cScrnWhse); row.SetField("dAdjQty", entity.dAdjQty); row.SetField("userfield", entity.userfield); }
public static Pocoreallocationsingle BuildPocoreallocationsingleFromRow(DataRow row) { Pocoreallocationsingle entity = new Pocoreallocationsingle(); entity.cProd = row.IsNull("cProd") ? string.Empty : row.Field <string>("cProd"); entity.cWhse = row.IsNull("cWhse") ? string.Empty : row.Field <string>("cWhse"); entity.dProofAmt = row.IsNull("dProofAmt") ? decimal.Zero : row.Field <decimal>("dProofAmt"); entity.viewtitle = row.IsNull("viewtitle") ? string.Empty : row.Field <string>("viewtitle"); entity.dConv = row.IsNull("dConv") ? decimal.Zero : row.Field <decimal>("dConv"); entity.cMode = row.IsNull("cMode") ? string.Empty : row.Field <string>("cMode"); entity.cOrigProd = row.IsNull("cOrigProd") ? string.Empty : row.Field <string>("cOrigProd"); entity.dCoreQty = row.IsNull("dCoreQty") ? decimal.Zero : row.Field <decimal>("dCoreQty"); entity.dAdjPrice = row.IsNull("dAdjPrice") ? decimal.Zero : row.Field <decimal>("dAdjPrice"); entity.cOrigWhse = row.IsNull("cOrigWhse") ? string.Empty : row.Field <string>("cOrigWhse"); entity.warrantyflenabled = row.Field <bool>("warrantyflenabled"); entity.prodenabled = row.Field <bool>("prodenabled"); entity.whseenabled = row.Field <bool>("whseenabled"); entity.cScrnProd = row.IsNull("cScrnProd") ? string.Empty : row.Field <string>("cScrnProd"); entity.cScrnWhse = row.IsNull("cScrnWhse") ? string.Empty : row.Field <string>("cScrnWhse"); entity.dAdjQty = row.IsNull("dAdjQty") ? decimal.Zero : row.Field <decimal>("dAdjQty"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }