예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromValinelinetie(ref DataRow row, Valinelinetie entity)
 {
     row.SetField("maint-l", entity.maintL);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("ordertypeenabled", entity.ordertypeenabled);
     row.SetField("ordertypelist", entity.ordertypelist);
     row.SetField("vendno", entity.vendno);
     row.SetField("vendnoenabled", entity.vendnoenabled);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("shipfmnoenabled", entity.shipfmnoenabled);
     row.SetField("poduedate", entity.poduedate);
     row.SetField("poduedateenabled", entity.poduedateenabled);
     row.SetField("poshipvia", entity.poshipvia);
     row.SetField("poshipviaenabled", entity.poshipviaenabled);
     row.SetField("fob", entity.fob);
     row.SetField("fobenabled", entity.fobenabled);
     row.SetField("phoneno", entity.phoneno);
     row.SetField("faxphoneno", entity.faxphoneno);
     row.SetField("expediter", entity.expediter);
     row.SetField("confirm", entity.confirm);
     row.SetField("confirmenabled", entity.confirmenabled);
     row.SetField("orderdate", entity.orderdate);
     row.SetField("orderdatehidden", entity.orderdatehidden);
     row.SetField("wtwhse", entity.wtwhse);
     row.SetField("wtwhseenabled", entity.wtwhseenabled);
     row.SetField("wtduedate", entity.wtduedate);
     row.SetField("wtduedateenabled", entity.wtduedateenabled);
     row.SetField("wtshipvia", entity.wtshipvia);
     row.SetField("wtshipviaenabled", entity.wtshipviaenabled);
     row.SetField("wtcono", entity.wtcono);
     row.SetField("orderaltno", entity.orderaltno);
     row.SetField("orderaltnoenabled", entity.orderaltnoenabled);
     row.SetField("orderaltnohidden", entity.orderaltnohidden);
     row.SetField("vaverno", entity.vaverno);
     row.SetField("vavernoenabled", entity.vavernoenabled);
     row.SetField("vavernohidden", entity.vavernohidden);
     row.SetField("backordertype", entity.backordertype);
     row.SetField("backordertypeenabled", entity.backordertypeenabled);
     row.SetField("powtnew", entity.powtnew);
     row.SetField("powtintfl", entity.powtintfl);
     row.SetField("miscvendor", entity.miscvendor);
     row.SetField("manualname", entity.manualname);
     row.SetField("manualaddr1", entity.manualaddr1);
     row.SetField("manualaddr2", entity.manualaddr2);
     row.SetField("manualaddr3", entity.manualaddr3);
     row.SetField("manualcity", entity.manualcity);
     row.SetField("manualstate", entity.manualstate);
     row.SetField("manualzipcd", entity.manualzipcd);
     row.SetField("backtietype", entity.backtietype);
     row.SetField("backtietypeenabled", entity.backtietypeenabled);
     row.SetField("backtietypehidden", entity.backtietypehidden);
     row.SetField("powtaltno", entity.powtaltno);
     row.SetField("powtaltnoenabled", entity.powtaltnoenabled);
     row.SetField("powtaltnohidden", entity.powtaltnohidden);
     row.SetField("backtiesrcenabled", entity.backtiesrcenabled);
     row.SetField("backtiesrchidden", entity.backtiesrchidden);
     row.SetField("userfield", entity.userfield);
     row.SetField("mutli-src-rowid", entity.mutliSrcRowid.ToByteArray());
     row.SetField("powtorderaltno", entity.powtorderaltno);
     row.SetField("powtorderaltnoenabled", entity.powtorderaltnoenabled);
     row.SetField("powtorderaltnohidden", entity.powtorderaltnohidden);
     row.SetField("powtorderalttype", entity.powtorderalttype);
     row.SetField("powtordertypeenabled", entity.powtordertypeenabled);
     row.SetField("powtlinealtno", entity.powtlinealtno);
     row.SetField("powtvvendno", entity.powtvvendno);
     row.SetField("powtvvendnoenabled", entity.powtvvendnoenabled);
     row.SetField("powtvshipfmno", entity.powtvshipfmno);
     row.SetField("powtvshipfmnoenabled", entity.powtvshipfmnoenabled);
     row.SetField("powtvduedt", entity.powtvduedt);
     row.SetField("powtvduedtenabled", entity.powtvduedtenabled);
     row.SetField("powtvorderdt", entity.powtvorderdt);
     row.SetField("powtvorderdthidden", entity.powtvorderdthidden);
     row.SetField("powtvshipviaty", entity.powtvshipviaty);
     row.SetField("powtvshipviatyenabled", entity.powtvshipviatyenabled);
     row.SetField("powtvfobfl", entity.powtvfobfl);
     row.SetField("powtvfobflenabled", entity.powtvfobflenabled);
     row.SetField("powtvconfirmfl", entity.powtvconfirmfl);
     row.SetField("powtvconfirmflenabled", entity.powtvconfirmflenabled);
     row.SetField("powtwwhse", entity.powtwwhse);
     row.SetField("powtwwhseenabled", entity.powtwwhseenabled);
     row.SetField("powtwduedt", entity.powtwduedt);
     row.SetField("powtwduedtenabled", entity.powtwduedtenabled);
     row.SetField("powtwshipviaty", entity.powtwshipviaty);
     row.SetField("powtwshipviatyenabled", entity.powtwshipviatyenabled);
     row.SetField("powtupdtfl", entity.powtupdtfl);
     row.SetField("powtbackordertype", entity.powtbackordertype);
     row.SetField("powtbackordertypeenabled", entity.powtbackordertypeenabled);
     row.SetField("powtexpediter", entity.powtexpediter);
     row.SetField("powtphoneno", entity.powtphoneno);
     row.SetField("powtfaxphoneno", entity.powtfaxphoneno);
     row.SetField("powtwtcono", entity.powtwtcono);
     row.SetField("powtordertypelist", entity.powtordertypelist);
     row.SetField("defvendno", entity.defvendno);
     row.SetField("defpoduedate", entity.defpoduedate);
     row.SetField("defwtduedate", entity.defwtduedate);
 }
