//Obtiene correlativo Solicitud
        public string Get_Correlativo_Sol(BE_ReqSolCorrelativo Request)
        {
            string Item = "";

            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_Persona_Get_NewId";
                        cm.CommandType = CommandType.StoredProcedure;
                        cm.Parameters.AddWithValue("cPerJurCodigo", Request.cPerCodigo);
                        cm.Connection = cn;
                        using (SqlDataReader dr = cm.ExecuteReader())
                        {
                            while (dr.Read())
                            {
                                Item = dr.GetString(dr.GetOrdinal("NewCodigo")).Trim();
                            }
                        }
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(Item);
        }
예제 #2
0
        public string Get_Correlativo_Sol(BE_ReqSolCorrelativo Request)
        {
            string       Item = "";
            DA_Solicitud Obj  = new DA_Solicitud();

            Item = Obj.Get_Correlativo_Sol(Request);
            return(Item);
        }