Congratulations to all monthly winners of May 2013 !!! They have won INR 2900 cash and INR 27497 worth prize.
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 23243 |  Welcome, Guest!   Register  Login
 Home > Forums > C# > Regarding references of BAL and DAL layres, created as separate class libr ...
Iluvdotnetfunda

Regarding references of BAL and DAL layres, created as separate class library projects.

Replies: 4 | Posted by: Iluvdotnetfunda on 6/6/2012 | Category: C# Forums | Views: 621 | Status: [Member] | Points: 10  


hi,

for my project i created BE, DAL and BAL layes as separate projects and also i given references as BE and DAL references added to BAL , BE reference added to DAL.
Now when i am creating methods in BAL and DAL error is showing like method is not exits, so any one help me in this..

Thanks


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Rickeybglr
Rickeybglr  
Posted on: 6/6/2012 6:53:55 AM
Level: Starter | Status: [Member] | Points: 25

can you please provide your code

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Iluvdotnetfunda
Iluvdotnetfunda  
Posted on: 6/6/2012 7:45:02 AM
Level: Starter | Status: [Member] | Points: 25

hi Rickeybglr,

AdminBAL.cs code

using System;

using System.Collections.Generic;
using System.Text;
using System.Data;
using DAL;

namespace BAL
{
public class AdminBAL
{

public int Insert(string userName, string password, string superPassword, string userType, string adminDesc, bool active)
{
return new AdminDAL().Insert(userName, password, superPassword, userType, adminDesc, active);
}
}




Iluvdotnetfunda, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Rickeybglr
Rickeybglr  
Posted on: 6/7/2012 1:05:58 AM
Level: Starter | Status: [Member] | Points: 25

ru able to create the object of AdminBAL class from the class where you want to call the method ?
if not please include ur namepace in respectie class

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Kavi.Sirius
Kavi.Sirius  
Posted on: 6/7/2012 1:09:25 AM
Level: Starter | Status: [Member] | Points: 25

hi Iluvdotnetfunda ,


//create the object for particular class here
for example, if u r going to access a method that belongs to this class
AdminDAL


using System;

using System.Collections.Generic;

using System.Text;

using System.Data;

using DAL;



namespace BAL

{

public class AdminBAL

{
AdminDAL objData=new AdminDAL();

public int Insert(string userName, string password, string superPassword, string userType, string adminDesc, bool active)

{
int i;
i=objData.Insert(userName, password, superPassword, userType, adminDesc, active);
return i;
}

}

i hope its help for u,

Regards
Kavi.n

Iluvdotnetfunda, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 6/19/2013 1:55:18 AM