Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcspclookupcriteria(ref DataRow row, Icspclookupcriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("statuscd", entity.statuscd);
     row.SetField("whse", entity.whse);
     row.SetField("contractno", entity.contractno);
     row.SetField("product", entity.product);
     row.SetField("recordlimit", entity.recordlimit);
     row.SetField("shiptogrp", entity.shiptogrp);
     row.SetField("setuptype", entity.setuptype);
     row.SetField("unit", entity.unit);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Icspclookupcriteria BuildIcspclookupcriteriaFromRow(DataRow row)
        {
            Icspclookupcriteria entity = new Icspclookupcriteria();

            entity.custno      = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto      = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.statuscd    = row.IsNull("statuscd") ? string.Empty : row.Field <string>("statuscd");
            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.contractno  = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno");
            entity.product     = row.IsNull("product") ? string.Empty : row.Field <string>("product");
            entity.recordlimit = row.IsNull("recordlimit") ? 0 : row.Field <int>("recordlimit");
            entity.shiptogrp   = row.IsNull("shiptogrp") ? string.Empty : row.Field <string>("shiptogrp");
            entity.setuptype   = row.IsNull("setuptype") ? string.Empty : row.Field <string>("setuptype");
            entity.unit        = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }