Hi
Sorry I made a mistake. Actually in the below code.
if (InsurerID.Text != "0")
{
LQMasterAssetDataContext CDbIN = new LQMasterAssetDataContext();
TB_MasterAssetInsurer AssInsurer = CDbIN.TB_MasterAssetInsurers.FirstOrDefault(C => C.mAIN_NUPKId == mobjGenlib.ConvertLong(InsurerID.Text));
InsurerName.Text = AssInsurer.mAIN_VCAgentname;
}
if (SoldID.Text != "0")
{
LQMasterAssetDataContext CDbIN = new LQMasterAssetDataContext();
TB_MasterAsset AssSoldto = CDbIN.TB_MasterAssets.FirstOrDefault(C => C.mASS_NUPKId == mobjGenlib.ConvertLong(SoldID.Text));
SoldName.Text = AssSoldto.mASS_mACC_NUPKId_Soldto.ToString();
}
Instead of connecting to the Account table
(TB_MasterAccount)
i wrongly given its own table name as
(TB_MasterAsset
and
TB_MasterInsurer
Once i changed the above things it was working fine.