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

Posted by Iluvdotnetfunda under C# on 6/6/2012 | Points: 10 | Views : 1702 | Status : [Member] | Replies : 4
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




Responses

Posted by: Rickeybglr on: 6/6/2012 [Member] Starter | Points: 25

Up
0
Down
can you please provide your code

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

Posted by: Iluvdotnetfunda on: 6/6/2012 [Member] Starter | Points: 25

Up
0
Down
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. | Alert Moderator

Posted by: Rickeybglr on: 6/7/2012 [Member] Starter | Points: 25

Up
0
Down
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. | Alert Moderator

Posted by: Kavi.Sirius on: 6/7/2012 [Member] Starter | Points: 25

Up
0
Down
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. | Alert Moderator

Login to post response