Click here to Skip to main content
15,898,134 members
Home / Discussions / C#
   

C#

 
GeneralRe: Calling Base Class From GrandChild class Pin
N a v a n e e t h20-Sep-07 23:34
N a v a n e e t h20-Sep-07 23:34 
GeneralRe: Calling Base Class From GrandChild class Pin
Martin#20-Sep-07 23:41
Martin#20-Sep-07 23:41 
GeneralRe: Calling Base Class From GrandChild class Pin
Urs Enzler21-Sep-07 1:21
Urs Enzler21-Sep-07 1:21 
QuestionException Error Pin
ilango gandhi20-Sep-07 19:16
ilango gandhi20-Sep-07 19:16 
AnswerRe: Exception Error Pin
Scott Dorman20-Sep-07 19:22
professionalScott Dorman20-Sep-07 19:22 
AnswerRe: Exception Error Pin
Guffa20-Sep-07 19:27
Guffa20-Sep-07 19:27 
AnswerRe: Exception Error Pin
DaveyM6920-Sep-07 20:45
professionalDaveyM6920-Sep-07 20:45 
QuestionCould not load Assembly Pin
veereshIndia20-Sep-07 18:57
veereshIndia20-Sep-07 18:57 
Hi All,

Iam using 3 tier architecture.Now what iam doing is i written database related things into DAL.Now i want to access these class and methods into
BLL.After that iam accessing BLL classes into my GUI.But here it is showing this error

Type Load Exception Was Unhandled by User Code
Could not load type 'DAL.JoDetailsDAL' from assembly 'DAL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Here is My DAL Code file

JoDetailsDAL.cs

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Data.SqlClient;
namespace DAL
{
public class JoDetailsDAL
{
CommonDAL objCommonDAL = new CommonDAL();

public SqlDataReader getcustomer(ref string errorMsg)
{
string strSelect = "select CustomerName from cm_tb_032";
return objCommonDAL.getDataReader(strSelect, ref errorMsg);
}
public SqlDataReader getvendor(ref string errorMsg)
{
string strSelect = "select VendorName from cm_tb_033";
return objCommonDAL.getDataReader(strSelect, ref errorMsg);
}
public SqlDataReader getvendorcity(ref string errorMsg)
{
string strSelect = "select VendorCity from cm_tb_034";
return objCommonDAL.getDataReader(strSelect, ref errorMsg);
}
public SqlDataReader getvendorstate(ref string errorMsg)
{
string strSelect = "select VendorState from cm_tb_035";
return objCommonDAL.getDataReader(strSelect, ref errorMsg);
}
public SqlDataReader getjostatus(ref string errorMsg)
{
string strSelect = "select Status from cm_tb_036";
return objCommonDAL.getDataReader(strSelect, ref errorMsg);

}
public SqlDataReader getamendmentstatus(ref string errorMsg)
{
string strSelect = "select AmendmentStatus from cm_tb_038";
return objCommonDAL.getDataReader(strSelect, ref errorMsg);

}
public SqlDataReader getdeliveryschedule(ref string errorMsg)
{
string strSelect = "select DelSchedule from cm_tb_039";
return objCommonDAL.getDataReader(strSelect, ref errorMsg);
}
public SqlDataReader termsofpayment(ref string errorMsg)
{
string strSelect = "select TermsOfPayment from cm_tb_040";
return objCommonDAL.getDataReader(strSelect, ref errorMsg);
}


}
}

Here is My BLL Code

using System;
using System.Collections.Generic;
using System.Text;
using System.Data.Sql;
using System.Data.SqlClient;
using DAL;
namespace BLL
{
public class JoDetailsBLL

{

JoDetailsDAL objJoDetailsDAL = new JoDetailsDAL();

public SqlDataReader getcustomer(ref string errorMsg)
{

return objJoDetailsDAL.getcustomer(ref errorMsg);
}
public SqlDataReader getvendor(ref string errorMsg)
{
return objJoDetailsDAL.getvendor(ref errorMsg);

}
public SqlDataReader getvendorcity(ref string errorMsg)
{
return objJoDetailsDAL.getvendorstate(ref errorMsg);
}
public SqlDataReader getvendorstate(ref string errorMsg)
{
return objJoDetailsDAL.getvendorstate(ref errorMsg);
}
public SqlDataReader getjostatus(ref string errorMsg)
{
return objJoDetailsDAL.getjostatus(ref errorMsg);
}
public SqlDataReader getamendmentstatus(ref string errorMsg)
{
return objJoDetailsDAL.getamendmentstatus(ref errorMsg);

}
public SqlDataReader getdeliveryschedule(ref string errorMsg)
{
return objJoDetailsDAL.getdeliveryschedule(ref errorMsg);

}
public SqlDataReader termsofpayment(ref string errorMsg)
{
return objJoDetailsDAL.termsofpayment(ref errorMsg);
}

}
}