예제 #2
0
        public static Valinelinetie BuildValinelinetieFromRow(DataRow row)
        {
            Valinelinetie entity = new Valinelinetie();

            entity.maintL           = row.IsNull("maint-l") ? string.Empty : row.Field <string>("maint-l");
            entity.ordertype        = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.ordertypeenabled = row.Field <bool>("ordertypeenabled");
            entity.ordertypelist    = row.IsNull("ordertypelist") ? string.Empty : row.Field <string>("ordertypelist");
            entity.vendno           = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.vendnoenabled    = row.Field <bool>("vendnoenabled");
            entity.shipfmno         = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.shipfmnoenabled  = row.Field <bool>("shipfmnoenabled");
            entity.poduedate        = row.Field <DateTime?>("poduedate");
            entity.poduedateenabled = row.Field <bool>("poduedateenabled");
            entity.poshipvia        = row.IsNull("poshipvia") ? string.Empty : row.Field <string>("poshipvia");
            entity.poshipviaenabled = row.Field <bool>("poshipviaenabled");
            entity.fob                      = row.Field <bool>("fob");
            entity.fobenabled               = row.Field <bool>("fobenabled");
            entity.phoneno                  = row.IsNull("phoneno") ? string.Empty : row.Field <string>("phoneno");
            entity.faxphoneno               = row.IsNull("faxphoneno") ? string.Empty : row.Field <string>("faxphoneno");
            entity.expediter                = row.IsNull("expediter") ? string.Empty : row.Field <string>("expediter");
            entity.confirm                  = row.Field <bool>("confirm");
            entity.confirmenabled           = row.Field <bool>("confirmenabled");
            entity.orderdate                = row.Field <DateTime?>("orderdate");
            entity.orderdatehidden          = row.Field <bool>("orderdatehidden");
            entity.wtwhse                   = row.IsNull("wtwhse") ? string.Empty : row.Field <string>("wtwhse");
            entity.wtwhseenabled            = row.Field <bool>("wtwhseenabled");
            entity.wtduedate                = row.Field <DateTime?>("wtduedate");
            entity.wtduedateenabled         = row.Field <bool>("wtduedateenabled");
            entity.wtshipvia                = row.IsNull("wtshipvia") ? string.Empty : row.Field <string>("wtshipvia");
            entity.wtshipviaenabled         = row.Field <bool>("wtshipviaenabled");
            entity.wtcono                   = row.IsNull("wtcono") ? 0 : row.Field <int>("wtcono");
            entity.orderaltno               = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno");
            entity.orderaltnoenabled        = row.Field <bool>("orderaltnoenabled");
            entity.orderaltnohidden         = row.Field <bool>("orderaltnohidden");
            entity.vaverno                  = row.IsNull("vaverno") ? 0 : row.Field <int>("vaverno");
            entity.vavernoenabled           = row.Field <bool>("vavernoenabled");
            entity.vavernohidden            = row.Field <bool>("vavernohidden");
            entity.backordertype            = row.IsNull("backordertype") ? string.Empty : row.Field <string>("backordertype");
            entity.backordertypeenabled     = row.Field <bool>("backordertypeenabled");
            entity.powtnew                  = row.Field <bool>("powtnew");
            entity.powtintfl                = row.Field <bool>("powtintfl");
            entity.miscvendor               = row.Field <bool>("miscvendor");
            entity.manualname               = row.IsNull("manualname") ? string.Empty : row.Field <string>("manualname");
            entity.manualaddr1              = row.IsNull("manualaddr1") ? string.Empty : row.Field <string>("manualaddr1");
            entity.manualaddr2              = row.IsNull("manualaddr2") ? string.Empty : row.Field <string>("manualaddr2");
            entity.manualaddr3              = row.IsNull("manualaddr3") ? string.Empty : row.Field <string>("manualaddr3");
            entity.manualcity               = row.IsNull("manualcity") ? string.Empty : row.Field <string>("manualcity");
            entity.manualstate              = row.IsNull("manualstate") ? string.Empty : row.Field <string>("manualstate");
            entity.manualzipcd              = row.IsNull("manualzipcd") ? string.Empty : row.Field <string>("manualzipcd");
            entity.backtietype              = row.IsNull("backtietype") ? string.Empty : row.Field <string>("backtietype");
            entity.backtietypeenabled       = row.Field <bool>("backtietypeenabled");
            entity.backtietypehidden        = row.Field <bool>("backtietypehidden");
            entity.powtaltno                = row.IsNull("powtaltno") ? 0 : row.Field <int>("powtaltno");
            entity.powtaltnoenabled         = row.Field <bool>("powtaltnoenabled");
            entity.powtaltnohidden          = row.Field <bool>("powtaltnohidden");
            entity.backtiesrcenabled        = row.Field <bool>("backtiesrcenabled");
            entity.backtiesrchidden         = row.Field <bool>("backtiesrchidden");
            entity.userfield                = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            entity.mutliSrcRowid            = row.Field <byte[]>("mutli-src-rowid").ToStringEncoded();
            entity.powtorderaltno           = row.IsNull("powtorderaltno") ? 0 : row.Field <int>("powtorderaltno");
            entity.powtorderaltnoenabled    = row.Field <bool>("powtorderaltnoenabled");
            entity.powtorderaltnohidden     = row.Field <bool>("powtorderaltnohidden");
            entity.powtorderalttype         = row.IsNull("powtorderalttype") ? string.Empty : row.Field <string>("powtorderalttype");
            entity.powtordertypeenabled     = row.Field <bool>("powtordertypeenabled");
            entity.powtlinealtno            = row.IsNull("powtlinealtno") ? 0 : row.Field <int>("powtlinealtno");
            entity.powtvvendno              = row.IsNull("powtvvendno") ? decimal.Zero : row.Field <decimal>("powtvvendno");
            entity.powtvvendnoenabled       = row.Field <bool>("powtvvendnoenabled");
            entity.powtvshipfmno            = row.IsNull("powtvshipfmno") ? 0 : row.Field <int>("powtvshipfmno");
            entity.powtvshipfmnoenabled     = row.Field <bool>("powtvshipfmnoenabled");
            entity.powtvduedt               = row.Field <DateTime?>("powtvduedt");
            entity.powtvduedtenabled        = row.Field <bool>("powtvduedtenabled");
            entity.powtvorderdt             = row.Field <DateTime?>("powtvorderdt");
            entity.powtvorderdthidden       = row.Field <bool>("powtvorderdthidden");
            entity.powtvshipviaty           = row.IsNull("powtvshipviaty") ? string.Empty : row.Field <string>("powtvshipviaty");
            entity.powtvshipviatyenabled    = row.Field <bool>("powtvshipviatyenabled");
            entity.powtvfobfl               = row.Field <bool>("powtvfobfl");
            entity.powtvfobflenabled        = row.Field <bool>("powtvfobflenabled");
            entity.powtvconfirmfl           = row.Field <bool>("powtvconfirmfl");
            entity.powtvconfirmflenabled    = row.Field <bool>("powtvconfirmflenabled");
            entity.powtwwhse                = row.IsNull("powtwwhse") ? string.Empty : row.Field <string>("powtwwhse");
            entity.powtwwhseenabled         = row.Field <bool>("powtwwhseenabled");
            entity.powtwduedt               = row.Field <DateTime?>("powtwduedt");
            entity.powtwduedtenabled        = row.Field <bool>("powtwduedtenabled");
            entity.powtwshipviaty           = row.IsNull("powtwshipviaty") ? string.Empty : row.Field <string>("powtwshipviaty");
            entity.powtwshipviatyenabled    = row.Field <bool>("powtwshipviatyenabled");
            entity.powtupdtfl               = row.Field <bool>("powtupdtfl");
            entity.powtbackordertype        = row.IsNull("powtbackordertype") ? string.Empty : row.Field <string>("powtbackordertype");
            entity.powtbackordertypeenabled = row.Field <bool>("powtbackordertypeenabled");
            entity.powtexpediter            = row.IsNull("powtexpediter") ? string.Empty : row.Field <string>("powtexpediter");
            entity.powtphoneno              = row.IsNull("powtphoneno") ? string.Empty : row.Field <string>("powtphoneno");
            entity.powtfaxphoneno           = row.IsNull("powtfaxphoneno") ? string.Empty : row.Field <string>("powtfaxphoneno");
            entity.powtwtcono               = row.IsNull("powtwtcono") ? 0 : row.Field <int>("powtwtcono");
            entity.powtordertypelist        = row.IsNull("powtordertypelist") ? string.Empty : row.Field <string>("powtordertypelist");
            entity.defvendno                = row.IsNull("defvendno") ? decimal.Zero : row.Field <decimal>("defvendno");
            entity.defpoduedate             = row.Field <DateTime?>("defpoduedate");
            entity.defwtduedate             = row.Field <DateTime?>("defwtduedate");
            return(entity);
        }