/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPoeifullreceipt(ref DataRow row, Poeifullreceipt entity) { row.SetField("pono", entity.pono); row.SetField("posuf", entity.posuf); row.SetField("jrnlno", entity.jrnlno); row.SetField("trackno", entity.trackno); row.SetField("stagecd", entity.stagecd); row.SetField("stagecdx", entity.stagecdx); row.SetField("statusinfo", entity.statusinfo); row.SetField("amounti", entity.amounti); row.SetField("batchdatcd", entity.batchdatcd); row.SetField("receiverfl", entity.receiverfl); row.SetField("userfield", entity.userfield); }
public static Poeifullreceipt BuildPoeifullreceiptFromRow(DataRow row) { Poeifullreceipt entity = new Poeifullreceipt(); entity.pono = row.IsNull("pono") ? 0 : row.Field <int>("pono"); entity.posuf = row.IsNull("posuf") ? 0 : row.Field <int>("posuf"); entity.jrnlno = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno"); entity.trackno = row.IsNull("trackno") ? 0 : row.Field <int>("trackno"); entity.stagecd = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd"); entity.stagecdx = row.IsNull("stagecdx") ? string.Empty : row.Field <string>("stagecdx"); entity.statusinfo = row.IsNull("statusinfo") ? string.Empty : row.Field <string>("statusinfo"); entity.amounti = row.IsNull("amounti") ? 0 : row.Field <int>("amounti"); entity.batchdatcd = row.IsNull("batchdatcd") ? string.Empty : row.Field <string>("batchdatcd"); entity.receiverfl = row.Field <bool>("receiverfl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }