Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcemcupdatecriteria(ref DataRow row, Icemcupdatecriteria entity)
 {
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("quantity", entity.quantity);
     row.SetField("lastcostfl", entity.lastcostfl);
     row.SetField("wrongcost", entity.wrongcost);
     row.SetField("correctcost", entity.correctcost);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Icemcupdatecriteria BuildIcemcupdatecriteriaFromRow(DataRow row)
        {
            Icemcupdatecriteria entity = new Icemcupdatecriteria();

            entity.jrnlno      = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prod        = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.quantity    = row.IsNull("quantity") ? decimal.Zero : row.Field <decimal>("quantity");
            entity.lastcostfl  = row.Field <bool>("lastcostfl");
            entity.wrongcost   = row.IsNull("wrongcost") ? decimal.Zero : row.Field <decimal>("wrongcost");
            entity.correctcost = row.IsNull("correctcost") ? decimal.Zero : row.Field <decimal>("correctcost");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }