Exemplo n.º 1
0
 public static string GetCodifica(CentroCostoDto centroCosto)
 {
     try
     {
         if(centroCosto!=null)
         {
             var codifica = centroCosto.Codice + " - " + centroCosto.Denominazione;
             return codifica;
         }
     }
     catch (Exception ex)
     {
         UtilityError.Write(ex);
     }
     return null;
 }
Exemplo n.º 2
0
 private void BindViewCentroCosto(CentroCostoDto centroCosto)
 {
     try
     {
         editCentroCosto.Model = centroCosto;
         editCentroCosto.Value = BusinessLogic.CentroCosto.GetCodifica(centroCosto);
     }
     catch (Exception ex)
     {
         UtilityError.Write(ex);
     }
 }
Exemplo n.º 3
0
	    /// <summary>
	    /// Adds a new centrocosto from the given dto object into the database.
	    /// </summary>
	    /// <param name="centrocosto">The dto object.</param>
	    /// <returns>The dto key of the newly created centrocosto.</returns>
	    public string CreateCentroCosto(CentroCostoDto centrocosto)
	    {
	        string key = this.CentroCostoService.Add(centrocosto);
	        this.UnitOfWork.SaveChanges();
	        return key;
	    }
Exemplo n.º 4
0
	    /// <summary>
	    /// Deletes centrocosto from the database by the given dto object.
	    /// </summary>
	    /// <param name="centrocosto">The dto object.</param>
	    public void DeleteCentroCosto(CentroCostoDto centrocosto)
	    {
	        this.CentroCostoService.Delete(centrocosto);
	        this.UnitOfWork.SaveChanges();		
	    }
Exemplo n.º 5
0
		public FatturaAcquistoDto(int _id, int _fornitoreId, DateTime? _data, string _numero, string _tipoPagamento, string _descrizione, decimal? _imponibile, decimal? _iVA, decimal? _totale, string _scadenzaPagamento, int _centroCostoId, decimal? _totalePagamenti, string _stato, string _note, decimal? _totaleResi, decimal? _sconto, DateTime? _scadenza, CentroCostoDto _centroCosto, FornitoreDto _fornitore, IList<ArticoloDto> _articolos, IList<PagamentoDto> _pagamentos, IList<PagamentoUnificatoFatturaAcquistoDto> _pagamentoUnificatoFatturaAcquistos, IList<ResoDto> _resos)
		{
			this.Id = _id;
			this.FornitoreId = _fornitoreId;
			this.Data = _data;
			this.Numero = _numero;
			this.TipoPagamento = _tipoPagamento;
			this.Descrizione = _descrizione;
			this.Imponibile = _imponibile;
			this.IVA = _iVA;
			this.Totale = _totale;
			this.ScadenzaPagamento = _scadenzaPagamento;
			this.CentroCostoId = _centroCostoId;
			this.TotalePagamenti = _totalePagamenti;
			this.Stato = _stato;
			this.Note = _note;
			this.TotaleResi = _totaleResi;
			this.Sconto = _sconto;
			this.Scadenza = _scadenza;
			this.CentroCosto = _centroCosto;
			this.Fornitore = _fornitore;
			this.Articolos = _articolos;
			this.Pagamentos = _pagamentos;
			this.PagamentoUnificatoFatturaAcquistos = _pagamentoUnificatoFatturaAcquistos;
			this.Resos = _resos;
		}