Esempio n. 1
0
        public static Pdspcustprodupdcriteria BuildPdspcustprodupdcriteriaFromRow(DataRow row)
        {
            Pdspcustprodupdcriteria entity = new Pdspcustprodupdcriteria();

            entity.iRecno          = row.IsNull("iRecno") ? 0 : row.Field <int>("iRecno");
            entity.cLevelcd        = row.IsNull("cLevelcd") ? string.Empty : row.Field <string>("cLevelcd");
            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.prctype         = row.IsNull("prctype") ? string.Empty : row.Field <string>("prctype");
            entity.priceonty       = row.IsNull("priceonty") ? string.Empty : row.Field <string>("priceonty");
            entity.qtytype         = row.IsNull("qtytype") ? string.Empty : row.Field <string>("qtytype");
            entity.qtybreakty      = row.IsNull("qtybreakty") ? string.Empty : row.Field <string>("qtybreakty");
            entity.pricesheet      = row.IsNull("pricesheet") ? string.Empty : row.Field <string>("pricesheet");
            entity.priceeffdt      = row.Field <DateTime?>("priceeffdt");
            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.minqty          = row.IsNull("minqty") ? decimal.Zero : row.Field <decimal>("minqty");
            entity.maxqty          = row.IsNull("maxqty") ? decimal.Zero : row.Field <decimal>("maxqty");
            entity.actqty          = row.IsNull("actqty") ? decimal.Zero : row.Field <decimal>("actqty");
            entity.maxqtytype      = row.IsNull("maxqtytype") ? string.Empty : row.Field <string>("maxqtytype");
            entity.hardmaxfl       = row.Field <bool>("hardmaxfl");
            entity.pround          = row.IsNull("pround") ? string.Empty : row.Field <string>("pround");
            entity.ptarget         = row.IsNull("ptarget") ? 0 : row.Field <int>("ptarget");
            entity.usertarget      = row.IsNull("usertarget") ? decimal.Zero : row.Field <decimal>("usertarget");
            entity.hardsysprfl     = row.Field <bool>("hardsysprfl");
            entity.overridepctup   = row.IsNull("overridepctup") ? decimal.Zero : row.Field <decimal>("overridepctup");
            entity.overridepctdown = row.IsNull("overridepctdown") ? decimal.Zero : row.Field <decimal>("overridepctdown");
            entity.user1           = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2           = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3           = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4           = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5           = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.user6           = row.Field <decimal?>("user6");
            entity.user7           = row.Field <decimal?>("user7");
            entity.user8           = row.Field <DateTime?>("user8");
            entity.user9           = row.Field <DateTime?>("user9");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Esempio n. 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdspcustprodupdcriteria(ref DataRow row, Pdspcustprodupdcriteria entity)
 {
     row.SetField("iRecno", entity.iRecno);
     row.SetField("cLevelcd", entity.cLevelcd);
     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("prctype", entity.prctype);
     row.SetField("priceonty", entity.priceonty);
     row.SetField("qtytype", entity.qtytype);
     row.SetField("qtybreakty", entity.qtybreakty);
     row.SetField("pricesheet", entity.pricesheet);
     row.SetField("priceeffdt", entity.priceeffdt);
     row.SetField("contractno", entity.contractno);
     row.SetField("modifier", entity.modifier);
     row.SetField("modrebfl", entity.modrebfl);
     row.SetField("minqty", entity.minqty);
     row.SetField("maxqty", entity.maxqty);
     row.SetField("actqty", entity.actqty);
     row.SetField("maxqtytype", entity.maxqtytype);
     row.SetField("hardmaxfl", entity.hardmaxfl);
     row.SetField("pround", entity.pround);
     row.SetField("ptarget", entity.ptarget);
     row.SetField("usertarget", entity.usertarget);
     row.SetField("hardsysprfl", entity.hardsysprfl);
     row.SetField("overridepctup", entity.overridepctup);
     row.SetField("overridepctdown", entity.overridepctdown);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
     row.SetField("userfield", entity.userfield);
 }