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 937825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:32:23+00:00 2026-05-15T21:32:23+00:00

I did this code in my presentation layer but i don’t know how to

  • 0

I did this code in my presentation layer but i don’t know how to do it on 3 tier . .
Please help, i’m stack with this problem.
form1_Load()
{
cboStatus();
GetlistView();
}

region "FILL combo"

    public void cboStatus()
    {
      
        try
        {
          SqlConnection conn = new SqlConnection(connStr);
            SqlCommand sqlcom = new SqlCommand("sp_loadStatus",conn);
            sqlcom.CommandType = CommandType.StoredProcedure;
            SqlDataReader dr = null;
            conn.Open();
            dr = sqlcom.ExecuteReader();
            cmbStatus.Items.Clear();
            while (dr.Read())
            {
                 cmbStatus.Items.Add((dr["StatusDescription"]));
            }

            if (conn.State == ConnectionState.Open) conn.Close();
        }
        catch (Exception ex)
        {
            MessageBox.Show("Error Occurred:" + ex);
        }
        finally
        {
         
        }
    }

    #endregion

    #region "fill listview"
    public void GetlistView()
    {

        int i = 0;

        SqlConnection sqlcon = new SqlConnection(connStr);
       lstBF.Items.Clear();
        SqlCommand sqlcom = new SqlCommand("sp_LoadNew", sqlcon);
        sqlcom.CommandType = CommandType.StoredProcedure;
        SqlDataReader dr;
        lstBF.Items.Clear();
        sqlcon.Open();
        dr = sqlcom.ExecuteReader();

        while (dr.Read())
        {

            lstBF.Items.Add(dr["SerialNumber"].ToString());
            lstBF.Items[i].SubItems.Add(dr["PartNumber"].ToString());
            lstBF.Items[i].SubItems.Add(dr["StatusDescription"].ToString());
            lstBF.Items[i].SubItems.Add(dr["CustomerName"].ToString());
            lstBF.Items[i].SubItems.Add(dr["DateCreated"].ToString());
            lstBF.Items[i].SubItems.Add(dr["CreatedBy"].ToString());
            lstBF.Items[i].SubItems.Add(dr["ModifiedBy"].ToString());


            i = i + 1;
        }

        if (sqlcon.State == ConnectionState.Open) sqlcon.Close();
    }



    #endregion
  • 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-05-15T21:32:24+00:00Added an answer on May 15, 2026 at 9:32 pm

    There are probably a handful of things you can do, but I think the most basic would be to make Business objects (C# Class) that represent Status and whatever you are displaying in your ListView (probably a Product of some sort).

    Your Data Tier should have the Data Access code (SqlConnection and such) that builds collections of Statuses and Products.

    Your Business Tier will take care of any business logic (which you don’t have much here, which is fine).

    Your Presentation Tier will Bind the UI Controls to the collections returned from the Data Tier (via the Business Tier).

    Really, your Business objects are Business Tier entities.

    From there, you can expand to make Data Access classes that correspond to your Business objects and such.

    Here’s a good tech article to get you started:
    http://msdn.microsoft.com/en-us/library/ms973279.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

according to this code i dont understand about NSClassFromString how did i know viewControllerName
This is the code i have. The NSDictionary did used to be something, but
I did this but it didn't work. Can anyone help me? Thanks. $('.current_element').mouseover(function() {
Couldn't find anything relevant in forums So ,Please help me with this code .I'm
HI i did this code with help of Marc Gravell in Why can't I
I did this code for my own server in php5, but when I tried
Did I not get enough sleep or what? This following code var frame=document.getElementById(viewer); frame.width=100;
I just recently found myself writing this line of code, which i did not
I want v0.1.27 of nodejs code base. This is what I did. git clone
I did this in Perl, but how do you the same in python? Example:

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.