Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcseriallookupcriteria(ref DataRow row, Icseriallookupcriteria entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("serialno", entity.serialno);
     row.SetField("currstatus", entity.currstatus);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("recordlimit", entity.recordlimit);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Icseriallookupcriteria BuildIcseriallookupcriteriaFromRow(DataRow row)
        {
            Icseriallookupcriteria entity = new Icseriallookupcriteria();

            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prod        = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.serialno    = row.IsNull("serialno") ? string.Empty : row.Field <string>("serialno");
            entity.currstatus  = row.IsNull("currstatus") ? string.Empty : row.Field <string>("currstatus");
            entity.custno      = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto      = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.recordlimit = row.IsNull("recordlimit") ? 0 : row.Field <int>("recordlimit");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }