示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCarrierlist(ref DataRow row, Carrierlist entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("carrier_id", entity.carrierId);
     row.SetField("name", entity.name);
     row.SetField("carrierRowID", entity.carrierRowID.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Carrierlist BuildCarrierlistFromRow(DataRow row)
        {
            Carrierlist entity = new Carrierlist();

            entity.coNum        = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num");
            entity.whNum        = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num");
            entity.carrierId    = row.IsNull("carrier_id") ? string.Empty : row.Field <string>("carrier_id");
            entity.name         = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.carrierRowID = row.Field <byte[]>("carrierRowID").ToStringEncoded();
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }