Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromItemtranscriteria(ref DataRow row, Itemtranscriteria entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("abs_num", entity.absNum);
     row.SetField("fromdate", entity.fromdate);
     row.SetField("todate", entity.todate);
     row.SetField("fromtime", entity.fromtime);
     row.SetField("totime", entity.totime);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("itemtranscriteriauserfield", entity.itemtranscriteriauserfield);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Itemtranscriteria BuildItemtranscriteriaFromRow(DataRow row)
        {
            Itemtranscriteria entity = new Itemtranscriteria();

            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.fromdate                   = row.Field <DateTime?>("fromdate");
            entity.todate                     = row.Field <DateTime?>("todate");
            entity.fromtime                   = row.IsNull("fromtime") ? string.Empty : row.Field <string>("fromtime");
            entity.totime                     = row.IsNull("totime") ? string.Empty : row.Field <string>("totime");
            entity.recordcountlimit           = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.itemtranscriteriauserfield = row.IsNull("itemtranscriteriauserfield") ? string.Empty : row.Field <string>("itemtranscriteriauserfield");
            entity.userfield                  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }