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));
     }
 }
Beispiel #3
0
 private void organizacionesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         OrganizationForm frmOrganization = new OrganizationForm();
         frmOrganization.Show();
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Beispiel #4
0
 public int Create(OrganizationForm body)
 {
     return(_repository.Create(body.ToDal()));
 }
Beispiel #5
0
        private void addorganizationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OrganizationForm orgForm = new OrganizationForm();

            orgForm.Show();
        }