Beispiel #1
0
        public bool si_existe_comprobante(tb_comprobante_x_valor_Info Comprobante_info)
        {
            try
            {
                Boolean Existe;
                using (EntitiesFactElectronica conexion = new EntitiesFactElectronica())
                {
                    int consulta = (from q in conexion.tb_comprobante_x_valor
                                    where q.IdEmpresa == Comprobante_info.IdEmpresa &&
                                    q.IdComprobante == Comprobante_info.IdComprobante
                                    select q).Count();

                    if (consulta > 0)
                    {
                        Existe = true;
                    }
                    else
                    {
                        Existe = false;
                    }
                    return(Existe);
                }
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
 public bool si_existe_comprobante(tb_comprobante_x_valor_Info Comprobante_info)
 {
     try
     {
         return(data.si_existe_comprobante(Comprobante_info));
     }
     catch (Exception)
     {
         throw;
     }
 }
 public Boolean GrabarDB(tb_comprobante_x_valor_Info Comprobante_info)
 {
     try
     {
         return(data.GrabarDB(Comprobante_info));
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #4
0
        public Boolean GrabarDB(tb_comprobante_x_valor_Info Comprobante_info)
        {
            try
            {
                using (EntitiesFactElectronica Context = new EntitiesFactElectronica())
                {
                    var Address = new tb_comprobante_x_valor();

                    Address.IdEmpresa     = Comprobante_info.IdEmpresa;
                    Address.IdComprobante = Comprobante_info.IdComprobante;
                    Address.Total         = Comprobante_info.Total;
                    Context.tb_comprobante_x_valor.Add(Address);
                    Context.SaveChanges();
                }

                return(true);
            }
            catch (Exception ex)
            {
                return(false);
            }
        }