/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOeetassemblysegmentdelim(ref DataRow row, Oeetassemblysegmentdelim entity) { row.SetField("seqno", entity.seqno); row.SetField("heightchars", entity.heightchars); row.SetField("widthchars", entity.widthchars); row.SetField("datatype", entity.datatype); row.SetField("rowpos", entity.rowpos); row.SetField("colpos", entity.colpos); row.SetField("ishidden", entity.ishidden); row.SetField("isenabled", entity.isenabled); row.SetField("delimvalue", entity.delimvalue); row.SetField("delimfont", entity.delimfont); row.SetField("delimformat", entity.delimformat); row.SetField("userfield", entity.userfield); }
public static Oeetassemblysegmentdelim BuildOeetassemblysegmentdelimFromRow(DataRow row) { Oeetassemblysegmentdelim entity = new Oeetassemblysegmentdelim(); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.heightchars = row.IsNull("heightchars") ? decimal.Zero : row.Field <decimal>("heightchars"); entity.widthchars = row.IsNull("widthchars") ? decimal.Zero : row.Field <decimal>("widthchars"); entity.datatype = row.IsNull("datatype") ? string.Empty : row.Field <string>("datatype"); entity.rowpos = row.IsNull("rowpos") ? decimal.Zero : row.Field <decimal>("rowpos"); entity.colpos = row.IsNull("colpos") ? decimal.Zero : row.Field <decimal>("colpos"); entity.ishidden = row.Field <bool>("ishidden"); entity.isenabled = row.Field <bool>("isenabled"); entity.delimvalue = row.IsNull("delimvalue") ? string.Empty : row.Field <string>("delimvalue"); entity.delimfont = row.IsNull("delimfont") ? 0 : row.Field <int>("delimfont"); entity.delimformat = row.IsNull("delimformat") ? string.Empty : row.Field <string>("delimformat"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }