Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcepaupdatecriteria(ref DataRow row, Icepaupdatecriteria entity)
 {
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("qtycnt", entity.qtycnt);
     row.SetField("unit", entity.unit);
     row.SetField("refer", entity.refer);
     row.SetField("adjustfl", entity.adjustfl);
     row.SetField("negnetavailasked", entity.negnetavailasked);
     row.SetField("negnetavailanswer", entity.negnetavailanswer);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Icepaupdatecriteria BuildIcepaupdatecriteriaFromRow(DataRow row)
        {
            Icepaupdatecriteria entity = new Icepaupdatecriteria();

            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.qtycnt            = row.IsNull("qtycnt") ? decimal.Zero : row.Field <decimal>("qtycnt");
            entity.unit              = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.refer             = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.adjustfl          = row.Field <bool>("adjustfl");
            entity.negnetavailasked  = row.Field <bool>("negnetavailasked");
            entity.negnetavailanswer = row.Field <bool>("negnetavailanswer");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }