private bool IsPoslodavac(JoppdEmployeeModel e) { if (e.OznakaPrimitka.Contains("0101")) { return(true); } return(false); }
public void SaveData(JoppdEmployeeModel employee) { try { _sql.StartTransaction("AccountingConnStr"); _sql.SaveDataInTransaction("dbo.spJoppdEmployee_Update", employee); } catch (System.Exception) { _sql.RollBackTransaction(); throw; } }
public async Task <bool> PostJoppdData(JoppdEmployeeModel employee) { using (HttpResponseMessage response = await _apiService.ApiClient.PostAsJsonAsync("/api/JoppdEmployee", employee)) { if (response.IsSuccessStatusCode) { return(true); } else { var error = response.ReasonPhrase; return(false); } } }
public void Post([FromBody] JoppdEmployeeModel employee) { _joppdEmployee.SaveData(employee); }
private void AddSupplements(IEnumerable <PayrollArchiveSupplementModel> supplements, JoppdEmployeeModel e, PayrollArchivePayrollModel p, sPrimateljiP sPrimateljiP) { for (int i = 0; i < supplements.Count(); i++) { if (i == 0 && sPrimateljiP.P11 != 0 && (sPrimateljiP.P61 != tOznakaStjecatelja.Item0032 || sPrimateljiP.P62 != tOznakaPrimici.Item0101)) { sPrimateljiP.P151 = (tOznakaNeoporezivogPrimitka)Enum.Parse(typeof(tOznakaNeoporezivogPrimitka), supplements.ElementAt(i).Sifra); sPrimateljiP.P152 = supplements.ElementAt(i).Iznos; sPrimateljiP.P162 += sPrimateljiP.P152; } else { if (sPrimateljiP.P11 == 0) { _pArr.Remove(sPrimateljiP); } _pArr.Add(new sPrimateljiP() { P1 = _pArr.Count() + 1, P2 = e.SifraPrebivalista, P3 = e.SifraOpcineRada, P4 = e.Oib, P5 = p.Ime + " " + p.Prezime, P61 = 0, P62 = 0, P71 = 0, P72 = 0, P8 = 0, P9 = 0, P10 = 0, P100 = 0, P101 = Convert.ToDateTime(_archive.Header.DatumOd), P102 = Convert.ToDateTime(_archive.Header.DatumDo), P11 = 0, P12 = 0, P121 = 0, P122 = 0, P123 = 0, P124 = 0, P125 = 0, P126 = 0, P127 = 0, P129 = 0, P131 = 0, P132 = 0, P133 = 0, P134 = 0, P135 = 0, P141 = 0, P142 = 0, P151 = (tOznakaNeoporezivogPrimitka)Enum.Parse(typeof(tOznakaNeoporezivogPrimitka), supplements.ElementAt(i).Sifra), P152 = supplements.ElementAt(i).Iznos, P161 = (tOznakaNacinaIsplate)Enum.Parse(typeof(tOznakaNacinaIsplate), e.NacinIsplate), P162 = supplements.ElementAt(i).Iznos, P17 = 0 }); } } }