Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOelinepricetab(ref DataRow row, Oelinepricetab entity)
 {
     row.SetField("shipprod", entity.shipprod);
     row.SetField("btnpricesheethidden", entity.btnpricesheethidden);
     row.SetField("btnpricesheetenabled", entity.btnpricesheetenabled);
     row.SetField("btnapplyenabled", entity.btnapplyenabled);
     row.SetField("btnsystempricingenabled", entity.btnsystempricingenabled);
     row.SetField("btnignorequoteenabled", entity.btnignorequoteenabled);
     row.SetField("btnrestorepricingenabled", entity.btnrestorepricingenabled);
     row.SetField("discountlevel", entity.discountlevel);
     row.SetField("discountlevelenabled", entity.discountlevelenabled);
     row.SetField("pricinglevel", entity.pricinglevel);
     row.SetField("pricinglevelenabled", entity.pricinglevelenabled);
     row.SetField("previousprc", entity.previousprc);
     row.SetField("previousprcrecid", entity.previousprcrecid);
     row.SetField("previousprcdspl", entity.previousprcdspl);
     row.SetField("previousprcenabled", entity.previousprcenabled);
     row.SetField("percent", entity.percent);
     row.SetField("percentenabled", entity.percentenabled);
     row.SetField("percentof", entity.percentof);
     row.SetField("percentofenabled", entity.percentofenabled);
     row.SetField("firsthardpricefl", entity.firsthardpricefl);
     row.SetField("pdscrecid", entity.pdscrecid);
     row.SetField("icscrecid", entity.icscrecid);
     row.SetField("kitrollty", entity.kitrollty);
     row.SetField("pricingmodified", entity.pricingmodified);
     row.SetField("percentmodified", entity.percentmodified);
     row.SetField("percentofmodified", entity.percentofmodified);
     row.SetField("hightolprice", entity.hightolprice);
     row.SetField("lowtolprice", entity.lowtolprice);
     row.SetField("lastdisclevel", entity.lastdisclevel);
     row.SetField("lastpricelevel", entity.lastpricelevel);
     row.SetField("lastpreviousprc", entity.lastpreviousprc);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Oelinepricetab BuildOelinepricetabFromRow(DataRow row)
        {
            Oelinepricetab entity = new Oelinepricetab();

            entity.shipprod                 = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.btnpricesheethidden      = row.Field <bool>("btnpricesheethidden");
            entity.btnpricesheetenabled     = row.Field <bool>("btnpricesheetenabled");
            entity.btnapplyenabled          = row.Field <bool>("btnapplyenabled");
            entity.btnsystempricingenabled  = row.Field <bool>("btnsystempricingenabled");
            entity.btnignorequoteenabled    = row.Field <bool>("btnignorequoteenabled");
            entity.btnrestorepricingenabled = row.Field <bool>("btnrestorepricingenabled");
            entity.discountlevel            = row.IsNull("discountlevel") ? 0 : row.Field <int>("discountlevel");
            entity.discountlevelenabled     = row.Field <bool>("discountlevelenabled");
            entity.pricinglevel             = row.IsNull("pricinglevel") ? 0 : row.Field <int>("pricinglevel");
            entity.pricinglevelenabled      = row.Field <bool>("pricinglevelenabled");
            entity.previousprc              = row.IsNull("previousprc") ? decimal.Zero : row.Field <decimal>("previousprc");
            entity.previousprcrecid         = row.IsNull("previousprcrecid") ? 0 : row.Field <long>("previousprcrecid");
            entity.previousprcdspl          = row.IsNull("previousprcdspl") ? string.Empty : row.Field <string>("previousprcdspl");
            entity.previousprcenabled       = row.Field <bool>("previousprcenabled");
            entity.percent           = row.IsNull("percent") ? decimal.Zero : row.Field <decimal>("percent");
            entity.percentenabled    = row.Field <bool>("percentenabled");
            entity.percentof         = row.IsNull("percentof") ? string.Empty : row.Field <string>("percentof");
            entity.percentofenabled  = row.Field <bool>("percentofenabled");
            entity.firsthardpricefl  = row.Field <bool>("firsthardpricefl");
            entity.pdscrecid         = row.IsNull("pdscrecid") ? 0 : row.Field <long>("pdscrecid");
            entity.icscrecid         = row.IsNull("icscrecid") ? 0 : row.Field <long>("icscrecid");
            entity.kitrollty         = row.IsNull("kitrollty") ? string.Empty : row.Field <string>("kitrollty");
            entity.pricingmodified   = row.Field <bool>("pricingmodified");
            entity.percentmodified   = row.Field <bool>("percentmodified");
            entity.percentofmodified = row.Field <bool>("percentofmodified");
            entity.hightolprice      = row.IsNull("hightolprice") ? decimal.Zero : row.Field <decimal>("hightolprice");
            entity.lowtolprice       = row.IsNull("lowtolprice") ? decimal.Zero : row.Field <decimal>("lowtolprice");
            entity.lastdisclevel     = row.IsNull("lastdisclevel") ? 0 : row.Field <int>("lastdisclevel");
            entity.lastpricelevel    = row.IsNull("lastpricelevel") ? 0 : row.Field <int>("lastpricelevel");
            entity.lastpreviousprc   = row.IsNull("lastpreviousprc") ? decimal.Zero : row.Field <decimal>("lastpreviousprc");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }