/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromVaealistcriteria(ref DataRow row, Vaealistcriteria entity) { row.SetField("compprod", entity.compprod); row.SetField("whse", entity.whse); row.SetField("lotno", entity.lotno); row.SetField("vano", entity.vano); row.SetField("vasuf", entity.vasuf); row.SetField("prod", entity.prod); row.SetField("stage", entity.stage); row.SetField("transtype", entity.transtype); row.SetField("fromentereddate", entity.fromentereddate); row.SetField("toentereddate", entity.toentereddate); row.SetField("frompromiseddate", entity.frompromiseddate); row.SetField("topromiseddate", entity.topromiseddate); row.SetField("fromreqshipdate", entity.fromreqshipdate); row.SetField("toreqshipdate", entity.toreqshipdate); row.SetField("fromestcompdt", entity.fromestcompdt); row.SetField("toestcompdt", entity.toestcompdt); row.SetField("recordcount", entity.recordcount); row.SetField("userfield", entity.userfield); }
public static Vaealistcriteria BuildVaealistcriteriaFromRow(DataRow row) { Vaealistcriteria entity = new Vaealistcriteria(); entity.compprod = row.IsNull("compprod") ? string.Empty : row.Field <string>("compprod"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.lotno = row.IsNull("lotno") ? string.Empty : row.Field <string>("lotno"); entity.vano = row.IsNull("vano") ? 0 : row.Field <int>("vano"); entity.vasuf = row.IsNull("vasuf") ? 0 : row.Field <int>("vasuf"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.stage = row.IsNull("stage") ? string.Empty : row.Field <string>("stage"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.fromentereddate = row.Field <DateTime?>("fromentereddate"); entity.toentereddate = row.Field <DateTime?>("toentereddate"); entity.frompromiseddate = row.Field <DateTime?>("frompromiseddate"); entity.topromiseddate = row.Field <DateTime?>("topromiseddate"); entity.fromreqshipdate = row.Field <DateTime?>("fromreqshipdate"); entity.toreqshipdate = row.Field <DateTime?>("toreqshipdate"); entity.fromestcompdt = row.Field <DateTime?>("fromestcompdt"); entity.toestcompdt = row.Field <DateTime?>("toestcompdt"); entity.recordcount = row.IsNull("recordcount") ? 0 : row.Field <int>("recordcount"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }