Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPoeidetailaddons(ref DataRow row, Poeidetailaddons entity)
 {
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("vendcurrsymbol", entity.vendcurrsymbol);
     row.SetField("currencyty", entity.currencyty);
     row.SetField("currsymbol", entity.currsymbol);
     row.SetField("currencydesc", entity.currencydesc);
     row.SetField("freightexpectfl", entity.freightexpectfl);
     row.SetField("freightexpectmsg", entity.freightexpectmsg);
     row.SetField("wodiscnet", entity.wodiscnet);
     row.SetField("wodiscdist", entity.wodiscdist);
     row.SetField("wodisctype", entity.wodisctype);
     row.SetField("wodiscamt", entity.wodiscamt);
     row.SetField("wodiscproof", entity.wodiscproof);
     row.SetField("wodiscnet-hidden", entity.wodiscnetHidden);
     row.SetField("wodiscamt-sensitive", entity.wodiscamtSensitive);
     row.SetField("wodiscamt-hidden", entity.wodiscamtHidden);
     row.SetField("wodisctype-sensitive", entity.wodisctypeSensitive);
     row.SetField("wodisctype-hidden", entity.wodisctypeHidden);
     row.SetField("wodiscproof-hidden", entity.wodiscproofHidden);
     row.SetField("addonno1", entity.addonno1);
     row.SetField("addonno2", entity.addonno2);
     row.SetField("addonno3", entity.addonno3);
     row.SetField("addonno4", entity.addonno4);
     row.SetField("addondescr1", entity.addondescr1);
     row.SetField("addondescr2", entity.addondescr2);
     row.SetField("addondescr3", entity.addondescr3);
     row.SetField("addondescr4", entity.addondescr4);
     row.SetField("addonno1-sensitive", entity.addonno1Sensitive);
     row.SetField("addonno2-sensitive", entity.addonno2Sensitive);
     row.SetField("addonno3-sensitive", entity.addonno3Sensitive);
     row.SetField("addonno4-sensitive", entity.addonno4Sensitive);
     row.SetField("addonnet1", entity.addonnet1);
     row.SetField("addonnet2", entity.addonnet2);
     row.SetField("addonnet3", entity.addonnet3);
     row.SetField("addonnet4", entity.addonnet4);
     row.SetField("addonamt1", entity.addonamt1);
     row.SetField("addonamt2", entity.addonamt2);
     row.SetField("addonamt3", entity.addonamt3);
     row.SetField("addonamt4", entity.addonamt4);
     row.SetField("addonamt1-sensitive", entity.addonamt1Sensitive);
     row.SetField("addonamt2-sensitive", entity.addonamt2Sensitive);
     row.SetField("addonamt3-sensitive", entity.addonamt3Sensitive);
     row.SetField("addonamt4-sensitive", entity.addonamt4Sensitive);
     row.SetField("addontype1", entity.addontype1);
     row.SetField("addontype2", entity.addontype2);
     row.SetField("addontype3", entity.addontype3);
     row.SetField("addontype4", entity.addontype4);
     row.SetField("addontype1-sensitive", entity.addontype1Sensitive);
     row.SetField("addontype2-sensitive", entity.addontype2Sensitive);
     row.SetField("addontype3-sensitive", entity.addontype3Sensitive);
     row.SetField("addontype4-sensitive", entity.addontype4Sensitive);
     row.SetField("addondistamt1", entity.addondistamt1);
     row.SetField("addondistamt2", entity.addondistamt2);
     row.SetField("addondistamt3", entity.addondistamt3);
     row.SetField("addondistamt4", entity.addondistamt4);
     row.SetField("addondistty1", entity.addondistty1);
     row.SetField("addondistty2", entity.addondistty2);
     row.SetField("addondistty3", entity.addondistty3);
     row.SetField("addondistty4", entity.addondistty4);
     row.SetField("addondistty1-sensitive", entity.addondistty1Sensitive);
     row.SetField("addondistty2-sensitive", entity.addondistty2Sensitive);
     row.SetField("addondistty3-sensitive", entity.addondistty3Sensitive);
     row.SetField("addondistty4-sensitive", entity.addondistty4Sensitive);
     row.SetField("addonproof1", entity.addonproof1);
     row.SetField("addonproof2", entity.addonproof2);
     row.SetField("addonproof3", entity.addonproof3);
     row.SetField("addonproof4", entity.addonproof4);
     row.SetField("addoncaptype1", entity.addoncaptype1);
     row.SetField("addoncaptype2", entity.addoncaptype2);
     row.SetField("addoncaptype3", entity.addoncaptype3);
     row.SetField("addoncaptype4", entity.addoncaptype4);
     row.SetField("addoncaptype1-sensitive", entity.addoncaptype1Sensitive);
     row.SetField("addoncaptype2-sensitive", entity.addoncaptype2Sensitive);
     row.SetField("addoncaptype3-sensitive", entity.addoncaptype3Sensitive);
     row.SetField("addoncaptype4-sensitive", entity.addoncaptype4Sensitive);
     row.SetField("btnupdate-sensitive", entity.btnupdateSensitive);
     row.SetField("textmsg1", entity.textmsg1);
     row.SetField("textmsg2", entity.textmsg2);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Poeidetailaddons BuildPoeidetailaddonsFromRow(DataRow row)
        {
            Poeidetailaddons entity = new Poeidetailaddons();

            entity.pono                   = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf                  = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.vendcurrsymbol         = row.IsNull("vendcurrsymbol") ? string.Empty : row.Field <string>("vendcurrsymbol");
            entity.currencyty             = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty");
            entity.currsymbol             = row.IsNull("currsymbol") ? string.Empty : row.Field <string>("currsymbol");
            entity.currencydesc           = row.IsNull("currencydesc") ? string.Empty : row.Field <string>("currencydesc");
            entity.freightexpectfl        = row.Field <bool>("freightexpectfl");
            entity.freightexpectmsg       = row.IsNull("freightexpectmsg") ? string.Empty : row.Field <string>("freightexpectmsg");
            entity.wodiscnet              = row.IsNull("wodiscnet") ? decimal.Zero : row.Field <decimal>("wodiscnet");
            entity.wodiscdist             = row.IsNull("wodiscdist") ? decimal.Zero : row.Field <decimal>("wodiscdist");
            entity.wodisctype             = row.Field <bool>("wodisctype");
            entity.wodiscamt              = row.IsNull("wodiscamt") ? decimal.Zero : row.Field <decimal>("wodiscamt");
            entity.wodiscproof            = row.IsNull("wodiscproof") ? decimal.Zero : row.Field <decimal>("wodiscproof");
            entity.wodiscnetHidden        = row.Field <bool>("wodiscnet-hidden");
            entity.wodiscamtSensitive     = row.Field <bool>("wodiscamt-sensitive");
            entity.wodiscamtHidden        = row.Field <bool>("wodiscamt-hidden");
            entity.wodisctypeSensitive    = row.Field <bool>("wodisctype-sensitive");
            entity.wodisctypeHidden       = row.Field <bool>("wodisctype-hidden");
            entity.wodiscproofHidden      = row.Field <bool>("wodiscproof-hidden");
            entity.addonno1               = row.IsNull("addonno1") ? 0 : row.Field <int>("addonno1");
            entity.addonno2               = row.IsNull("addonno2") ? 0 : row.Field <int>("addonno2");
            entity.addonno3               = row.IsNull("addonno3") ? 0 : row.Field <int>("addonno3");
            entity.addonno4               = row.IsNull("addonno4") ? 0 : row.Field <int>("addonno4");
            entity.addondescr1            = row.IsNull("addondescr1") ? string.Empty : row.Field <string>("addondescr1");
            entity.addondescr2            = row.IsNull("addondescr2") ? string.Empty : row.Field <string>("addondescr2");
            entity.addondescr3            = row.IsNull("addondescr3") ? string.Empty : row.Field <string>("addondescr3");
            entity.addondescr4            = row.IsNull("addondescr4") ? string.Empty : row.Field <string>("addondescr4");
            entity.addonno1Sensitive      = row.Field <bool>("addonno1-sensitive");
            entity.addonno2Sensitive      = row.Field <bool>("addonno2-sensitive");
            entity.addonno3Sensitive      = row.Field <bool>("addonno3-sensitive");
            entity.addonno4Sensitive      = row.Field <bool>("addonno4-sensitive");
            entity.addonnet1              = row.IsNull("addonnet1") ? decimal.Zero : row.Field <decimal>("addonnet1");
            entity.addonnet2              = row.IsNull("addonnet2") ? decimal.Zero : row.Field <decimal>("addonnet2");
            entity.addonnet3              = row.IsNull("addonnet3") ? decimal.Zero : row.Field <decimal>("addonnet3");
            entity.addonnet4              = row.IsNull("addonnet4") ? decimal.Zero : row.Field <decimal>("addonnet4");
            entity.addonamt1              = row.IsNull("addonamt1") ? decimal.Zero : row.Field <decimal>("addonamt1");
            entity.addonamt2              = row.IsNull("addonamt2") ? decimal.Zero : row.Field <decimal>("addonamt2");
            entity.addonamt3              = row.IsNull("addonamt3") ? decimal.Zero : row.Field <decimal>("addonamt3");
            entity.addonamt4              = row.IsNull("addonamt4") ? decimal.Zero : row.Field <decimal>("addonamt4");
            entity.addonamt1Sensitive     = row.Field <bool>("addonamt1-sensitive");
            entity.addonamt2Sensitive     = row.Field <bool>("addonamt2-sensitive");
            entity.addonamt3Sensitive     = row.Field <bool>("addonamt3-sensitive");
            entity.addonamt4Sensitive     = row.Field <bool>("addonamt4-sensitive");
            entity.addontype1             = row.Field <bool>("addontype1");
            entity.addontype2             = row.Field <bool>("addontype2");
            entity.addontype3             = row.Field <bool>("addontype3");
            entity.addontype4             = row.Field <bool>("addontype4");
            entity.addontype1Sensitive    = row.Field <bool>("addontype1-sensitive");
            entity.addontype2Sensitive    = row.Field <bool>("addontype2-sensitive");
            entity.addontype3Sensitive    = row.Field <bool>("addontype3-sensitive");
            entity.addontype4Sensitive    = row.Field <bool>("addontype4-sensitive");
            entity.addondistamt1          = row.IsNull("addondistamt1") ? decimal.Zero : row.Field <decimal>("addondistamt1");
            entity.addondistamt2          = row.IsNull("addondistamt2") ? decimal.Zero : row.Field <decimal>("addondistamt2");
            entity.addondistamt3          = row.IsNull("addondistamt3") ? decimal.Zero : row.Field <decimal>("addondistamt3");
            entity.addondistamt4          = row.IsNull("addondistamt4") ? decimal.Zero : row.Field <decimal>("addondistamt4");
            entity.addondistty1           = row.IsNull("addondistty1") ? string.Empty : row.Field <string>("addondistty1");
            entity.addondistty2           = row.IsNull("addondistty2") ? string.Empty : row.Field <string>("addondistty2");
            entity.addondistty3           = row.IsNull("addondistty3") ? string.Empty : row.Field <string>("addondistty3");
            entity.addondistty4           = row.IsNull("addondistty4") ? string.Empty : row.Field <string>("addondistty4");
            entity.addondistty1Sensitive  = row.Field <bool>("addondistty1-sensitive");
            entity.addondistty2Sensitive  = row.Field <bool>("addondistty2-sensitive");
            entity.addondistty3Sensitive  = row.Field <bool>("addondistty3-sensitive");
            entity.addondistty4Sensitive  = row.Field <bool>("addondistty4-sensitive");
            entity.addonproof1            = row.IsNull("addonproof1") ? decimal.Zero : row.Field <decimal>("addonproof1");
            entity.addonproof2            = row.IsNull("addonproof2") ? decimal.Zero : row.Field <decimal>("addonproof2");
            entity.addonproof3            = row.IsNull("addonproof3") ? decimal.Zero : row.Field <decimal>("addonproof3");
            entity.addonproof4            = row.IsNull("addonproof4") ? decimal.Zero : row.Field <decimal>("addonproof4");
            entity.addoncaptype1          = row.IsNull("addoncaptype1") ? string.Empty : row.Field <string>("addoncaptype1");
            entity.addoncaptype2          = row.IsNull("addoncaptype2") ? string.Empty : row.Field <string>("addoncaptype2");
            entity.addoncaptype3          = row.IsNull("addoncaptype3") ? string.Empty : row.Field <string>("addoncaptype3");
            entity.addoncaptype4          = row.IsNull("addoncaptype4") ? string.Empty : row.Field <string>("addoncaptype4");
            entity.addoncaptype1Sensitive = row.Field <bool>("addoncaptype1-sensitive");
            entity.addoncaptype2Sensitive = row.Field <bool>("addoncaptype2-sensitive");
            entity.addoncaptype3Sensitive = row.Field <bool>("addoncaptype3-sensitive");
            entity.addoncaptype4Sensitive = row.Field <bool>("addoncaptype4-sensitive");
            entity.btnupdateSensitive     = row.Field <bool>("btnupdate-sensitive");
            entity.textmsg1               = row.IsNull("textmsg1") ? string.Empty : row.Field <string>("textmsg1");
            entity.textmsg2               = row.IsNull("textmsg2") ? string.Empty : row.Field <string>("textmsg2");
            entity.userfield              = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }