Esempio n. 1
0
        public static string TModelName(string tModelKey)
        {
            Debug.Enter();

            SqlCommand cmd = new SqlCommand("net_tModel_get", ConnectionManager.GetConnection());

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Transaction = ConnectionManager.GetTransaction();

            cmd.Parameters.Add(new SqlParameter("@tModelKey", SqlDbType.UniqueIdentifier)).Direction = ParameterDirection.Input;
            cmd.Parameters.Add(new SqlParameter("@operatorName", SqlDbType.NVarChar, UDDI.Constants.Lengths.OperatorName)).Direction     = ParameterDirection.Output;
            cmd.Parameters.Add(new SqlParameter("@authorizedName", SqlDbType.NVarChar, UDDI.Constants.Lengths.AuthorizedName)).Direction = ParameterDirection.Output;
            cmd.Parameters.Add(new SqlParameter("@name", SqlDbType.NVarChar, UDDI.Constants.Lengths.Name)).Direction = ParameterDirection.Output;
            cmd.Parameters.Add(new SqlParameter("@overviewURL", SqlDbType.NVarChar, UDDI.Constants.Lengths.OverviewURL)).Direction = ParameterDirection.Output;

            SqlParameterAccessor paramacc = new SqlParameterAccessor(cmd.Parameters);

            paramacc.SetGuidFromKey("@tModelKey", tModelKey);

            cmd.ExecuteNonQuery();

            Debug.Leave();

            return(paramacc.GetString("@name"));
        }