/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromCrecqevoidresults(ref DataRow row, Crecqevoidresults entity) { row.SetField("checkno", entity.checkno); row.SetField("mancheckfl", entity.mancheckfl); row.SetField("amount", entity.amount); row.SetField("enterdt", entity.enterdt); row.SetField("clearfl", entity.clearfl); row.SetField("cleardt", entity.cleardt); row.SetField("errormsg", entity.errormsg); row.SetField("errortype", entity.errortype); row.SetField("ckmsg", entity.ckmsg); row.SetField("voiddt", entity.voiddt); row.SetField("lAP", entity.lAP); row.SetField("lReverseAP", entity.lReverseAP); row.SetField("userfield", entity.userfield); }
public static Crecqevoidresults BuildCrecqevoidresultsFromRow(DataRow row) { Crecqevoidresults entity = new Crecqevoidresults(); entity.checkno = row.IsNull("checkno") ? decimal.Zero : row.Field <decimal>("checkno"); entity.mancheckfl = row.Field <bool>("mancheckfl"); entity.amount = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount"); entity.enterdt = row.Field <DateTime?>("enterdt"); entity.clearfl = row.Field <bool>("clearfl"); entity.cleardt = row.Field <DateTime?>("cleardt"); entity.errormsg = row.IsNull("errormsg") ? string.Empty : row.Field <string>("errormsg"); entity.errortype = row.IsNull("errortype") ? string.Empty : row.Field <string>("errortype"); entity.ckmsg = row.IsNull("ckmsg") ? string.Empty : row.Field <string>("ckmsg"); entity.voiddt = row.Field <DateTime?>("voiddt"); entity.lAP = row.Field <bool>("lAP"); entity.lReverseAP = row.Field <bool>("lReverseAP"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }