Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromBuildcompttcriteria(ref DataRow row, Buildcompttcriteria entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("vernoenteredfl", entity.vernoenteredfl);
     row.SetField("verno", entity.verno);
     row.SetField("qty", entity.qty);
     row.SetField("unit", entity.unit);
     row.SetField("shortonlyfl", entity.shortonlyfl);
     row.SetField("expgrpoptfl", entity.expgrpoptfl);
     row.SetField("expkeywordsfl", entity.expkeywordsfl);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Buildcompttcriteria BuildBuildcompttcriteriaFromRow(DataRow row)
        {
            Buildcompttcriteria entity = new Buildcompttcriteria();

            entity.prod           = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse           = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.vernoenteredfl = row.Field <bool>("vernoenteredfl");
            entity.verno          = row.IsNull("verno") ? 0 : row.Field <int>("verno");
            entity.qty            = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty");
            entity.unit           = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.shortonlyfl    = row.Field <bool>("shortonlyfl");
            entity.expgrpoptfl    = row.Field <bool>("expgrpoptfl");
            entity.expkeywordsfl  = row.Field <bool>("expkeywordsfl");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }