Example #1
0
 public async Task PostSupplement(PayrollSupplementEmployeeModel supplement)
 {
     using (HttpResponseMessage response = await _apiService.ApiClient.PostAsJsonAsync("/api/EmployeeSupplement", supplement))
     {
         if (response.IsSuccessStatusCode)
         {
         }
         else
         {
             throw new Exception(response.ReasonPhrase);
         }
     }
 }
Example #2
0
        private async void AddSupplement()
        {
            var psm = new PayrollSupplementEmployeeModel
            {
                Oib   = EmployeeOib,
                Iznos = SupplementValue,
                Sifra = SelectedSupplement.Sifra,
                Naziv = SelectedSupplement.Naziv
            };

            await _payrollSupplementEmployeeEndpoint.PostSupplement(psm);

            LoadEmployeeSupplements();
        }
Example #3
0
        public void InsertSupplement(PayrollSupplementEmployeeModel supplement)
        {
            try
            {
                _sql.StartTransaction("AccountingConnStr");

                _sql.SaveDataInTransaction("dbo.spPayrollSupplementEmployee_Insert", supplement);
            }
            catch (System.Exception)
            {
                _sql.RollBackTransaction();
                throw;
            }
        }
Example #4
0
 public void Post([FromBody] PayrollSupplementEmployeeModel supp)
 {
     _employeeSupp.InsertSupplement(supp);
 }