Here is my GUI Code file

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Reflection;
using BLL;

public partial class JoDetails : System.Web.UI.Page
{

JoDetailsBLL objJoDetailsBLL = new JoDetailsBLL();

string errorMsg = null;
protected void Page_Load(object sender, EventArgs e)
{
getcustomer();
getvendor();
getvendorcity();
getvendorstate();
vendorinvoicecity();
vendorinvoicestate();
jopartcity();
joshipcity();
joshipstate();
jostatus();
joamendmentstatus();
getdeliveryschedule();
termsofpayment();

}


public void getcustomer()
{

SqlDataReader dr = objJoDetailsBLL.getcustomer(ref errorMsg);
if (dr == null)
{
errorLbl.Text = errorMsg;
errorLbl.Visible = true;
}
else
{
JoCustomerLst.DataSource = dr;
JoCustomerLst.DataTextField = "cust_name";
JoCustomerLst.DataBind();
}
}
public void getvendor()
{
SqlDataReader dr = objJoDetailsBLL.getvendor(ref errorMsg);
if (dr == null)
{
errorLbl.Text = errorMsg;
errorLbl.Visible = true;
}
else
{

JoVendorLst.DataSource = dr;
JoVendorLst.DataTextField = "vendor_name";
JoVendorLst.DataBind();
}
}
public void getvendorcity()
{
SqlDataReader dr = objJoDetailsBLL.getvendorcity(ref errorMsg);
if (dr == null)
{
errorLbl.Text = errorMsg;
errorLbl.Visible = true;
}
else
{

JoVendorCityLst.DataSource = dr;
JoVendorCityLst.DataTextField = "vendor_city";
JoVendorCityLst.DataBind();
}
}
public void getvendorstate()
{
SqlDataReader dr = objJoDetailsBLL.getvendorstate(ref errorMsg);
if (dr == null)
{
errorLbl.Text = errorMsg;
errorLbl.Visible = true;
}
else
{

JoVendorStateLst.DataSource = dr;
JoVendorStateLst.DataTextField = "vendor_state";
JoVendorStateLst.DataBind();
}
}
public void vendorinvoicecity()
{
SqlDataReader dr = objJoDetailsBLL.getvendorcity(ref errorMsg);
if (dr == null)
{
errorLbl.Text = errorMsg;
errorLbl.Visible = true;
}
else
{

JoInvoiceToCityLst.DataSource = dr;
JoInvoiceToCityLst.DataTextField = "vendorinvoice_city";
JoInvoiceToCityLst.DataBind();
}


}
public void vendorinvoicestate()
{
SqlDataReader dr = objJoDetailsBLL.getvendorstate(ref errorMsg);
if (dr == null)
{
errorLbl.Text = errorMsg;
errorLbl.Visible = true;
}
else
{

JoInvoiceToStateLst.DataSource = dr;
JoInvoiceToStateLst.DataTextField = "vendorinvoice_state";
JoInvoiceToStateLst.DataBind();
}


}

public void jopartcity()
{
SqlDataReader dr = objJoDetailsBLL.getvendorcity(ref errorMsg);
if (dr == null)
{
errorLbl.Text = errorMsg;
errorLbl.Visible = true;
}
else
{

JoParCityLst.DataSource = dr;
JoParCityLst.DataTextField = "jopart_city";
JoParCityLst.DataBind();
}


}

public void joshipcity()
{
SqlDataReader dr = objJoDetailsBLL.getvendorcity(ref errorMsg);
if (dr == null)
{
errorLbl.Text = errorMsg;
errorLbl.Visible = true;
}
else
{

JoShipToCityLst.DataSource = dr;
JoShipToCityLst.DataTextField = "joship_city";
JoShipToCityLst.DataBind();
}


}

public void joshipstate()
{
SqlDataReader dr = objJoDetailsBLL.getvendorstate(ref errorMsg);
if (dr == null)
{
errorLbl.Text = errorMsg;
errorLbl.Visible = true;
}
else
{

JoShipToStateLst.DataSource = dr;
JoShipToStateLst.DataTextField = "joship_state";
JoShipToStateLst.DataBind();
}


}
public void jostatus()
{
SqlDataReader dr = objJoDetailsBLL.getjostatus(ref errorMsg);
if (dr == null)
{
errorLbl.Text = errorMsg;
errorLbl.Visible = true;
}
else
{

JoStatusLst.DataSource = dr;
JoStatusLst.DataTextField = "joship_status";
JoStatusLst.DataBind();
}
}

public void joamendmentstatus()
{
SqlDataReader dr = objJoDetailsBLL.getamendmentstatus(ref errorMsg);
if (dr == null)
{
errorLbl.Text = errorMsg;
errorLbl.Visible = true;
}
else
{

JoAmendStatusLst.DataSource = dr;
JoAmendStatusLst.DataTextField = "amendment_status";
JoAmendStatusLst.DataBind();
}



}
public void getdeliveryschedule()
{
SqlDataReader dr = objJoDetailsBLL.getdeliveryschedule(ref errorMsg);
if (dr == null)
{
errorLbl.Text = errorMsg;
errorLbl.Visible = true;
}
else
{

JoDeliveryLst.DataSource = dr;
JoDeliveryLst.DataTextField = "delivery_schedule";
JoDeliveryLst.DataBind();
}



}
public void termsofpayment()
{
SqlDataReader dr = objJoDetailsBLL.termsofpayment(ref errorMsg);
if (dr == null)
{
errorLbl.Text = errorMsg;
errorLbl.Visible = true;
}
else
{

JoTermsOfPayLst.DataSource = dr;
JoTermsOfPayLst.DataTextField = "terms_payment";
JoTermsOfPayLst.DataBind();
}
}




}


