/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromEtccdetailbanner(ref DataRow row, Etccdetailbanner entity) { row.SetField("sxxmldoc-rowid", entity.sxxmldocRowid.ToByteArray()); row.SetField("docid", entity.docid); row.SetField("batchnm", entity.batchnm); row.SetField("keytype", entity.keytype); row.SetField("docstatus", entity.docstatus); row.SetField("orderno", entity.orderno); row.SetField("ordersuf", entity.ordersuf); row.SetField("stagecd", entity.stagecd); row.SetField("stagecdword", entity.stagecdword); row.SetField("approvty", entity.approvty); row.SetField("whse", entity.whse); row.SetField("notesfl", entity.notesfl); row.SetField("custno", entity.custno); row.SetField("shipto", entity.shipto); row.SetField("custpo", entity.custpo); row.SetField("enterdt", entity.enterdt); row.SetField("promisedt", entity.promisedt); row.SetField("vendno", entity.vendno); row.SetField("shipfmno", entity.shipfmno); row.SetField("orderdt", entity.orderdt); row.SetField("ackdt", entity.ackdt); row.SetField("ackrsn", entity.ackrsn); row.SetField("userfield", entity.userfield); }
public static Etccdetailbanner BuildEtccdetailbannerFromRow(DataRow row) { Etccdetailbanner entity = new Etccdetailbanner(); entity.sxxmldocRowid = row.Field <byte[]>("sxxmldoc-rowid").ToStringEncoded(); entity.docid = row.IsNull("docid") ? 0 : row.Field <int>("docid"); entity.batchnm = row.IsNull("batchnm") ? string.Empty : row.Field <string>("batchnm"); entity.keytype = row.IsNull("keytype") ? string.Empty : row.Field <string>("keytype"); entity.docstatus = row.IsNull("docstatus") ? string.Empty : row.Field <string>("docstatus"); entity.orderno = row.IsNull("orderno") ? 0 : row.Field <int>("orderno"); entity.ordersuf = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.stagecdword = row.IsNull("stagecdword") ? string.Empty : row.Field <string>("stagecdword"); entity.approvty = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.shipto = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto"); entity.custpo = row.IsNull("custpo") ? string.Empty : row.Field <string>("custpo"); entity.enterdt = row.Field <DateTime?>("enterdt"); entity.promisedt = row.Field <DateTime?>("promisedt"); entity.vendno = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno"); entity.shipfmno = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno"); entity.orderdt = row.Field <DateTime?>("orderdt"); entity.ackdt = row.Field <DateTime?>("ackdt"); entity.ackrsn = row.IsNull("ackrsn") ? string.Empty : row.Field <string>("ackrsn"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }