public async Task <IActionResult> PutSubproject([FromRoute] int id, [FromBody] Subproject subproject) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != subproject.SubprojectId) { return(BadRequest()); } _context.Entry(subproject).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SubprojectExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public Subprojects() { InitializeComponent(); //bolIsRunning = true; this.proProject = new Project(); this.spSearch = new Subproject(); this.spUpdate = new Subproject(); dataGridView = dgvSubProjects; }
public VostokApplicationMetrics(IMetricContext root, IVostokApplicationIdentity identity) { Root = root; Project = Root.WithTag(WellKnownApplicationIdentityProperties.Project, identity.Project); Subproject = identity.Subproject == null ? Project : Project.WithTag(WellKnownApplicationIdentityProperties.Subproject, identity.Subproject); Environment = Subproject.WithTag(WellKnownApplicationIdentityProperties.Environment, identity.Environment); Application = Environment.WithTag(WellKnownApplicationIdentityProperties.Application, identity.Application); Instance = Application.WithTag(WellKnownApplicationIdentityProperties.Instance, identity.Instance); }
public async Task <IActionResult> PostSubproject([FromBody] Subproject subproject) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.Subproject.Add(subproject); await _context.SaveChangesAsync(); return(CreatedAtAction("GetSubproject", new { id = subproject.SubprojectId }, subproject)); }
public override int GetHashCode() { unchecked { var hashCode = Project.GetHashCode(); hashCode = (hashCode * 397) ^ (Subproject != null ? Subproject.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Environment.GetHashCode(); hashCode = (hashCode * 397) ^ Application.GetHashCode(); hashCode = (hashCode * 397) ^ Instance.GetHashCode(); return(hashCode); } }
public VostokApplicationMetrics(IMetricContext root, IVostokApplicationIdentity identity) { Root = root; Project = Root.WithTag(WellKnownApplicationIdentityProperties.Project, identity.Project); Subproject = identity.Subproject == null ? Project : Project.WithTag(WellKnownApplicationIdentityProperties.Subproject, identity.Subproject); Environment = Subproject.WithTag(WellKnownApplicationIdentityProperties.Environment, identity.Environment); Application = Environment.WithTag(WellKnownApplicationIdentityProperties.Application, identity.Application); var instance = identity.Instance; if (string.Equals(instance, EnvironmentInfo.Host, StringComparison.InvariantCultureIgnoreCase)) { instance = instance.ToLowerInvariant(); } Instance = Application.WithTag(WellKnownApplicationIdentityProperties.Instance, instance); }
public SubprojectInsert() { InitializeComponent(); this.spInsert = new Subproject(); }
public SubprojectUpdate() { InitializeComponent(); this.spUpdate = new Subproject(); }