Please help on this .

veeresh
Questionplsssss very urgent Pin
santu_kumar20-Sep-07 18:49
santu_kumar20-Sep-07 18:49 
AnswerRe: plsssss very urgent Pin
Christian Graus20-Sep-07 20:42
protectorChristian Graus20-Sep-07 20:42 
AnswerRe: plsssss very urgent Pin
Guffa20-Sep-07 20:44
Guffa20-Sep-07 20:44 
QuestionHow 2 create C# Console Application programatically Pin
Chintan.Desai20-Sep-07 18:36
Chintan.Desai20-Sep-07 18:36 
AnswerRe: How 2 create C# Console Application programatically Pin
N a v a n e e t h20-Sep-07 19:41
N a v a n e e t h20-Sep-07 19:41 
AnswerRe: How 2 create C# Console Application programatically Pin
Giorgi Dalakishvili20-Sep-07 20:54
mentorGiorgi Dalakishvili20-Sep-07 20:54 
GeneralRe: How 2 create C# Console Application programatically Pin
Chintan.Desai21-Sep-07 20:02
Chintan.Desai21-Sep-07 20:02 
Questionto read xml file Pin
P_Elza20-Sep-07 18:16
P_Elza20-Sep-07 18:16 
AnswerRe: to read xml file Pin
Scott Dorman20-Sep-07 18:27
professionalScott Dorman20-Sep-07 18:27 
GeneralRe: to read xml file Pin
Chintan.Desai20-Sep-07 18:41
Chintan.Desai20-Sep-07 18:41 
GeneralRe: to read xml file Pin
N a v a n e e t h20-Sep-07 19:43
N a v a n e e t h20-Sep-07 19:43 
GeneralRe: to read xml file Pin
Scott Dorman20-Sep-07 20:49
professionalScott Dorman20-Sep-07 20:49 
GeneralRe: to read xml file Pin
Chintan.Desai21-Sep-07 20:07
Chintan.Desai21-Sep-07 20:07 
QuestionRe: to read xml file Pin
P_Elza20-Sep-07 20:17
P_Elza20-Sep-07 20:17 
AnswerRe: to read xml file Pin
N a v a n e e t h20-Sep-07 20:42
N a v a n e e t h20-Sep-07 20:42 
AnswerRe: to read xml file Pin
Scott Dorman20-Sep-07 20:54
professionalScott Dorman20-Sep-07 20:54 
AnswerRe: to read xml file Pin
Sandeep Akhare20-Sep-07 23:13
Sandeep Akhare20-Sep-07 23:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.