Exemple #1
0
        //-----------------------------------
        //Devuelve Porcentaje de IGV (global)
        //-----------------------------------
        public double Get_PorcIGV_by_cPerJuridica(BE_IGV Request)
        {
            double nPorcIgv = 0;

            try
            {
                clsConection Obj    = new clsConection();
                string       Cadena = Obj.GetConexionString("Naylamp");

                using (SqlConnection cn = new SqlConnection(Cadena))
                {
                    cn.Open();

                    using (SqlCommand cm = new SqlCommand())
                    {
                        cm.CommandText = "[usp_Get_PorcIGV_by_cPerJuridica]";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cPerJuridica", Request.cPerJuridica);
                        cm.Connection = cn;

                        SqlParameter sqlParameter = new SqlParameter();
                        sqlParameter.ParameterName = "nPorcIgv";
                        sqlParameter.DbType        = DbType.Double;
                        sqlParameter.Direction     = ParameterDirection.Output; //tipo salida

                        cm.Parameters.Add(sqlParameter);
                        cm.ExecuteNonQuery();
                        nPorcIgv = Convert.ToDouble(cm.Parameters["nPorcIgv"].Value);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(nPorcIgv);
        }
        //-----------------------------------
        //Devuelve Porcentaje de IGV (global)
        //-----------------------------------
        public double Get_PorcIGV_by_cPerJuridica(BE_IGV Request)
        {
            DA_Sistema Obj = new DA_Sistema();

            return(Obj.Get_PorcIGV_by_cPerJuridica(Request));
        }