예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdspcustprodinitresults(ref DataRow row, Pdspcustprodinitresults entity)
 {
     row.SetField("enddt", entity.enddt);
     row.SetField("statusty", entity.statusty);
     row.SetField("reference", entity.reference);
     row.SetField("promofl", entity.promofl);
     row.SetField("jobno", entity.jobno);
     row.SetField("quoteno", entity.quoteno);
     row.SetField("termsdiscfl", entity.termsdiscfl);
     row.SetField("termspct", entity.termspct);
     row.SetField("commtype", entity.commtype);
     row.SetField("prctyperb", entity.prctyperb);
     row.SetField("prctypesv", entity.prctypesv);
     row.SetField("pricesheet", entity.pricesheet);
     row.SetField("priceeffdt", entity.priceeffdt);
     row.SetField("prcontyli", entity.prcontyli);
     row.SetField("prcontypd", entity.prcontypd);
     row.SetField("prcontysv", entity.prcontysv);
     row.SetField("prcontyshli", entity.prcontyshli);
     row.SetField("prcontyshpd", entity.prcontyshpd);
     row.SetField("qtytyli", entity.qtytyli);
     row.SetField("qtytypd", entity.qtytypd);
     row.SetField("qtytysv", entity.qtytysv);
     row.SetField("qtybrktyli", entity.qtybrktyli);
     row.SetField("qtybrktypd", entity.qtybrktypd);
     row.SetField("qtybrktysv", entity.qtybrktysv);
     row.SetField("contractno", entity.contractno);
     row.SetField("modifier", entity.modifier);
     row.SetField("modrebfl", entity.modrebfl);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Pdspcustprodinitresults BuildPdspcustprodinitresultsFromRow(DataRow row)
        {
            Pdspcustprodinitresults entity = new Pdspcustprodinitresults();

            entity.enddt       = row.Field <DateTime?>("enddt");
            entity.statusty    = row.IsNull("statusty") ? string.Empty : row.Field <string>("statusty");
            entity.reference   = row.IsNull("reference") ? string.Empty : row.Field <string>("reference");
            entity.promofl     = row.Field <bool>("promofl");
            entity.jobno       = row.IsNull("jobno") ? string.Empty : row.Field <string>("jobno");
            entity.quoteno     = row.IsNull("quoteno") ? string.Empty : row.Field <string>("quoteno");
            entity.termsdiscfl = row.Field <bool>("termsdiscfl");
            entity.termspct    = row.IsNull("termspct") ? decimal.Zero : row.Field <decimal>("termspct");
            entity.commtype    = row.IsNull("commtype") ? string.Empty : row.Field <string>("commtype");
            entity.prctyperb   = row.IsNull("prctyperb") ? string.Empty : row.Field <string>("prctyperb");
            entity.prctypesv   = row.IsNull("prctypesv") ? string.Empty : row.Field <string>("prctypesv");
            entity.pricesheet  = row.IsNull("pricesheet") ? string.Empty : row.Field <string>("pricesheet");
            entity.priceeffdt  = row.Field <DateTime?>("priceeffdt");
            entity.prcontyli   = row.IsNull("prcontyli") ? string.Empty : row.Field <string>("prcontyli");
            entity.prcontypd   = row.IsNull("prcontypd") ? string.Empty : row.Field <string>("prcontypd");
            entity.prcontysv   = row.IsNull("prcontysv") ? string.Empty : row.Field <string>("prcontysv");
            entity.prcontyshli = row.IsNull("prcontyshli") ? string.Empty : row.Field <string>("prcontyshli");
            entity.prcontyshpd = row.IsNull("prcontyshpd") ? string.Empty : row.Field <string>("prcontyshpd");
            entity.qtytyli     = row.IsNull("qtytyli") ? string.Empty : row.Field <string>("qtytyli");
            entity.qtytypd     = row.IsNull("qtytypd") ? string.Empty : row.Field <string>("qtytypd");
            entity.qtytysv     = row.IsNull("qtytysv") ? string.Empty : row.Field <string>("qtytysv");
            entity.qtybrktyli  = row.IsNull("qtybrktyli") ? string.Empty : row.Field <string>("qtybrktyli");
            entity.qtybrktypd  = row.IsNull("qtybrktypd") ? string.Empty : row.Field <string>("qtybrktypd");
            entity.qtybrktysv  = row.IsNull("qtybrktysv") ? string.Empty : row.Field <string>("qtybrktysv");
            entity.contractno  = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno");
            entity.modifier    = row.IsNull("modifier") ? string.Empty : row.Field <string>("modifier");
            entity.modrebfl    = row.Field <bool>("modrebfl");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }