Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromInvdisclistresults(ref DataRow row, Invdisclistresults entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("abs_num", entity.absNum);
     row.SetField("bin_num", entity.binNum);
     row.SetField("trans_type", entity.transType);
     row.SetField("emp_num", entity.empNum);
     row.SetField("date_time", entity.dateTime);
     row.SetField("problem", entity.problem);
     row.SetField("exp_qty", entity.expQty);
     row.SetField("actual_qty", entity.actualQty);
     row.SetField("lot", entity.lot);
     row.SetField("lot_before", entity.lotBefore);
     row.SetField("invprobRowID", entity.invprobRowID.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Invdisclistresults BuildInvdisclistresultsFromRow(DataRow row)
        {
            Invdisclistresults entity = new Invdisclistresults();

            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.absNum       = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num");
            entity.binNum       = row.IsNull("bin_num") ? string.Empty : row.Field <string>("bin_num");
            entity.transType    = row.IsNull("trans_type") ? string.Empty : row.Field <string>("trans_type");
            entity.empNum       = row.IsNull("emp_num") ? string.Empty : row.Field <string>("emp_num");
            entity.dateTime     = row.IsNull("date_time") ? string.Empty : row.Field <string>("date_time");
            entity.problem      = row.IsNull("problem") ? string.Empty : row.Field <string>("problem");
            entity.expQty       = row.IsNull("exp_qty") ? decimal.Zero : row.Field <decimal>("exp_qty");
            entity.actualQty    = row.IsNull("actual_qty") ? decimal.Zero : row.Field <decimal>("actual_qty");
            entity.lot          = row.IsNull("lot") ? string.Empty : row.Field <string>("lot");
            entity.lotBefore    = row.IsNull("lot_before") ? string.Empty : row.Field <string>("lot_before");
            entity.invprobRowID = row.Field <byte[]>("invprobRowID").ToStringEncoded();
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }