Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWavepickcriteria(ref DataRow row, Wavepickcriteria entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("emp_num", entity.empNum);
     row.SetField("batchid", entity.batchid);
     row.SetField("order", entity.order);
     row.SetField("viewtype", entity.viewtype);
     row.SetField("include_unassigned", entity.includeUnassigned);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Wavepickcriteria BuildWavepickcriteriaFromRow(DataRow row)
        {
            Wavepickcriteria entity = new Wavepickcriteria();

            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.empNum            = row.IsNull("emp_num") ? string.Empty : row.Field <string>("emp_num");
            entity.batchid           = row.IsNull("batchid") ? 0 : row.Field <int>("batchid");
            entity.order             = row.IsNull("order") ? string.Empty : row.Field <string>("order");
            entity.viewtype          = row.IsNull("viewtype") ? string.Empty : row.Field <string>("viewtype");
            entity.includeUnassigned = row.Field <bool>("include_unassigned");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }