public static bool Delete(Ivas Ivas) { try { DB.Ivas.DeleteOne(x => x.Id == Ivas.Id); return(true); } catch (Exception e) { throw new Exception("Erro delete Ivas :" + e.ToString()); } }
public static bool Update(Ivas Ivas) { try { DB.Ivas.ReplaceOne(c => c.Id == Ivas.Id, Ivas); return(true); } catch (Exception e) { throw new Exception("Erro Update Ivas :" + e.ToString()); } }
public static bool Insert(string name) { try { var t = GetAll(); int val = t.Count(); Ivas cntr = new Ivas(name, val); DB.Ivas.InsertOne(cntr); return(true); } catch (Exception e) { throw new Exception("Erro Inserir Ivas" + e.ToString()); } }
public static Ivas Get(string name) { try { Ivas pais = DB.Ivas.Find(x => x.name == name).FirstOrDefault(); if (pais != null) { return(pais); } return(null); } catch (Exception e) { throw new Exception("Erro Inserir Ivas" + e.ToString()); } }
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()); } }
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; }