Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdemloadpdsc3results(ref DataRow row, Pdemloadpdsc3results entity)
 {
     row.SetField("updttype", entity.updttype);
     row.SetField("custtype", entity.custtype);
     row.SetField("prodprcty", entity.prodprcty);
     row.SetField("rebatety", entity.rebatety);
     row.SetField("rebsubty", entity.rebsubty);
     row.SetField("prod", entity.prod);
     row.SetField("prodnotesfl", entity.prodnotesfl);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("proddesc2", entity.proddesc2);
     row.SetField("whse", entity.whse);
     row.SetField("units", entity.units);
     row.SetField("startdt", entity.startdt);
     row.SetField("enddt", entity.enddt);
     row.SetField("ContractNo", entity.contractNo);
     row.SetField("prctype", entity.prctype);
     row.SetField("PriceSheet", entity.priceSheet);
     row.SetField("PriceEffectiveDate", entity.priceEffectiveDate);
     row.SetField("refer", entity.refer);
     row.SetField("statustype", entity.statustype);
     row.SetField("qtybreakty", entity.qtybreakty);
     row.SetField("priceonty", entity.priceonty);
     row.SetField("prcmult1", entity.prcmult1);
     row.SetField("prcmult2", entity.prcmult2);
     row.SetField("prcmult3", entity.prcmult3);
     row.SetField("prcmult4", entity.prcmult4);
     row.SetField("prcmult5", entity.prcmult5);
     row.SetField("prcmult6", entity.prcmult6);
     row.SetField("prcmult7", entity.prcmult7);
     row.SetField("prcmult8", entity.prcmult8);
     row.SetField("prcmult9", entity.prcmult9);
     row.SetField("qtybrk1", entity.qtybrk1);
     row.SetField("qtybrk2", entity.qtybrk2);
     row.SetField("qtybrk3", entity.qtybrk3);
     row.SetField("qtybrk4", entity.qtybrk4);
     row.SetField("qtybrk5", entity.qtybrk5);
     row.SetField("qtybrk6", entity.qtybrk6);
     row.SetField("qtybrk7", entity.qtybrk7);
     row.SetField("qtybrk8", entity.qtybrk8);
     row.SetField("prcdisc1", entity.prcdisc1);
     row.SetField("prcdisc2", entity.prcdisc2);
     row.SetField("prcdisc3", entity.prcdisc3);
     row.SetField("prcdisc4", entity.prcdisc4);
     row.SetField("prcdisc5", entity.prcdisc5);
     row.SetField("prcdisc6", entity.prcdisc6);
     row.SetField("prcdisc7", entity.prcdisc7);
     row.SetField("prcdisc8", entity.prcdisc8);
     row.SetField("prcdisc9", entity.prcdisc9);
     row.SetField("pdrecno", entity.pdrecno);
     row.SetField("cUpdErrMsg", entity.cUpdErrMsg);
     row.SetField("modifiernm", entity.modifiernm);
     row.SetField("modifierrebfl", entity.modifierrebfl);
     row.SetField("hardpricefl", entity.hardpricefl);
     row.SetField("hardmaxqtyfl", entity.hardmaxqtyfl);
     row.SetField("maxqty", entity.maxqty);
     row.SetField("maxqtytype", entity.maxqtytype);
     row.SetField("ovrridepctup", entity.ovrridepctup);
     row.SetField("ovrridepctdown", entity.ovrridepctdown);
     row.SetField("lastuseddt", entity.lastuseddt);
     row.SetField("region", entity.region);
     row.SetField("pv_pdmline_rowid", entity.pvPdmlineRowid.ToByteArray());
     row.SetField("excelrowid", entity.excelrowid);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Pdemloadpdsc3results BuildPdemloadpdsc3resultsFromRow(DataRow row)
        {
            Pdemloadpdsc3results entity = new Pdemloadpdsc3results();

            entity.updttype           = row.Field <bool>("updttype");
            entity.custtype           = row.IsNull("custtype") ? string.Empty : row.Field <string>("custtype");
            entity.prodprcty          = row.IsNull("prodprcty") ? string.Empty : row.Field <string>("prodprcty");
            entity.rebatety           = row.IsNull("rebatety") ? string.Empty : row.Field <string>("rebatety");
            entity.rebsubty           = row.IsNull("rebsubty") ? string.Empty : row.Field <string>("rebsubty");
            entity.prod               = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.prodnotesfl        = row.IsNull("prodnotesfl") ? string.Empty : row.Field <string>("prodnotesfl");
            entity.proddesc           = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.proddesc2          = row.IsNull("proddesc2") ? string.Empty : row.Field <string>("proddesc2");
            entity.whse               = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.units              = row.IsNull("units") ? string.Empty : row.Field <string>("units");
            entity.startdt            = row.Field <DateTime?>("startdt");
            entity.enddt              = row.Field <DateTime?>("enddt");
            entity.contractNo         = row.IsNull("ContractNo") ? string.Empty : row.Field <string>("ContractNo");
            entity.prctype            = row.Field <bool>("prctype");
            entity.priceSheet         = row.IsNull("PriceSheet") ? string.Empty : row.Field <string>("PriceSheet");
            entity.priceEffectiveDate = row.Field <DateTime?>("PriceEffectiveDate");
            entity.refer              = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.statustype         = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.qtybreakty         = row.IsNull("qtybreakty") ? string.Empty : row.Field <string>("qtybreakty");
            entity.priceonty          = row.IsNull("priceonty") ? string.Empty : row.Field <string>("priceonty");
            entity.prcmult1           = row.IsNull("prcmult1") ? decimal.Zero : row.Field <decimal>("prcmult1");
            entity.prcmult2           = row.IsNull("prcmult2") ? decimal.Zero : row.Field <decimal>("prcmult2");
            entity.prcmult3           = row.IsNull("prcmult3") ? decimal.Zero : row.Field <decimal>("prcmult3");
            entity.prcmult4           = row.IsNull("prcmult4") ? decimal.Zero : row.Field <decimal>("prcmult4");
            entity.prcmult5           = row.IsNull("prcmult5") ? decimal.Zero : row.Field <decimal>("prcmult5");
            entity.prcmult6           = row.IsNull("prcmult6") ? decimal.Zero : row.Field <decimal>("prcmult6");
            entity.prcmult7           = row.IsNull("prcmult7") ? decimal.Zero : row.Field <decimal>("prcmult7");
            entity.prcmult8           = row.IsNull("prcmult8") ? decimal.Zero : row.Field <decimal>("prcmult8");
            entity.prcmult9           = row.IsNull("prcmult9") ? decimal.Zero : row.Field <decimal>("prcmult9");
            entity.qtybrk1            = row.IsNull("qtybrk1") ? 0 : row.Field <int>("qtybrk1");
            entity.qtybrk2            = row.IsNull("qtybrk2") ? 0 : row.Field <int>("qtybrk2");
            entity.qtybrk3            = row.IsNull("qtybrk3") ? 0 : row.Field <int>("qtybrk3");
            entity.qtybrk4            = row.IsNull("qtybrk4") ? 0 : row.Field <int>("qtybrk4");
            entity.qtybrk5            = row.IsNull("qtybrk5") ? 0 : row.Field <int>("qtybrk5");
            entity.qtybrk6            = row.IsNull("qtybrk6") ? 0 : row.Field <int>("qtybrk6");
            entity.qtybrk7            = row.IsNull("qtybrk7") ? 0 : row.Field <int>("qtybrk7");
            entity.qtybrk8            = row.IsNull("qtybrk8") ? 0 : row.Field <int>("qtybrk8");
            entity.prcdisc1           = row.IsNull("prcdisc1") ? decimal.Zero : row.Field <decimal>("prcdisc1");
            entity.prcdisc2           = row.IsNull("prcdisc2") ? decimal.Zero : row.Field <decimal>("prcdisc2");
            entity.prcdisc3           = row.IsNull("prcdisc3") ? decimal.Zero : row.Field <decimal>("prcdisc3");
            entity.prcdisc4           = row.IsNull("prcdisc4") ? decimal.Zero : row.Field <decimal>("prcdisc4");
            entity.prcdisc5           = row.IsNull("prcdisc5") ? decimal.Zero : row.Field <decimal>("prcdisc5");
            entity.prcdisc6           = row.IsNull("prcdisc6") ? decimal.Zero : row.Field <decimal>("prcdisc6");
            entity.prcdisc7           = row.IsNull("prcdisc7") ? decimal.Zero : row.Field <decimal>("prcdisc7");
            entity.prcdisc8           = row.IsNull("prcdisc8") ? decimal.Zero : row.Field <decimal>("prcdisc8");
            entity.prcdisc9           = row.IsNull("prcdisc9") ? decimal.Zero : row.Field <decimal>("prcdisc9");
            entity.pdrecno            = row.IsNull("pdrecno") ? 0 : row.Field <int>("pdrecno");
            entity.cUpdErrMsg         = row.IsNull("cUpdErrMsg") ? string.Empty : row.Field <string>("cUpdErrMsg");
            entity.modifiernm         = row.IsNull("modifiernm") ? string.Empty : row.Field <string>("modifiernm");
            entity.modifierrebfl      = row.Field <bool>("modifierrebfl");
            entity.hardpricefl        = row.Field <bool>("hardpricefl");
            entity.hardmaxqtyfl       = row.Field <bool>("hardmaxqtyfl");
            entity.maxqty             = row.IsNull("maxqty") ? decimal.Zero : row.Field <decimal>("maxqty");
            entity.maxqtytype         = row.IsNull("maxqtytype") ? string.Empty : row.Field <string>("maxqtytype");
            entity.ovrridepctup       = row.IsNull("ovrridepctup") ? decimal.Zero : row.Field <decimal>("ovrridepctup");
            entity.ovrridepctdown     = row.IsNull("ovrridepctdown") ? decimal.Zero : row.Field <decimal>("ovrridepctdown");
            entity.lastuseddt         = row.Field <DateTime?>("lastuseddt");
            entity.region             = row.IsNull("region") ? string.Empty : row.Field <string>("region");
            entity.pvPdmlineRowid     = row.Field <byte[]>("pv_pdmline_rowid").ToStringEncoded();
            entity.excelrowid         = row.IsNull("excelrowid") ? string.Empty : row.Field <string>("excelrowid");
            entity.userfield          = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }