예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOtevvesselcriteria(ref DataRow row, Otevvesselcriteria entity)
 {
     row.SetField("vesselno", entity.vesselno);
     row.SetField("vessnm", entity.vessnm);
     row.SetField("voyageno", entity.voyageno);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Otevvesselcriteria BuildOtevvesselcriteriaFromRow(DataRow row)
        {
            Otevvesselcriteria entity = new Otevvesselcriteria();

            entity.vesselno  = row.IsNull("vesselno") ? 0 : row.Field <int>("vesselno");
            entity.vessnm    = row.IsNull("vessnm") ? string.Empty : row.Field <string>("vessnm");
            entity.voyageno  = row.IsNull("voyageno") ? string.Empty : row.Field <string>("voyageno");
            entity.stagecd   = row.IsNull("stagecd") ? string.Empty : row.Field <string>("stagecd");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }