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

            entity.internalseqno = row.IsNull("internalseqno") ? decimal.Zero : row.Field <decimal>("internalseqno");
            entity.lineno        = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.origrecid     = row.IsNull("origrecid") ? 0 : row.Field <long>("origrecid");
            entity.specnstype    = row.IsNull("specnstype") ? string.Empty : row.Field <string>("specnstype");
            entity.shipprod      = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.totalcost     = row.IsNull("totalcost") ? decimal.Zero : row.Field <decimal>("totalcost");
            entity.custrebamt    = row.IsNull("custrebamt") ? decimal.Zero : row.Field <decimal>("custrebamt");
            entity.vendrebamt    = row.IsNull("vendrebamt") ? decimal.Zero : row.Field <decimal>("vendrebamt");
            entity.updatefl      = row.Field <bool>("updatefl");
            entity.lastupdate    = row.IsNull("lastupdate") ? string.Empty : row.Field <string>("lastupdate");
            entity.csunperstk    = row.IsNull("csunperstk") ? decimal.Zero : row.Field <decimal>("csunperstk");
            entity.specconv      = row.IsNull("specconv") ? 0 : row.Field <int>("specconv");
            entity.prccostper    = row.IsNull("prccostper") ? string.Empty : row.Field <string>("prccostper");
            entity.speccostty    = row.IsNull("speccostty") ? string.Empty : row.Field <string>("speccostty");
            entity.icspecrecno   = row.IsNull("icspecrecno") ? 0 : row.Field <int>("icspecrecno");
            entity.oeelrecid     = row.IsNull("oeelrecid") ? 0 : row.Field <long>("oeelrecid");
            entity.price         = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price");
            entity.discamt       = row.IsNull("discamt") ? decimal.Zero : row.Field <decimal>("discamt");
            entity.disctype      = row.Field <bool>("disctype");
            entity.netord        = row.IsNull("netord") ? decimal.Zero : row.Field <decimal>("netord");
            entity.orignetord    = row.IsNull("orignetord") ? decimal.Zero : row.Field <decimal>("orignetord");
            entity.marginamt     = row.IsNull("marginamt") ? decimal.Zero : row.Field <decimal>("marginamt");
            entity.marginnet     = row.IsNull("marginnet") ? decimal.Zero : row.Field <decimal>("marginnet");
            entity.priceclty     = row.IsNull("priceclty") ? string.Empty : row.Field <string>("priceclty");
            entity.pricecd       = row.IsNull("pricecd") ? decimal.Zero : row.Field <decimal>("pricecd");
            entity.manprice      = row.Field <bool>("manprice");
            entity.pricelevel    = row.IsNull("pricelevel") ? decimal.Zero : row.Field <decimal>("pricelevel");
            entity.priceover     = row.IsNull("priceover") ? decimal.Zero : row.Field <decimal>("priceover");
            entity.pricereset    = row.Field <bool>("pricereset");
            entity.custpricetype = row.IsNull("custpricetype") ? string.Empty : row.Field <string>("custpricetype");
            entity.pdrecno       = row.IsNull("pdrecno") ? 0 : row.Field <int>("pdrecno");
            entity.cost          = row.IsNull("cost") ? decimal.Zero : row.Field <decimal>("cost");
            entity.costtype      = row.IsNull("costtype") ? string.Empty : row.Field <string>("costtype");
            entity.costoverfl    = row.Field <bool>("costoverfl");
            entity.overridetype  = row.IsNull("overridetype") ? string.Empty : row.Field <string>("overridetype");
            entity.hightolprice  = row.IsNull("hightolprice") ? decimal.Zero : row.Field <decimal>("hightolprice");
            entity.lowtolprice   = row.IsNull("lowtolprice") ? decimal.Zero : row.Field <decimal>("lowtolprice");
            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 UpdateRowFromOelinemovepricing(ref DataRow row, Oelinemovepricing entity)
 {
     row.SetField("internalseqno", entity.internalseqno);
     row.SetField("lineno", entity.lineno);
     row.SetField("origrecid", entity.origrecid);
     row.SetField("specnstype", entity.specnstype);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("totalcost", entity.totalcost);
     row.SetField("custrebamt", entity.custrebamt);
     row.SetField("vendrebamt", entity.vendrebamt);
     row.SetField("updatefl", entity.updatefl);
     row.SetField("lastupdate", entity.lastupdate);
     row.SetField("csunperstk", entity.csunperstk);
     row.SetField("specconv", entity.specconv);
     row.SetField("prccostper", entity.prccostper);
     row.SetField("speccostty", entity.speccostty);
     row.SetField("icspecrecno", entity.icspecrecno);
     row.SetField("oeelrecid", entity.oeelrecid);
     row.SetField("price", entity.price);
     row.SetField("discamt", entity.discamt);
     row.SetField("disctype", entity.disctype);
     row.SetField("netord", entity.netord);
     row.SetField("orignetord", entity.orignetord);
     row.SetField("marginamt", entity.marginamt);
     row.SetField("marginnet", entity.marginnet);
     row.SetField("priceclty", entity.priceclty);
     row.SetField("pricecd", entity.pricecd);
     row.SetField("manprice", entity.manprice);
     row.SetField("pricelevel", entity.pricelevel);
     row.SetField("priceover", entity.priceover);
     row.SetField("pricereset", entity.pricereset);
     row.SetField("custpricetype", entity.custpricetype);
     row.SetField("pdrecno", entity.pdrecno);
     row.SetField("cost", entity.cost);
     row.SetField("costtype", entity.costtype);
     row.SetField("costoverfl", entity.costoverfl);
     row.SetField("overridetype", entity.overridetype);
     row.SetField("hightolprice", entity.hightolprice);
     row.SetField("lowtolprice", entity.lowtolprice);
     row.SetField("userfield", entity.userfield);
 }