Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOrdermanifests(ref DataRow row, Ordermanifests entity)
 {
     row.SetField("manifest_id", entity.manifestId);
     row.SetField("date_time", entity.dateTime);
     row.SetField("tracking_id", entity.trackingId);
     row.SetField("carton_id", entity.cartonId);
     row.SetField("charges", entity.charges);
     row.SetField("weight", entity.weight);
     row.SetField("dock_id", entity.dockId);
     row.SetField("pro_num_id", entity.proNumId);
     row.SetField("height", entity.height);
     row.SetField("length", entity.length);
     row.SetField("width", entity.width);
     row.SetField("x_of_y", entity.xOfY);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Ordermanifests BuildOrdermanifestsFromRow(DataRow row)
        {
            Ordermanifests entity = new Ordermanifests();

            entity.manifestId = row.IsNull("manifest_id") ? 0 : row.Field <int>("manifest_id");
            entity.dateTime   = row.IsNull("date_time") ? string.Empty : row.Field <string>("date_time");
            entity.trackingId = row.IsNull("tracking_id") ? string.Empty : row.Field <string>("tracking_id");
            entity.cartonId   = row.IsNull("carton_id") ? string.Empty : row.Field <string>("carton_id");
            entity.charges    = row.IsNull("charges") ? decimal.Zero : row.Field <decimal>("charges");
            entity.weight     = row.IsNull("weight") ? decimal.Zero : row.Field <decimal>("weight");
            entity.dockId     = row.IsNull("dock_id") ? string.Empty : row.Field <string>("dock_id");
            entity.proNumId   = row.IsNull("pro_num_id") ? string.Empty : row.Field <string>("pro_num_id");
            entity.height     = row.IsNull("height") ? decimal.Zero : row.Field <decimal>("height");
            entity.length     = row.IsNull("length") ? decimal.Zero : row.Field <decimal>("length");
            entity.width      = row.IsNull("width") ? decimal.Zero : row.Field <decimal>("width");
            entity.xOfY       = row.IsNull("x_of_y") ? string.Empty : row.Field <string>("x_of_y");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }