/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromVaesshipunship(ref DataRow row, Vaesshipunship entity) { row.SetField("vano", entity.vano); row.SetField("vasuf", entity.vasuf); row.SetField("seqno", entity.seqno); row.SetField("allowSectionBOFl", entity.allowSectionBOFl); row.SetField("cVANotes", entity.cVANotes); row.SetField("cSeqNotes", entity.cSeqNotes); row.SetField("sctncode", entity.sctncode); row.SetField("sctntype", entity.sctntype); row.SetField("sctnstagex", entity.sctnstagex); row.SetField("sctndescrip", entity.sctndescrip); row.SetField("whse", entity.whse); row.SetField("stagecd", entity.stagecd); row.SetField("stagecdx", entity.stagecdx); row.SetField("transtype", entity.transtype); row.SetField("nonstockty", entity.nonstockty); row.SetField("shipprod", entity.shipprod); row.SetField("cProdNotes", entity.cProdNotes); row.SetField("proddesc", entity.proddesc); row.SetField("qtyord", entity.qtyord); row.SetField("qtyship", entity.qtyship); row.SetField("unit", entity.unit); row.SetField("enterdt", entity.enterdt); row.SetField("reqshipdt", entity.reqshipdt); row.SetField("promisedt", entity.promisedt); row.SetField("estcompdt", entity.estcompdt); row.SetField("allowaddon", entity.allowaddon); row.SetField("allowdelete", entity.allowdelete); row.SetField("allowcancel", entity.allowcancel); row.SetField("sctnBOrelTy", entity.sctnBOrelTy); row.SetField("userfield", entity.userfield); }
public static Vaesshipunship BuildVaesshipunshipFromRow(DataRow row) { Vaesshipunship entity = new Vaesshipunship(); 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.allowSectionBOFl = row.Field <bool>("allowSectionBOFl"); entity.cVANotes = row.IsNull("cVANotes") ? string.Empty : row.Field <string>("cVANotes"); entity.cSeqNotes = row.IsNull("cSeqNotes") ? string.Empty : row.Field <string>("cSeqNotes"); entity.sctncode = row.IsNull("sctncode") ? string.Empty : row.Field <string>("sctncode"); entity.sctntype = row.IsNull("sctntype") ? string.Empty : row.Field <string>("sctntype"); entity.sctnstagex = row.IsNull("sctnstagex") ? string.Empty : row.Field <string>("sctnstagex"); entity.sctndescrip = row.IsNull("sctndescrip") ? string.Empty : row.Field <string>("sctndescrip"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.stagecdx = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.nonstockty = row.IsNull("nonstockty") ? string.Empty : row.Field <string>("nonstockty"); entity.shipprod = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod"); entity.cProdNotes = row.IsNull("cProdNotes") ? string.Empty : row.Field <string>("cProdNotes"); entity.proddesc = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc"); entity.qtyord = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord"); entity.qtyship = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship"); entity.unit = row.IsNull("unit") ? string.Empty : row.Field <string>("unit"); entity.enterdt = row.Field <DateTime?>("enterdt"); entity.reqshipdt = row.Field <DateTime?>("reqshipdt"); entity.promisedt = row.Field <DateTime?>("promisedt"); entity.estcompdt = row.Field <DateTime?>("estcompdt"); entity.allowaddon = row.Field <bool>("allowaddon"); entity.allowdelete = row.Field <bool>("allowdelete"); entity.allowcancel = row.Field <bool>("allowcancel"); entity.sctnBOrelTy = row.IsNull("sctnBOrelTy") ? string.Empty : row.Field <string>("sctnBOrelTy"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }