public OrganizationFormController(OrganizationForm instance) { this.frmOrganization = instance; this.srvOrganization = SamsaraAppContext.Resolve <IOrganizationService>(); Assert.IsNotNull(this.srvOrganization); this.InitializeFormControls(); }
public IActionResult Insert([FromBody, SwaggerRequestBody("Form to add an organization", Required = true)] OrganizationForm form) { try { int idCreated = _service.Create(form.ToServiceLayer()); return(Ok(idCreated)); } catch (ArgumentNullException e) { return(new BadRequestObjectResult(e.Message)); } }
private void organizacionesToolStripMenuItem_Click(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; OrganizationForm frmOrganization = new OrganizationForm(); frmOrganization.Show(); } finally { this.Cursor = Cursors.Default; } }
public int Create(OrganizationForm body) { return(_repository.Create(body.ToDal())); }
private void addorganizationToolStripMenuItem_Click(object sender, EventArgs e) { OrganizationForm orgForm = new OrganizationForm(); orgForm.Show(); }