示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromRepltopoffs(ref DataRow row, Repltopoffs entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("ch_stat", entity.chStat);
     row.SetField("ch_zone", entity.chZone);
     row.SetField("ch_aisle", entity.chAisle);
     row.SetField("ch_bin", entity.chBin);
     row.SetField("d_onhand", entity.dOnhand);
     row.SetField("d_min", entity.dMin);
     row.SetField("d_max", entity.dMax);
     row.SetField("ch_abs", entity.chAbs);
     row.SetField("ch_type", entity.chType);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Repltopoffs BuildRepltopoffsFromRow(DataRow row)
        {
            Repltopoffs entity = new Repltopoffs();

            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.chStat    = row.IsNull("ch_stat") ? string.Empty : row.Field <string>("ch_stat");
            entity.chZone    = row.IsNull("ch_zone") ? string.Empty : row.Field <string>("ch_zone");
            entity.chAisle   = row.IsNull("ch_aisle") ? string.Empty : row.Field <string>("ch_aisle");
            entity.chBin     = row.IsNull("ch_bin") ? string.Empty : row.Field <string>("ch_bin");
            entity.dOnhand   = row.IsNull("d_onhand") ? decimal.Zero : row.Field <decimal>("d_onhand");
            entity.dMin      = row.IsNull("d_min") ? decimal.Zero : row.Field <decimal>("d_min");
            entity.dMax      = row.IsNull("d_max") ? decimal.Zero : row.Field <decimal>("d_max");
            entity.chAbs     = row.IsNull("ch_abs") ? string.Empty : row.Field <string>("ch_abs");
            entity.chType    = row.IsNull("ch_type") ? string.Empty : row.Field <string>("ch_type");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }