Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromReplothercriteria(ref DataRow row, Replothercriteria entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("option_type", entity.optionType);
     row.SetField("replotheruserfield", entity.replotheruserfield);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Replothercriteria BuildReplothercriteriaFromRow(DataRow row)
        {
            Replothercriteria entity = new Replothercriteria();

            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.optionType         = row.IsNull("option_type") ? 0 : row.Field <int>("option_type");
            entity.replotheruserfield = row.IsNull("replotheruserfield") ? string.Empty : row.Field <string>("replotheruserfield");
            entity.userfield          = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }