/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromGldisplayjournalresults(ref DataRow row, Gldisplayjournalresults entity) { row.SetField("jrnlno", entity.jrnlno); row.SetField("period", entity.period); row.SetField("proofdr", entity.proofdr); row.SetField("actualdr", entity.actualdr); row.SetField("postdt", entity.postdt); row.SetField("proofcr", entity.proofcr); row.SetField("actualcr", entity.actualcr); row.SetField("nopostings", entity.nopostings); row.SetField("proofbal", entity.proofbal); row.SetField("actualbal", entity.actualbal); row.SetField("cstatus", entity.cstatus); row.SetField("assigneddate", entity.assigneddate); row.SetField("assignedtime", entity.assignedtime); row.SetField("prfchk", entity.prfchk); row.SetField("totchk", entity.totchk); row.SetField("prfchkhidden", entity.prfchkhidden); row.SetField("totchkhidden", entity.totchkhidden); }
public static Gldisplayjournalresults BuildGldisplayjournalresultsFromRow(DataRow row) { Gldisplayjournalresults entity = new Gldisplayjournalresults(); entity.jrnlno = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno"); entity.period = row.IsNull("period") ? 0 : row.Field <int>("period"); entity.proofdr = row.IsNull("proofdr") ? decimal.Zero : row.Field <decimal>("proofdr"); entity.actualdr = row.IsNull("actualdr") ? decimal.Zero : row.Field <decimal>("actualdr"); entity.postdt = row.Field <DateTime?>("postdt"); entity.proofcr = row.IsNull("proofcr") ? decimal.Zero : row.Field <decimal>("proofcr"); entity.actualcr = row.IsNull("actualcr") ? decimal.Zero : row.Field <decimal>("actualcr"); entity.nopostings = row.IsNull("nopostings") ? string.Empty : row.Field <string>("nopostings"); entity.proofbal = row.IsNull("proofbal") ? decimal.Zero : row.Field <decimal>("proofbal"); entity.actualbal = row.IsNull("actualbal") ? decimal.Zero : row.Field <decimal>("actualbal"); entity.cstatus = row.IsNull("cstatus") ? string.Empty : row.Field <string>("cstatus"); entity.assigneddate = row.IsNull("assigneddate") ? string.Empty : row.Field <string>("assigneddate"); entity.assignedtime = row.IsNull("assignedtime") ? string.Empty : row.Field <string>("assignedtime"); entity.prfchk = row.IsNull("prfchk") ? decimal.Zero : row.Field <decimal>("prfchk"); entity.totchk = row.IsNull("totchk") ? decimal.Zero : row.Field <decimal>("totchk"); entity.prfchkhidden = row.Field <bool>("prfchkhidden"); entity.totchkhidden = row.Field <bool>("totchkhidden"); return(entity); }