/// <summary> /// Function to get the details for salarypackage register /// </summary> /// <param name="strSalaryPackageName"></param> /// <param name="strStatus"></param> /// <returns></returns> public List <DataTable> SalaryPackageregisterSearch(string strSalaryPackageName, string strStatus) { SalaryPackageSP spSalaryPackage = new SalaryPackageSP(); DataTable dtblSalaryPackage = new DataTable(); List <DataTable> ListObj = new List <DataTable>(); try { SqlDataAdapter sqlda = new SqlDataAdapter("SalaryPackageregisterSearch", sqlcon); sqlda.SelectCommand.CommandType = CommandType.StoredProcedure; dtblSalaryPackage.Columns.Add("SLNO", typeof(decimal)); dtblSalaryPackage.Columns["SLNO"].AutoIncrement = true; dtblSalaryPackage.Columns["SLNO"].AutoIncrementSeed = 1; dtblSalaryPackage.Columns["SLNO"].AutoIncrementStep = 1; sqlda.SelectCommand.Parameters.Add("@salaryPackageName", SqlDbType.VarChar).Value = strSalaryPackageName; sqlda.SelectCommand.Parameters.Add("@isActive", SqlDbType.VarChar).Value = strStatus; sqlda.Fill(dtblSalaryPackage); ListObj.Add(dtblSalaryPackage); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } return(ListObj); }
/// <summary> /// Function to get the details for salarypackage register /// </summary> /// <param name="strSalaryPackageName"></param> /// <param name="strStatus"></param> /// <returns></returns> public List<DataTable> SalaryPackageregisterSearch(string strSalaryPackageName, string strStatus) { SalaryPackageSP spSalaryPackage = new SalaryPackageSP(); DataTable dtblSalaryPackage = new DataTable(); List<DataTable> ListObj = new List<DataTable>(); try { SqlDataAdapter sqlda = new SqlDataAdapter("SalaryPackageregisterSearch", sqlcon); sqlda.SelectCommand.CommandType = CommandType.StoredProcedure; dtblSalaryPackage.Columns.Add("SLNO", typeof(decimal)); dtblSalaryPackage.Columns["SLNO"].AutoIncrement = true; dtblSalaryPackage.Columns["SLNO"].AutoIncrementSeed = 1; dtblSalaryPackage.Columns["SLNO"].AutoIncrementStep = 1; sqlda.SelectCommand.Parameters.Add("@salaryPackageName", SqlDbType.VarChar).Value = strSalaryPackageName; sqlda.SelectCommand.Parameters.Add("@isActive", SqlDbType.VarChar).Value = strStatus; sqlda.Fill(dtblSalaryPackage); ListObj.Add(dtblSalaryPackage); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } return ListObj; }