Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVaspsectionextendex(ref DataRow row, Vaspsectionextendex entity)
 {
     row.SetField("vaprod", entity.vaprod);
     row.SetField("vawhse", entity.vawhse);
     row.SetField("vaverno", entity.vaverno);
     row.SetField("seqno", entity.seqno);
     row.SetField("sctntype", entity.sctntype);
     row.SetField("destaddr1", entity.destaddr1);
     row.SetField("destaddr2", entity.destaddr2);
     row.SetField("destaddr3", entity.destaddr3);
     row.SetField("destcity", entity.destcity);
     row.SetField("destname", entity.destname);
     row.SetField("destshipfmno", entity.destshipfmno);
     row.SetField("deststate", entity.deststate);
     row.SetField("desttype", entity.desttype);
     row.SetField("destvendno", entity.destvendno);
     row.SetField("destwhse", entity.destwhse);
     row.SetField("destzipcd", entity.destzipcd);
     row.SetField("duedt", entity.duedt);
     row.SetField("extrshipfmno", entity.extrshipfmno);
     row.SetField("extrvendno", entity.extrvendno);
     row.SetField("finaldesc", entity.finaldesc);
     row.SetField("finalprod", entity.finalprod);
     row.SetField("finaladdr1", entity.finaladdr1);
     row.SetField("finaladdr2", entity.finaladdr2);
     row.SetField("finaladdr3", entity.finaladdr3);
     row.SetField("finalcity", entity.finalcity);
     row.SetField("finalname", entity.finalname);
     row.SetField("finalstate", entity.finalstate);
     row.SetField("finalzipcd", entity.finalzipcd);
     row.SetField("fromaddr1", entity.fromaddr1);
     row.SetField("fromaddr2", entity.fromaddr2);
     row.SetField("fromaddr3", entity.fromaddr3);
     row.SetField("fromcity", entity.fromcity);
     row.SetField("fromname", entity.fromname);
     row.SetField("fromstate", entity.fromstate);
     row.SetField("fromzipcd", entity.fromzipcd);
     row.SetField("goaldesc", entity.goaldesc);
     row.SetField("goalprod", entity.goalprod);
     row.SetField("goalqtyord", entity.goalqtyord);
     row.SetField("goalstkqtyord", entity.goalstkqtyord);
     row.SetField("goalunit", entity.goalunit);
     row.SetField("goalunitconv", entity.goalunitconv);
     row.SetField("intrwhse", entity.intrwhse);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("orderdisp", entity.orderdisp);
     row.SetField("promisedt", entity.promisedt);
     row.SetField("refer", entity.refer);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("route", entity.route);
     row.SetField("shipinstr", entity.shipinstr);
     row.SetField("shipviaty", entity.shipviaty);
     row.SetField("stagearea", entity.stagearea);
     row.SetField("addmodefl", entity.addmodefl);
     row.SetField("freeformaddr", entity.freeformaddr);
     row.SetField("rowid-vasps", entity.rowidVasps.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Vaspsectionextendex BuildVaspsectionextendexFromRow(DataRow row)
        {
            Vaspsectionextendex entity = new Vaspsectionextendex();

            entity.vaprod        = row.IsNull("vaprod") ? string.Empty : row.Field <string>("vaprod");
            entity.vawhse        = row.IsNull("vawhse") ? string.Empty : row.Field <string>("vawhse");
            entity.vaverno       = row.IsNull("vaverno") ? 0 : row.Field <int>("vaverno");
            entity.seqno         = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.sctntype      = row.IsNull("sctntype") ? string.Empty : row.Field <string>("sctntype");
            entity.destaddr1     = row.IsNull("destaddr1") ? string.Empty : row.Field <string>("destaddr1");
            entity.destaddr2     = row.IsNull("destaddr2") ? string.Empty : row.Field <string>("destaddr2");
            entity.destaddr3     = row.IsNull("destaddr3") ? string.Empty : row.Field <string>("destaddr3");
            entity.destcity      = row.IsNull("destcity") ? string.Empty : row.Field <string>("destcity");
            entity.destname      = row.IsNull("destname") ? string.Empty : row.Field <string>("destname");
            entity.destshipfmno  = row.IsNull("destshipfmno") ? 0 : row.Field <int>("destshipfmno");
            entity.deststate     = row.IsNull("deststate") ? string.Empty : row.Field <string>("deststate");
            entity.desttype      = row.IsNull("desttype") ? string.Empty : row.Field <string>("desttype");
            entity.destvendno    = row.IsNull("destvendno") ? decimal.Zero : row.Field <decimal>("destvendno");
            entity.destwhse      = row.IsNull("destwhse") ? string.Empty : row.Field <string>("destwhse");
            entity.destzipcd     = row.IsNull("destzipcd") ? string.Empty : row.Field <string>("destzipcd");
            entity.duedt         = row.Field <DateTime?>("duedt");
            entity.extrshipfmno  = row.IsNull("extrshipfmno") ? 0 : row.Field <int>("extrshipfmno");
            entity.extrvendno    = row.IsNull("extrvendno") ? decimal.Zero : row.Field <decimal>("extrvendno");
            entity.finaldesc     = row.IsNull("finaldesc") ? string.Empty : row.Field <string>("finaldesc");
            entity.finalprod     = row.IsNull("finalprod") ? string.Empty : row.Field <string>("finalprod");
            entity.finaladdr1    = row.IsNull("finaladdr1") ? string.Empty : row.Field <string>("finaladdr1");
            entity.finaladdr2    = row.IsNull("finaladdr2") ? string.Empty : row.Field <string>("finaladdr2");
            entity.finaladdr3    = row.IsNull("finaladdr3") ? string.Empty : row.Field <string>("finaladdr3");
            entity.finalcity     = row.IsNull("finalcity") ? string.Empty : row.Field <string>("finalcity");
            entity.finalname     = row.IsNull("finalname") ? string.Empty : row.Field <string>("finalname");
            entity.finalstate    = row.IsNull("finalstate") ? string.Empty : row.Field <string>("finalstate");
            entity.finalzipcd    = row.IsNull("finalzipcd") ? string.Empty : row.Field <string>("finalzipcd");
            entity.fromaddr1     = row.IsNull("fromaddr1") ? string.Empty : row.Field <string>("fromaddr1");
            entity.fromaddr2     = row.IsNull("fromaddr2") ? string.Empty : row.Field <string>("fromaddr2");
            entity.fromaddr3     = row.IsNull("fromaddr3") ? string.Empty : row.Field <string>("fromaddr3");
            entity.fromcity      = row.IsNull("fromcity") ? string.Empty : row.Field <string>("fromcity");
            entity.fromname      = row.IsNull("fromname") ? string.Empty : row.Field <string>("fromname");
            entity.fromstate     = row.IsNull("fromstate") ? string.Empty : row.Field <string>("fromstate");
            entity.fromzipcd     = row.IsNull("fromzipcd") ? string.Empty : row.Field <string>("fromzipcd");
            entity.goaldesc      = row.IsNull("goaldesc") ? string.Empty : row.Field <string>("goaldesc");
            entity.goalprod      = row.IsNull("goalprod") ? string.Empty : row.Field <string>("goalprod");
            entity.goalqtyord    = row.IsNull("goalqtyord") ? decimal.Zero : row.Field <decimal>("goalqtyord");
            entity.goalstkqtyord = row.IsNull("goalstkqtyord") ? decimal.Zero : row.Field <decimal>("goalstkqtyord");
            entity.goalunit      = row.IsNull("goalunit") ? string.Empty : row.Field <string>("goalunit");
            entity.goalunitconv  = row.IsNull("goalunitconv") ? decimal.Zero : row.Field <decimal>("goalunitconv");
            entity.intrwhse      = row.IsNull("intrwhse") ? string.Empty : row.Field <string>("intrwhse");
            entity.jrnlno        = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.orderdisp     = row.IsNull("orderdisp") ? string.Empty : row.Field <string>("orderdisp");
            entity.promisedt     = row.Field <DateTime?>("promisedt");
            entity.refer         = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.reqshipdt     = row.Field <DateTime?>("reqshipdt");
            entity.route         = row.IsNull("route") ? string.Empty : row.Field <string>("route");
            entity.shipinstr     = row.IsNull("shipinstr") ? string.Empty : row.Field <string>("shipinstr");
            entity.shipviaty     = row.IsNull("shipviaty") ? string.Empty : row.Field <string>("shipviaty");
            entity.stagearea     = row.IsNull("stagearea") ? string.Empty : row.Field <string>("stagearea");
            entity.addmodefl     = row.Field <bool>("addmodefl");
            entity.freeformaddr  = row.Field <bool>("freeformaddr");
            entity.rowidVasps    = row.Field <byte[]>("rowid-vasps").ToStringEncoded();
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }