Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcserialstripcriteria(ref DataRow row, Icserialstripcriteria entity)
 {
     row.SetField("vendno", entity.vendno);
     row.SetField("whse", entity.whse);
     row.SetField("product", entity.product);
     row.SetField("serialno", entity.serialno);
     row.SetField("serialstripcriteriauserfield", entity.serialstripcriteriauserfield);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Icserialstripcriteria BuildIcserialstripcriteriaFromRow(DataRow row)
        {
            Icserialstripcriteria entity = new Icserialstripcriteria();

            entity.vendno   = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.whse     = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.product  = row.IsNull("product") ? string.Empty : row.Field <string>("product");
            entity.serialno = row.IsNull("serialno") ? string.Empty : row.Field <string>("serialno");
            entity.serialstripcriteriauserfield = row.IsNull("serialstripcriteriauserfield") ? string.Empty : row.Field <string>("serialstripcriteriauserfield");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }