Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeesloadorderlistcriteria(ref DataRow row, Oeesloadorderlistcriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("whse", entity.whse);
     row.SetField("types", entity.types);
     row.SetField("sort1", entity.sort1);
     row.SetField("sort2", entity.sort2);
     row.SetField("pickinit", entity.pickinit);
     row.SetField("stage", entity.stage);
     row.SetField("reqshipdt", entity.reqshipdt);
     row.SetField("shipvia", entity.shipvia);
     row.SetField("route", entity.route);
     row.SetField("tbnotheld", entity.tbnotheld);
     row.SetField("tbexceptions", entity.tbexceptions);
     row.SetField("tbship", entity.tbship);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Oeesloadorderlistcriteria BuildOeesloadorderlistcriteriaFromRow(DataRow row)
        {
            Oeesloadorderlistcriteria entity = new Oeesloadorderlistcriteria();

            entity.custno           = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.whse             = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.types            = row.IsNull("types") ? string.Empty : row.Field <string>("types");
            entity.sort1            = row.IsNull("sort1") ? string.Empty : row.Field <string>("sort1");
            entity.sort2            = row.IsNull("sort2") ? string.Empty : row.Field <string>("sort2");
            entity.pickinit         = row.IsNull("pickinit") ? string.Empty : row.Field <string>("pickinit");
            entity.stage            = row.IsNull("stage") ? string.Empty : row.Field <string>("stage");
            entity.reqshipdt        = row.Field <DateTime?>("reqshipdt");
            entity.shipvia          = row.IsNull("shipvia") ? string.Empty : row.Field <string>("shipvia");
            entity.route            = row.IsNull("route") ? string.Empty : row.Field <string>("route");
            entity.tbnotheld        = row.Field <bool>("tbnotheld");
            entity.tbexceptions     = row.Field <bool>("tbexceptions");
            entity.tbship           = row.Field <bool>("tbship");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }