Ejemplo n.º 1
0
        public static Vasectionextendin BuildVasectionextendinFromRow(DataRow row)
        {
            Vasectionextendin entity = new Vasectionextendin();

            entity.vano          = row.IsNull("vano") ? 0 : row.Field <int>("vano");
            entity.vasuf         = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf");
            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.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.freeformaddr  = row.Field <bool>("freeformaddr");
            entity.mode          = row.IsNull("mode") ? string.Empty : row.Field <string>("mode");
            entity.rowidVaes     = row.Field <byte[]>("rowid-vaes").ToStringEncoded();
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            entity.codedesc      = row.IsNull("codedesc") ? string.Empty : row.Field <string>("codedesc");
            entity.destdesc      = row.IsNull("destdesc") ? string.Empty : row.Field <string>("destdesc");
            entity.stagecd       = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stagecdx      = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx");
            entity.orderaltno    = row.IsNull("orderaltno") ? string.Empty : row.Field <string>("orderaltno");
            entity.orderaltty    = row.IsNull("orderaltty") ? string.Empty : row.Field <string>("orderaltty");
            entity.orderaltstg   = row.IsNull("orderaltstg") ? string.Empty : row.Field <string>("orderaltstg");
            entity.botext        = row.IsNull("botext") ? string.Empty : row.Field <string>("botext");
            entity.allowcancel   = row.Field <bool>("allowcancel");
            entity.allowdelete   = row.Field <bool>("allowdelete");
            entity.icincaddgl    = row.Field <bool>("icincaddgl");
            entity.completefl    = row.Field <bool>("completefl");
            return(entity);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVasectionextendin(ref DataRow row, Vasectionextendin entity)
 {
     row.SetField("vano", entity.vano);
     row.SetField("vasuf", entity.vasuf);
     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("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("freeformaddr", entity.freeformaddr);
     row.SetField("mode", entity.mode);
     row.SetField("rowid-vaes", entity.rowidVaes.ToByteArray());
     row.SetField("userfield", entity.userfield);
     row.SetField("codedesc", entity.codedesc);
     row.SetField("destdesc", entity.destdesc);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stagecdx", entity.stagecdx);
     row.SetField("orderaltno", entity.orderaltno);
     row.SetField("orderaltty", entity.orderaltty);
     row.SetField("orderaltstg", entity.orderaltstg);
     row.SetField("botext", entity.botext);
     row.SetField("allowcancel", entity.allowcancel);
     row.SetField("allowdelete", entity.allowdelete);
     row.SetField("icincaddgl", entity.icincaddgl);
     row.SetField("completefl", entity.completefl);
 }