نمایش نتایج 1 تا 5 از 5

نام تاپیک: The name 'DAL' does not exist in the current context

  1. #1

    The name 'DAL' does not exist in the current context

    با سلام
    من یک پروژه چند لایه دارم که دارای دو لایه DAL و BLL هست.
    زمانی که میخوام از لایه BLL، لایه DAL فراخونی کنم با این پیغام مواجه میشم.
    The name 'DAL' does not exist in the current context
    ریفرنس لایه DAL به BLL هم انجام شده

    BLL Code

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

    namespace BLL
    {
    public class Panel
    {
    public static SqlDataReader GetInformationPanel(string PanelId)
    {
    SqlDataReader RetVal = DAL.Panel.GetInformationPanel(PanelId);
    return RetVal;
    }
    }
    }


    DAL Code

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

    namespace DAL
    {
    public class Panel
    {
    public static SqlDataReader GetInformationPanel(string PanelId)
    {
    SqlDataReader Val = DALBase.EReader("select * from TBLPanel where PanelId = " + PanelId + "", System.Data.CommandType.Text, new SqlParameter[] { });
    return Val;
    }
    }
    }

  2. #2
    کاربر دائمی آواتار ebrahim.rayatparvar
    تاریخ عضویت
    آبان 1392
    محل زندگی
    https://www.youtube.com/c/zangclass
    پست
    714

    نقل قول: The name 'DAL' does not exist in the current context

    سلام
    شما شاید لایه BL رو به رفرنس لایه DAL اضافه کرده باشید که باید بر عکس باشد.
    بعد اگه درست رفرنس رو اضافه کردی چرا در لایه BL لایه DAL رو Using اضافه نکردین.

    using DAL;

  3. #3

    نقل قول: The name 'DAL' does not exist in the current context

    نقل قول نوشته شده توسط ebrahim.rayatparvar مشاهده تاپیک
    سلام
    شما شاید لایه BL رو به رفرنس لایه DAL اضافه کرده باشید که باید بر عکس باشد.
    بعد اگه درست رفرنس رو اضافه کردی چرا در لایه BL لایه DAL رو Using اضافه نکردین.

    using DAL;
    دوست عزیز رفرنس درست انجام شده
    با اضافه کردن Using DAL پیغام خطا زیر نمایش داده میشه
    The type or namespace name 'DAL' could not be found (are you missing a using directive or an assembly reference
    ممنون از وقتی که گذاشتین
    آخرین ویرایش به وسیله noth50 : چهارشنبه 30 اردیبهشت 1394 در 20:28 عصر

  4. #4
    کاربر دائمی آواتار ebrahim.rayatparvar
    تاریخ عضویت
    آبان 1392
    محل زندگی
    https://www.youtube.com/c/zangclass
    پست
    714

    نقل قول: The name 'DAL' does not exist in the current context

    برای لایه UI هر دو لایه باید در رفرنس اضافه بشه و هر نیز using.

  5. #5

    نقل قول: The name 'DAL' does not exist in the current context

    نقل قول نوشته شده توسط ebrahim.rayatparvar مشاهده تاپیک
    برای لایه UI هر دو لایه باید در رفرنس اضافه بشه و هر نیز using.
    دوست عزیز اگر منظور شما اینه که لایه DAL و BLL به لایه UI رفرنس بدم، این کارو انجام دادم
    باتشکر

تاپیک های مشابه

  1. پاسخ: 1
    آخرین پست: سه شنبه 30 آبان 1391, 00:07 صبح
  2. The name 'lblip' does not exist in the current context
    نوشته شده توسط Sir-Programmer در بخش ASP.NET Web Forms
    پاسخ: 5
    آخرین پست: دوشنبه 29 آبان 1391, 17:35 عصر
  3. سوال: مواجهه با ارور the name 'Exports' does not exist in the current context
    نوشته شده توسط adineh67 در بخش ASP.NET Web Forms
    پاسخ: 1
    آخرین پست: دوشنبه 07 آذر 1390, 07:21 صبح
  4. سوال: مواجهه با ارور the name 'profile' does not exist in the current context
    نوشته شده توسط mehrdad85 در بخش ASP.NET Web Forms
    پاسخ: 1
    آخرین پست: یک شنبه 06 آذر 1390, 16:27 عصر
  5. سوال: Error 1 The name 'InitializeComponent' does not exist in the current context
    نوشته شده توسط amateur.programmer در بخش WPF
    پاسخ: 2
    آخرین پست: سه شنبه 28 دی 1389, 12:29 عصر

برچسب های این تاپیک

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •