コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeesdetaillineextendsingle(ref DataRow row, Oeesdetaillineextendsingle entity)
 {
     row.SetField("lineno", entity.lineno);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("text1", entity.text1);
     row.SetField("text2", entity.text2);
     row.SetField("product", entity.product);
     row.SetField("fidesc", entity.fidesc);
     row.SetField("netavail", entity.netavail);
     row.SetField("onorder", entity.onorder);
     row.SetField("backorder", entity.backorder);
     row.SetField("qtycharged", entity.qtycharged);
     row.SetField("qtychargedenabled", entity.qtychargedenabled);
     row.SetField("qtyunavail", entity.qtyunavail);
     row.SetField("qtyunavailenabled", entity.qtyunavailenabled);
     row.SetField("stockunit", entity.stockunit);
     row.SetField("reasonunavail", entity.reasonunavail);
     row.SetField("reasonunavailenabled", entity.reasonunavailenabled);
     row.SetField("binloc", entity.binloc);
     row.SetField("binlocvisible", entity.binlocvisible);
     row.SetField("binlocenabled", entity.binlocenabled);
     row.SetField("btnokenabled", entity.btnokenabled);
     row.SetField("countryoforigin", entity.countryoforigin);
     row.SetField("tariffcd", entity.tariffcd);
     row.SetField("countryoforiginenabled", entity.countryoforiginenabled);
     row.SetField("tariffcdenabled", entity.tariffcdenabled);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Oeesdetaillineextendsingle BuildOeesdetaillineextendsingleFromRow(DataRow row)
        {
            Oeesdetaillineextendsingle entity = new Oeesdetaillineextendsingle();

            entity.lineno                 = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.orderno                = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf               = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.notesfl                = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.text1                  = row.IsNull("text1") ? string.Empty : row.Field <string>("text1");
            entity.text2                  = row.IsNull("text2") ? string.Empty : row.Field <string>("text2");
            entity.product                = row.IsNull("product") ? string.Empty : row.Field <string>("product");
            entity.fidesc                 = row.IsNull("fidesc") ? string.Empty : row.Field <string>("fidesc");
            entity.netavail               = row.IsNull("netavail") ? decimal.Zero : row.Field <decimal>("netavail");
            entity.onorder                = row.IsNull("onorder") ? decimal.Zero : row.Field <decimal>("onorder");
            entity.backorder              = row.IsNull("backorder") ? decimal.Zero : row.Field <decimal>("backorder");
            entity.qtycharged             = row.IsNull("qtycharged") ? decimal.Zero : row.Field <decimal>("qtycharged");
            entity.qtychargedenabled      = row.Field <bool>("qtychargedenabled");
            entity.qtyunavail             = row.IsNull("qtyunavail") ? decimal.Zero : row.Field <decimal>("qtyunavail");
            entity.qtyunavailenabled      = row.Field <bool>("qtyunavailenabled");
            entity.stockunit              = row.IsNull("stockunit") ? string.Empty : row.Field <string>("stockunit");
            entity.reasonunavail          = row.IsNull("reasonunavail") ? string.Empty : row.Field <string>("reasonunavail");
            entity.reasonunavailenabled   = row.Field <bool>("reasonunavailenabled");
            entity.binloc                 = row.IsNull("binloc") ? string.Empty : row.Field <string>("binloc");
            entity.binlocvisible          = row.Field <bool>("binlocvisible");
            entity.binlocenabled          = row.Field <bool>("binlocenabled");
            entity.btnokenabled           = row.Field <bool>("btnokenabled");
            entity.countryoforigin        = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin");
            entity.tariffcd               = row.IsNull("tariffcd") ? string.Empty : row.Field <string>("tariffcd");
            entity.countryoforiginenabled = row.Field <bool>("countryoforiginenabled");
            entity.tariffcdenabled        = row.Field <bool>("tariffcdenabled");
            entity.userfield              = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }