public static Arelecheckdtlwo BuildArelecheckdtlwoFromRow(DataRow row) { Arelecheckdtlwo entity = new Arelecheckdtlwo(); entity.adddata1 = row.IsNull("adddata1") ? string.Empty : row.Field <string>("adddata1"); entity.adddata2 = row.IsNull("adddata2") ? string.Empty : row.Field <string>("adddata2"); entity.adddata3 = row.IsNull("adddata3") ? string.Empty : row.Field <string>("adddata3"); entity.adddata4 = row.IsNull("adddata4") ? string.Empty : row.Field <string>("adddata4"); entity.adddata5 = row.IsNull("adddata5") ? string.Empty : row.Field <string>("adddata5"); entity.adjbaseamt = row.IsNull("adjbaseamt") ? decimal.Zero : row.Field <decimal>("adjbaseamt"); entity.amt = row.IsNull("amt") ? decimal.Zero : row.Field <decimal>("amt"); entity.arettid = row.IsNull("arettid") ? 0 : row.Field <long>("arettid"); entity.batch = row.IsNull("batch") ? string.Empty : row.Field <string>("batch"); entity.checkno = row.IsNull("checkno") ? 0 : row.Field <int>("checkno"); entity.cono = row.IsNull("cono") ? 0 : row.Field <int>("cono"); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.glacctno = row.IsNull("glacctno") ? 0 : row.Field <int>("glacctno"); entity.gldeptno = row.IsNull("gldeptno") ? 0 : row.Field <int>("gldeptno"); entity.gldivno = row.IsNull("gldivno") ? 0 : row.Field <int>("gldivno"); entity.glsubno = row.IsNull("glsubno") ? 0 : row.Field <int>("glsubno"); entity.invno = row.IsNull("invno") ? 0 : row.Field <int>("invno"); entity.invsuf = row.IsNull("invsuf") ? 0 : row.Field <int>("invsuf"); entity.lookupnm = row.IsNull("lookupnm") ? string.Empty : row.Field <string>("lookupnm"); entity.notesfl = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl"); entity.operinit = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit"); entity.origamt = row.IsNull("origamt") ? decimal.Zero : row.Field <decimal>("origamt"); entity.origtaxamt = row.IsNull("origtaxamt") ? decimal.Zero : row.Field <decimal>("origtaxamt"); entity.rid = row.IsNull("rid") ? 0 : row.Field <long>("rid"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.taxexemptamt = row.IsNull("taxexemptamt") ? decimal.Zero : row.Field <decimal>("taxexemptamt"); entity.taxno = row.IsNull("taxno") ? 0 : row.Field <int>("taxno"); entity.transdt = row.Field <DateTime?>("transdt"); entity.transproc = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc"); entity.transtm = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm"); entity.aretid = row.IsNull("aretid") ? 0 : row.Field <long>("aretid"); entity.account = row.IsNull("account") ? string.Empty : row.Field <string>("account"); entity.dtlrowid = row.Field <byte[]>("dtlrowid").ToStringEncoded(); entity.rectype = row.IsNull("rectype") ? string.Empty : row.Field <string>("rectype"); 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 UpdateRowFromArelecheckdtlwo(ref DataRow row, Arelecheckdtlwo entity) { row.SetField("adddata1", entity.adddata1); row.SetField("adddata2", entity.adddata2); row.SetField("adddata3", entity.adddata3); row.SetField("adddata4", entity.adddata4); row.SetField("adddata5", entity.adddata5); row.SetField("adjbaseamt", entity.adjbaseamt); row.SetField("amt", entity.amt); row.SetField("arettid", entity.arettid); row.SetField("batch", entity.batch); row.SetField("checkno", entity.checkno); row.SetField("cono", entity.cono); row.SetField("custno", entity.custno); row.SetField("glacctno", entity.glacctno); row.SetField("gldeptno", entity.gldeptno); row.SetField("gldivno", entity.gldivno); row.SetField("glsubno", entity.glsubno); row.SetField("invno", entity.invno); row.SetField("invsuf", entity.invsuf); row.SetField("lookupnm", entity.lookupnm); row.SetField("notesfl", entity.notesfl); row.SetField("operinit", entity.operinit); row.SetField("origamt", entity.origamt); row.SetField("origtaxamt", entity.origtaxamt); row.SetField("rid", entity.rid); row.SetField("seqno", entity.seqno); row.SetField("taxexemptamt", entity.taxexemptamt); row.SetField("taxno", entity.taxno); row.SetField("transdt", entity.transdt); row.SetField("transproc", entity.transproc); row.SetField("transtm", entity.transtm); row.SetField("aretid", entity.aretid); row.SetField("account", entity.account); row.SetField("dtlrowid", entity.dtlrowid.ToByteArray()); row.SetField("rectype", entity.rectype); row.SetField("userfield", entity.userfield); }