Пример #1
0
 public static bool Delete(Tipo_Iva Tipo_Iva)
 {
     try
     {
         DB.Tipo_Iva.DeleteOne(x => x.Id == Tipo_Iva.Id);
         return(true);
     }
     catch (Exception e)
     {
         throw new Exception("Erro delete Tipo_Iva :" + e.ToString());
     }
 }
Пример #2
0
 public static bool Update(Tipo_Iva Tipo_Iva)
 {
     try
     {
         DB.Tipo_Iva.ReplaceOne(c => c.Id == Tipo_Iva.Id, Tipo_Iva);
         return(true);
     }
     catch (Exception e)
     {
         throw new Exception("Erro Update Tipo_Iva :" + e.ToString());
     }
 }
Пример #3
0
        public static Tipo_Iva Get(string name)
        {
            try
            {
                Tipo_Iva pais = DB.Tipo_Iva.Find(x => x.name == name).FirstOrDefault();
                if (pais != null)
                {
                    return(pais);
                }

                return(null);
            }
            catch (Exception e)
            {
                throw new Exception("Erro Inserir Tipo_Iva" + e.ToString());
            }
        }
Пример #4
0
        public static bool Insert(string name)
        {
            try
            {
                var t   = GetAll();
                int val = t.Count();


                Tipo_Iva cntr = new Tipo_Iva(name, val);
                DB.Tipo_Iva.InsertOne(cntr);

                return(true);
            }
            catch (Exception e)
            {
                throw new Exception("Erro Inserir Tipo_Iva" + e.ToString());
            }
        }
Пример #5
0
        public static bool Insert(string projectoid, string fornecedor, DateTime data, double valor, string Namefile, string Filepath, Tipo_Iva tipoivaidv, Ivas ivaidv, Cambio cambioidv)
        {
            try
            {
                PagamentosCliente cntr = new PagamentosCliente(projectoid, fornecedor, data, valor, Namefile, Filepath, tipoivaidv, ivaidv, cambioidv);
                DB.PagamentosCliente.InsertOne(cntr);

                return(true);
            }
            catch (Exception e)
            {
                throw new Exception("Erro Inserir PagamentosCliente" + e.ToString());
            }
        }
Пример #6
0
 public PagamentosCliente(string projectoid, string fornecedor, DateTime data, double valor, string Namefile, string Filepath, Tipo_Iva tipoivaidv, Ivas ivaidv, Cambio cambioidv)
 {
     this.projectoid = projectoid;
     this.fornecedor = fornecedor;
     this.data       = data;
     this.valor      = valor;
     this.Namefile   = Namefile;
     this.Filepath   = Filepath;
     this.cambioidv  = cambioidv;
     this.ivaidv     = ivaidv;
     this.tipoivaidv = tipoivaidv;
 }