Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8184841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:38:47+00:00 2026-06-07T01:38:47+00:00

Got all mixed up and I’m sure it’s a silly one. Solution: Project 1.

  • 0

Got all mixed up and I’m sure it’s a silly one.
Solution:

Project 1. Compania.
Linea.cs: Just the Linea class with different constructors and that’s it for now.

Project 2. Bandeja.
Class.cs: Here I wrote all the methods I’ll be needing when working with Linea. (getLinea() is the one I’ll be showing you in the example below)

Project 3. WCFWebService.
A WCF service calling the C# methods.

References.

from Bandeja to Compania.

from WCFWebService to Compania.

from WCFWebService to Bandeja.

The only one error I get while building comes from the service.

Service Class

namespace WCFWebService
{
    [DataContract]
    public class WSBandeja : IWSBandeja
    {
        public Compania.Linea getLinea()
        {
            Compania.Linea linea = new Compania.Linea();
            return linea.

        }

    }
}

When I enter return.linea. I can’t find the method getLinea() contained in class.cs inside Project Bandeja, just the parameters.

Any suggestion is most welcome since I’m new to C# and WebServices.
Thanks.

EDIT.
Compania Project – Linea.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Compania
{
    public class Linea
    {
        public string ani { get; set; }
        public int teleprom { get; set; }
        public string actividad { get; set; }
        public DateTime fechaIngreso { get; set; }
        public string reclamo { get; set; }
        public string producto { get; set; }
        public string observacion { get; set; }
        public int tipoActividad { get; set; }
        public string tipoAveria { get; set; }
        public int reiteros { get; set; }
        public int call { get; set; }
        public bool trabajado { get; set; }
    }
}

Bandeja Project – Class.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
using System.Web;

namespace Bandeja
{
    public class Bandeja
    {
        public static string getNewConnection()
        {
            return ConfigurationManager.ConnectionStrings["BO"].ConnectionString;
        }

        public Compania.Linea getLinea()
        {
            var cLinea = new Compania.Linea();
            string connectionString = getNewConnection();
            SqlConnection conn = new SqlConnection(connectionString);
            using(conn)
            { 
                string variable = "GESTIONAR MANUALMENTE";
                var command = new SqlCommand("Bandeja_test");
                command.Connection = conn; 
                command.CommandType = CommandType.StoredProcedure;
                command.Parameters.Add(new SqlParameter("@linea", variable));
                conn.Open();
                SqlDataReader newReader = command.ExecuteReader();

                while (newReader.Read())
                {
                    cLinea = new Compania.Linea();
                    cLinea.ani = newReader["Línea"].ToString();
                    cLinea.fechaIngreso = Convert.ToDateTime(newReader["Fecha Ingreso"]);
                    cLinea.producto = newReader["Producto"].ToString();
                    cLinea.observacion = newReader["Observación"].ToString();
                }
            }

            return cLinea;
        }

    }

}

The Web Service Interface.

namespace WCFWebService
{
    [ServiceContract]
    public interface IWSBandeja
    {
        [OperationContract]
        Compania.Linea getLinea();

    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T01:38:49+00:00Added an answer on June 7, 2026 at 1:38 am

    Looks like you are instantiating the wrong class. Try this.

    [DataContract]
        public class WSBandeja : IWSBandeja
        {
            public Compania.Linea getLinea()
            {
                Bandeja.Bandeja bandeja = new Bandeja.Bandeja();
                return bandeja.getLinea();
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just updated Chrome from 17 to 18.0.1025.142 and got all the ExtJS charts
I just got all set up and compiling in Maven with Flex-Mojos, and now
I've got all the tutorials up to beginner #5 translated and working, but I
I've currently got all of this mess at the top of my ViewModels which
Im looking to run a query on my external database, i got all the
I am using pgAdmin version 1.14.3. PostgreSQL database version is 9.1. I got all
I am trying to write a custom magento module and i've got it all
Got a question for you all! I'm trying to make a navigation system for
Hallo all. I got this piece of code: <div> <input id=id1 name=radioButton type=radio> <input
Hallo all. I got a javascript object with some propeties let's say function Animal()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.