Dropdown class
public void LoadSelectBenefitsAndDeductionsCombo(ref DropDownList dgv)
{
// Code Part :6b
//'***** Author: Mohammed Shamsheer
//'***** Date : 16/08/2013
//'***** This function used to Load BenefitsAndDeductionsCombo in web
DataSet ds = new DataSet();
object[,] ParmArray;
ParmArray = new object[,] {
{"@BranchID",BranchID}
};
ds = DB.ExecuteQuery_SP("SelectBenefitsAndDeductionsCombo", ParmArray);
if (ds.Tables.Count > 0)
{
dgv.DataSource = ds.Tables[0];
dgv.DataBind();
}
}
------------------------------
Query for load dropdown
:
ALTER PROCEDURE [dbo].[SelectBenefitsAndDeductionsCombo]
(
@BranchID bigint
)
AS
SELECT BenefitDeductionID,BenefitDeductionName FROM BenefitsAndDeductions WHERE BranchID=@BranchID
----------------------------------------
code behind for load drop down but itis showing
BenefitsAndDeductions obj = new BenefitsAndDeductions();
obj.LoadSelectBenefitsAndDeductionsCombo(ref ddlBenefitsAndDeductionsType);
but it is showing