public static Vaspsectionextendin BuildVaspsectionextendinFromRow(DataRow row) { Vaspsectionextendin entity = new Vaspsectionextendin(); 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.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.rowidVasps = row.Field <byte[]>("rowid-vasps").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }
/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromVaspsectionextendin(ref DataRow row, Vaspsectionextendin 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("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("rowid-vasps", entity.rowidVasps.ToByteArray()); row.SetField("userfield", entity.userfield); }