コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromBarcodedetailresults(ref DataRow row, Barcodedetailresults entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("vendor_id", entity.vendorId);
     row.SetField("barcode_id", entity.barcodeId);
     row.SetField("attribute_name", entity.attributeName);
     row.SetField("value_start", entity.valueStart);
     row.SetField("value_length", entity.valueLength);
     row.SetField("barcodedtlrowid", entity.barcodedtlrowid.ToByteArray());
     row.SetField("barcodedetailresultsuserfield", entity.barcodedetailresultsuserfield);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Barcodedetailresults BuildBarcodedetailresultsFromRow(DataRow row)
        {
            Barcodedetailresults entity = new Barcodedetailresults();

            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.vendorId        = row.IsNull("vendor_id") ? string.Empty : row.Field <string>("vendor_id");
            entity.barcodeId       = row.IsNull("barcode_id") ? string.Empty : row.Field <string>("barcode_id");
            entity.attributeName   = row.IsNull("attribute_name") ? string.Empty : row.Field <string>("attribute_name");
            entity.valueStart      = row.IsNull("value_start") ? 0 : row.Field <int>("value_start");
            entity.valueLength     = row.IsNull("value_length") ? 0 : row.Field <int>("value_length");
            entity.barcodedtlrowid = row.Field <byte[]>("barcodedtlrowid").ToStringEncoded();
            entity.barcodedetailresultsuserfield = row.IsNull("barcodedetailresultsuserfield") ? string.Empty : row.Field <string>("barcodedetailresultsuserfield");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }