示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromReclinetransactionresults(ref DataRow row, Reclinetransactionresults entity)
 {
     row.SetField("bin_num", entity.binNum);
     row.SetField("cargo_control", entity.cargoControl);
     row.SetField("date_time", entity.dateTime);
     row.SetField("emp_num", entity.empNum);
     row.SetField("item_qty", entity.itemQty);
     row.SetField("pallet_id", entity.palletId);
     row.SetField("result_code", entity.resultCode);
     row.SetField("result_msg", entity.resultMsg);
     row.SetField("row_status", entity.rowStatus);
     row.SetField("stock_stat", entity.stockStat);
     row.SetField("truck_id", entity.truckId);
     row.SetField("transactionsRowID", entity.transactionsRowID.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Reclinetransactionresults BuildReclinetransactionresultsFromRow(DataRow row)
        {
            Reclinetransactionresults entity = new Reclinetransactionresults();

            entity.binNum            = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num");
            entity.cargoControl      = row.IsNull("cargo_control") ? string.Empty : row.Field <string>("cargo_control");
            entity.dateTime          = row.IsNull("date_time") ? string.Empty : row.Field <string>("date_time");
            entity.empNum            = row.IsNull("emp_num") ? string.Empty : row.Field <string>("emp_num");
            entity.itemQty           = row.IsNull("item_qty") ? decimal.Zero : row.Field <decimal>("item_qty");
            entity.palletId          = row.IsNull("pallet_id") ? string.Empty : row.Field <string>("pallet_id");
            entity.resultCode        = row.IsNull("result_code") ? string.Empty : row.Field <string>("result_code");
            entity.resultMsg         = row.IsNull("result_msg") ? string.Empty : row.Field <string>("result_msg");
            entity.rowStatus         = row.IsNull("row_status") ? string.Empty : row.Field <string>("row_status");
            entity.stockStat         = row.IsNull("stock_stat") ? string.Empty : row.Field <string>("stock_stat");
            entity.truckId           = row.IsNull("truck_id") ? string.Empty : row.Field <string>("truck_id");
            entity.transactionsRowID = row.Field <byte[]>("transactionsRowID").ToStringEncoded();
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }