Exemple #1
0
 public static bool Delete(ServicoTT voos)
 {
     try
     {
         DB.ServicoTT.DeleteOne(x => x.Id == voos.Id);
         return(true);
     }
     catch (Exception e)
     {
         throw new Exception("Erro delete ServicoTT :" + e.ToString());
     }
 }
Exemple #2
0
 public static bool Update(ServicoTT Diarias)
 {
     try
     {
         DB.ServicoTT.ReplaceOne(c => c.Id == Diarias.Id, Diarias);
         return(true);
     }
     catch (Exception e)
     {
         throw new Exception("Erro Update ServicoTT :" + e.ToString());
     }
 }
Exemple #3
0
        public static bool Insert(ServicoTT Diaria)
        {
            try
            {
                DB.ServicoTT.InsertOne(Diaria);

                return(true);
            }
            catch (Exception e)
            {
                throw new Exception("Erro Inserir ServicoTT" + e.ToString());
            }
        }
Exemple #4
0
        public static bool Insert(string orcamentoidv, string fornecedoridv, string fornecedornome, IvasIntern ivaidv, TypeOfCostIntern tipocustoidv, CambioIntern cambioidv, string servicottidv, string nomeservico, double preco, double comissao, double net, double valorcambio, double valoreuros, int quantidade, int unidades, double margemvenda, double markup, int numeropessoas, double valortotalpvp, double valorporpessoapvp, string observacoes)
        {
            try
            {
                ServicoTT cntr = new ServicoTT(orcamentoidv, fornecedoridv, fornecedornome, ivaidv, tipocustoidv, cambioidv, servicottidv, nomeservico, preco, comissao, net, valorcambio, valoreuros, quantidade, unidades, margemvenda, markup, numeropessoas, valortotalpvp, valorporpessoapvp, observacoes);
                DB.ServicoTT.InsertOne(cntr);

                return(true);
            }
            catch (Exception e)
            {
                throw new Exception("Erro Inserir ServicoTT" + e.ToString());
            }
        }
Exemple #5
0
        public static ServicoTT Get(string id)
        {
            try
            {
                ObjectId  nid  = ObjectId.Parse(id);
                ServicoTT pais = DB.ServicoTT.Find(x => x.Id == nid).FirstOrDefault();
                if (pais != null)
                {
                    return(pais);
                }

                return(null);
            }
            catch (Exception e)
            {
                throw new Exception("Erro Inserir ServicoTT" + e.ToString());
            }
        }