Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromKitnonstocksingle(ref DataRow row, Kitnonstocksingle entity)
 {
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("hiddenwhse", entity.hiddenwhse);
     row.SetField("windowtitle", entity.windowtitle);
     row.SetField("price", entity.price);
     row.SetField("prodcost", entity.prodcost);
     row.SetField("countryoforigin", entity.countryoforigin);
     row.SetField("tariffcd", entity.tariffcd);
     row.SetField("warrexchgfl", entity.warrexchgfl);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("kitwhse", entity.kitwhse);
     row.SetField("functionname", entity.functionname);
     row.SetField("inquiryfl", entity.inquiryfl);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("proddescmodified", entity.proddescmodified);
     row.SetField("origprod", entity.origprod);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendorname", entity.vendorname);
     row.SetField("vendnoentryfl", entity.vendnoentryfl);
     row.SetField("foreigncost", entity.foreigncost);
     row.SetField("currencyty", entity.currencyty);
     row.SetField("shortdesc", entity.shortdesc);
     row.SetField("exchgrate", entity.exchgrate);
     row.SetField("pricetype", entity.pricetype);
     row.SetField("pricetypedesc", entity.pricetypedesc);
     row.SetField("pricetypeentryfl", entity.pricetypeentryfl);
     row.SetField("prodline", entity.prodline);
     row.SetField("linedesc", entity.linedesc);
     row.SetField("arpwhse", entity.arpwhse);
     row.SetField("arpwhsedesc", entity.arpwhsedesc);
     row.SetField("arpwhseentryfl", entity.arpwhseentryfl);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("catdesc", entity.catdesc);
     row.SetField("origprodcost", entity.origprodcost);
     row.SetField("costoverfl", entity.costoverfl);
     row.SetField("shipprodenabled", entity.shipprodenabled);
     row.SetField("priceenabled", entity.priceenabled);
     row.SetField("pricetypeenabled", entity.pricetypeenabled);
     row.SetField("prodcostenabled", entity.prodcostenabled);
     row.SetField("proddescenabled", entity.proddescenabled);
     row.SetField("prodcatenabled", entity.prodcatenabled);
     row.SetField("vendnoenabled", entity.vendnoenabled);
     row.SetField("prodlineenabled", entity.prodlineenabled);
     row.SetField("arpwhseenabled", entity.arpwhseenabled);
     row.SetField("countryoforiginenabled", entity.countryoforiginenabled);
     row.SetField("tariffcdenabled", entity.tariffcdenabled);
     row.SetField("btnlookupprodenabled", entity.btnlookupprodenabled);
     row.SetField("btnlookupprodcatenabled", entity.btnlookupprodcatenabled);
     row.SetField("btnlookuppricetypeenabled", entity.btnlookuppricetypeenabled);
     row.SetField("btnlookupvendnoenabled", entity.btnlookupvendnoenabled);
     row.SetField("btnlookupprodlineenabled", entity.btnlookupprodlineenabled);
     row.SetField("btnlookupwhseenabled", entity.btnlookupwhseenabled);
     row.SetField("btn_Cost-Calculatorenabled", entity.btnCostCalculatorenabled);
     row.SetField("currencytyhidden", entity.currencytyhidden);
     row.SetField("shortdeschidden", entity.shortdeschidden);
     row.SetField("exchgratehidden", entity.exchgratehidden);
     row.SetField("foreigncosthidden", entity.foreigncosthidden);
     row.SetField("btn_Cost-Calculatorhidden", entity.btnCostCalculatorhidden);
     row.SetField("forcespecactasked", entity.forcespecactasked);
     row.SetField("forcespecactanswer", entity.forcespecactanswer);
     row.SetField("forcespecinactasked", entity.forcespecinactasked);
     row.SetField("forcespecinactanswer", entity.forcespecinactanswer);
     row.SetField("quesanswer", entity.quesanswer);
     row.SetField("quesdescrip1", entity.quesdescrip1);
     row.SetField("quesdescrip2", entity.quesdescrip2);
     row.SetField("quespriceavail", entity.quespriceavail);
     row.SetField("quesprodcat", entity.quesprodcat);
     row.SetField("quesmessage", entity.quesmessage);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Kitnonstocksingle BuildKitnonstocksingleFromRow(DataRow row)
        {
            Kitnonstocksingle entity = new Kitnonstocksingle();

            entity.orderno                   = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf                  = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.lineno                    = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.hiddenwhse                = row.IsNull("hiddenwhse") ? string.Empty : row.Field <string>("hiddenwhse");
            entity.windowtitle               = row.IsNull("windowtitle") ? string.Empty : row.Field <string>("windowtitle");
            entity.price                     = row.IsNull("price") ? decimal.Zero : row.Field <decimal>("price");
            entity.prodcost                  = row.IsNull("prodcost") ? decimal.Zero : row.Field <decimal>("prodcost");
            entity.countryoforigin           = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin");
            entity.tariffcd                  = row.IsNull("tariffcd") ? string.Empty : row.Field <string>("tariffcd");
            entity.warrexchgfl               = row.Field <bool>("warrexchgfl");
            entity.ordertype                 = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.kitwhse                   = row.IsNull("kitwhse") ? string.Empty : row.Field <string>("kitwhse");
            entity.functionname              = row.IsNull("functionname") ? string.Empty : row.Field <string>("functionname");
            entity.inquiryfl                 = row.Field <bool>("inquiryfl");
            entity.shipprod                  = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.proddesc                  = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.proddescmodified          = row.Field <bool>("proddescmodified");
            entity.origprod                  = row.IsNull("origprod") ? string.Empty : row.Field <string>("origprod");
            entity.vendno                    = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendorname                = row.IsNull("vendorname") ? string.Empty : row.Field <string>("vendorname");
            entity.vendnoentryfl             = row.Field <bool>("vendnoentryfl");
            entity.foreigncost               = row.IsNull("foreigncost") ? decimal.Zero : row.Field <decimal>("foreigncost");
            entity.currencyty                = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty");
            entity.shortdesc                 = row.IsNull("shortdesc") ? string.Empty : row.Field <string>("shortdesc");
            entity.exchgrate                 = row.IsNull("exchgrate") ? decimal.Zero : row.Field <decimal>("exchgrate");
            entity.pricetype                 = row.IsNull("pricetype") ? string.Empty : row.Field <string>("pricetype");
            entity.pricetypedesc             = row.IsNull("pricetypedesc") ? string.Empty : row.Field <string>("pricetypedesc");
            entity.pricetypeentryfl          = row.Field <bool>("pricetypeentryfl");
            entity.prodline                  = row.IsNull("prodline") ? string.Empty : row.Field <string>("prodline");
            entity.linedesc                  = row.IsNull("linedesc") ? string.Empty : row.Field <string>("linedesc");
            entity.arpwhse                   = row.IsNull("arpwhse") ? string.Empty : row.Field <string>("arpwhse");
            entity.arpwhsedesc               = row.IsNull("arpwhsedesc") ? string.Empty : row.Field <string>("arpwhsedesc");
            entity.arpwhseentryfl            = row.IsNull("arpwhseentryfl") ? string.Empty : row.Field <string>("arpwhseentryfl");
            entity.prodcat                   = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.catdesc                   = row.IsNull("catdesc") ? string.Empty : row.Field <string>("catdesc");
            entity.origprodcost              = row.IsNull("origprodcost") ? decimal.Zero : row.Field <decimal>("origprodcost");
            entity.costoverfl                = row.Field <bool>("costoverfl");
            entity.shipprodenabled           = row.Field <bool>("shipprodenabled");
            entity.priceenabled              = row.Field <bool>("priceenabled");
            entity.pricetypeenabled          = row.Field <bool>("pricetypeenabled");
            entity.prodcostenabled           = row.Field <bool>("prodcostenabled");
            entity.proddescenabled           = row.Field <bool>("proddescenabled");
            entity.prodcatenabled            = row.Field <bool>("prodcatenabled");
            entity.vendnoenabled             = row.Field <bool>("vendnoenabled");
            entity.prodlineenabled           = row.Field <bool>("prodlineenabled");
            entity.arpwhseenabled            = row.Field <bool>("arpwhseenabled");
            entity.countryoforiginenabled    = row.Field <bool>("countryoforiginenabled");
            entity.tariffcdenabled           = row.Field <bool>("tariffcdenabled");
            entity.btnlookupprodenabled      = row.Field <bool>("btnlookupprodenabled");
            entity.btnlookupprodcatenabled   = row.Field <bool>("btnlookupprodcatenabled");
            entity.btnlookuppricetypeenabled = row.Field <bool>("btnlookuppricetypeenabled");
            entity.btnlookupvendnoenabled    = row.Field <bool>("btnlookupvendnoenabled");
            entity.btnlookupprodlineenabled  = row.Field <bool>("btnlookupprodlineenabled");
            entity.btnlookupwhseenabled      = row.Field <bool>("btnlookupwhseenabled");
            entity.btnCostCalculatorenabled  = row.Field <bool>("btn_Cost-Calculatorenabled");
            entity.currencytyhidden          = row.Field <bool>("currencytyhidden");
            entity.shortdeschidden           = row.Field <bool>("shortdeschidden");
            entity.exchgratehidden           = row.Field <bool>("exchgratehidden");
            entity.foreigncosthidden         = row.Field <bool>("foreigncosthidden");
            entity.btnCostCalculatorhidden   = row.Field <bool>("btn_Cost-Calculatorhidden");
            entity.forcespecactasked         = row.Field <bool>("forcespecactasked");
            entity.forcespecactanswer        = row.Field <bool>("forcespecactanswer");
            entity.forcespecinactasked       = row.Field <bool>("forcespecinactasked");
            entity.forcespecinactanswer      = row.Field <bool>("forcespecinactanswer");
            entity.quesanswer                = row.IsNull("quesanswer") ? string.Empty : row.Field <string>("quesanswer");
            entity.quesdescrip1              = row.IsNull("quesdescrip1") ? string.Empty : row.Field <string>("quesdescrip1");
            entity.quesdescrip2              = row.IsNull("quesdescrip2") ? string.Empty : row.Field <string>("quesdescrip2");
            entity.quespriceavail            = row.IsNull("quespriceavail") ? string.Empty : row.Field <string>("quespriceavail");
            entity.quesprodcat               = row.IsNull("quesprodcat") ? string.Empty : row.Field <string>("quesprodcat");
            entity.quesmessage               = row.IsNull("quesmessage") ? string.Empty : row.Field <string>("quesmessage");
            entity.userfield                 = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }