示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromRepltopoffbuildlist(ref DataRow row, Repltopoffbuildlist 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("current_twl_user", entity.currentTwlUser);
     row.SetField("max_lvl", entity.maxLvl);
     row.SetField("d_onhand", entity.dOnhand);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Repltopoffbuildlist BuildRepltopoffbuildlistFromRow(DataRow row)
        {
            Repltopoffbuildlist entity = new Repltopoffbuildlist();

            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.currentTwlUser = row.IsNull("current_twl_user") ? string.Empty : row.Field <string>("current_twl_user");
            entity.maxLvl         = row.IsNull("max_lvl") ? decimal.Zero : row.Field <decimal>("max_lvl");
            entity.dOnhand        = row.IsNull("d_onhand") ? decimal.Zero : row.Field <decimal>("d_onhand");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }