Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcembvaluecriteria(ref DataRow row, Icembvaluecriteria entity)
 {
     row.SetField("product", entity.product);
     row.SetField("whse", entity.whse);
     row.SetField("fieldchanged", entity.fieldchanged);
     row.SetField("changeby", entity.changeby);
     row.SetField("changeamtdate", entity.changeamtdate);
     row.SetField("changeamtdec", entity.changeamtdec);
     row.SetField("security", entity.security);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Icembvaluecriteria BuildIcembvaluecriteriaFromRow(DataRow row)
        {
            Icembvaluecriteria entity = new Icembvaluecriteria();

            entity.product       = row.IsNull("product") ? string.Empty : row.Field <string>("product");
            entity.whse          = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.fieldchanged  = row.IsNull("fieldchanged") ? string.Empty : row.Field <string>("fieldchanged");
            entity.changeby      = row.IsNull("changeby") ? string.Empty : row.Field <string>("changeby");
            entity.changeamtdate = row.Field <DateTime?>("changeamtdate");
            entity.changeamtdec  = row.IsNull("changeamtdec") ? decimal.Zero : row.Field <decimal>("changeamtdec");
            entity.security      = row.IsNull("security") ? 0 : row.Field <int>("security");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }