Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromEhfeecriteria(ref DataRow row, Ehfeecriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("state", entity.state);
     row.SetField("prod", entity.prod);
     row.SetField("effectivedt", entity.effectivedt);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Ehfeecriteria BuildEhfeecriteriaFromRow(DataRow row)
        {
            Ehfeecriteria entity = new Ehfeecriteria();

            entity.custno      = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto      = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.state       = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.prod        = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.effectivedt = row.Field <DateTime?>("effectivedt");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }