public static Icipfetchreplresults BuildIcipfetchreplresultsFromRow(DataRow row) { Icipfetchreplresults entity = new Icipfetchreplresults(); entity.unittext = row.IsNull("unittext") ? string.Empty : row.Field <string>("unittext"); entity.ctext = row.IsNull("ctext") ? string.Empty : row.Field <string>("ctext"); entity.btnusagehidden = row.Field <bool>("btnusagehidden"); entity.arptype = row.IsNull("arptype") ? string.Empty : row.Field <string>("arptype"); entity.arpvendno = row.IsNull("arpvendno") ? decimal.Zero : row.Field <decimal>("arpvendno"); entity.arpvendname = row.IsNull("arpvendname") ? string.Empty : row.Field <string>("arpvendname"); entity.btnalthidden = row.Field <bool>("btnalthidden"); entity.lblvendno = row.IsNull("lblvendno") ? string.Empty : row.Field <string>("lblvendno"); entity.prodline = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline"); entity.prodlinename = row.IsNull("prodlinename") ? string.Empty : row.Field <string>("prodlinename"); entity.btnroaihidden = row.Field <bool>("btnroaihidden"); entity.arpwhse = row.IsNull("arpwhse") ? string.Empty : row.Field <string>("arpwhse"); entity.arpwhsename = row.IsNull("arpwhsename") ? string.Empty : row.Field <string>("arpwhsename"); entity.btnadjusterhidden = row.Field <bool>("btnadjusterhidden"); entity.familygroup = row.IsNull("familygroup") ? string.Empty : row.Field <string>("familygroup"); entity.btnrolluphidden = row.Field <bool>("btnrolluphidden"); entity.usagerate = row.IsNull("usagerate") ? decimal.Zero : row.Field <decimal>("usagerate"); entity.usagetext = row.IsNull("usagetext") ? string.Empty : row.Field <string>("usagetext"); entity.btntrendinfohidden = row.Field <bool>("btntrendinfohidden"); entity.leadtmavg = row.IsNull("leadtmavg") ? 0 : row.Field <int>("leadtmavg"); entity.avgltdt = row.Field <DateTime?>("avgltdt"); entity.frozenltty = row.IsNull("frozenltty") ? string.Empty : row.Field <string>("frozenltty"); entity.criticalpt = row.IsNull("criticalpt") ? decimal.Zero : row.Field <decimal>("criticalpt"); entity.oordpt = row.IsNull("oordpt") ? decimal.Zero : row.Field <decimal>("oordpt"); entity.orderpt = row.IsNull("orderpt") ? decimal.Zero : row.Field <decimal>("orderpt"); entity.olinept = row.IsNull("olinept") ? decimal.Zero : row.Field <decimal>("olinept"); entity.linept = row.IsNull("linept") ? decimal.Zero : row.Field <decimal>("linept"); entity.ordqtyin = row.IsNull("ordqtyin") ? decimal.Zero : row.Field <decimal>("ordqtyin"); entity.ordcalc = row.IsNull("ordcalc") ? string.Empty : row.Field <string>("ordcalc"); entity.@class = row.IsNull("class") ? 0 : row.Field <int>("class"); entity.criticalfl = row.IsNull("criticalfl") ? string.Empty : row.Field <string>("criticalfl"); entity.safetyallow = row.IsNull("safetyallow") ? string.Empty : row.Field <string>("safetyallow"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.criticalflhidden = row.Field <bool>("criticalflhidden"); entity.frozenlttyhidden = row.Field <bool>("frozenlttyhidden"); entity.ncnr = row.IsNull("ncnr") ? string.Empty : row.Field <string>("ncnr"); entity.eccnclasscd = row.IsNull("eccnclasscd") ? string.Empty : row.Field <string>("eccnclasscd"); entity.totusagerate = row.IsNull("totusagerate") ? decimal.Zero : row.Field <decimal>("totusagerate"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromIcipfetchreplresults(ref DataRow row, Icipfetchreplresults entity) { row.SetField("unittext", entity.unittext); row.SetField("ctext", entity.ctext); row.SetField("btnusagehidden", entity.btnusagehidden); row.SetField("arptype", entity.arptype); row.SetField("arpvendno", entity.arpvendno); row.SetField("arpvendname", entity.arpvendname); row.SetField("btnalthidden", entity.btnalthidden); row.SetField("lblvendno", entity.lblvendno); row.SetField("prodline", entity.prodline); row.SetField("prodlinename", entity.prodlinename); row.SetField("btnroaihidden", entity.btnroaihidden); row.SetField("arpwhse", entity.arpwhse); row.SetField("arpwhsename", entity.arpwhsename); row.SetField("btnadjusterhidden", entity.btnadjusterhidden); row.SetField("familygroup", entity.familygroup); row.SetField("btnrolluphidden", entity.btnrolluphidden); row.SetField("usagerate", entity.usagerate); row.SetField("usagetext", entity.usagetext); row.SetField("btntrendinfohidden", entity.btntrendinfohidden); row.SetField("leadtmavg", entity.leadtmavg); row.SetField("avgltdt", entity.avgltdt); row.SetField("frozenltty", entity.frozenltty); row.SetField("criticalpt", entity.criticalpt); row.SetField("oordpt", entity.oordpt); row.SetField("orderpt", entity.orderpt); row.SetField("olinept", entity.olinept); row.SetField("linept", entity.linept); row.SetField("ordqtyin", entity.ordqtyin); row.SetField("ordcalc", entity.ordcalc); row.SetField("class", entity.@class); row.SetField("criticalfl", entity.criticalfl); row.SetField("safetyallow", entity.safetyallow); row.SetField("unit", entity.unit); row.SetField("criticalflhidden", entity.criticalflhidden); row.SetField("frozenlttyhidden", entity.frozenlttyhidden); row.SetField("ncnr", entity.ncnr); row.SetField("eccnclasscd", entity.eccnclasscd); row.SetField("totusagerate", entity.totusagerate); row.SetField("userfield", entity.userfield); }