this query is correct only
Sqlstr = "select sum(sal_bonus) as bonusamt from salary_master where sal_deleted = 0 "+
" and year(sal_bonusdate) = " + lngPreviousYear + " and comp_id = " + strCompanyid +
" and emp_code = '" + Txt_Employee.Text+ "'" ;
if (vpcn.gbHalfSalary == true)
{
Sqlstr += " and sal_type = '" + vpcn.cSalary_2Half + "' ";
}
strBonus = cfs.get_data(Sqlstr);
why r u reposting your question
what do you want here tell us clearly