public List <SalaryDetailDTO> GetAllSalaryDetail(SalaryDetailGetDTO objSalary) { List <SalaryDetailDTO> salary = new List <SalaryDetailDTO>(); using (DataBaseLayer dbLayer = new DataBaseLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectSalaryDetail"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", 1001); salary = dbLayer.GetEntityList <SalaryDetailDTO>(SqlCmd); } return(salary); }
public List <SalaryDetailDTO> GetInActiveSalaryDetail(SalaryDetailGetDTO objSalary) { List <SalaryDetailDTO> InActiveList = new List <SalaryDetailDTO>(); using (DataBaseLayer dbLayer = new DataBaseLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectSalaryDetail"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@Active", 0); SqlCmd.Parameters.AddWithValue("@ActionBy", objSalary.ActionBy); InActiveList = dbLayer.GetEntityList <SalaryDetailDTO>(SqlCmd); } return(InActiveList); }
public List <SalaryDetailDTO> GetSalaryDetailById(SalaryDetailGetDTO objSalary) { List <SalaryDetailDTO> accounts = new List <SalaryDetailDTO>(); using (DataBaseLayer dbLayer = new DataBaseLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectSalaryDetail"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@EmployeeId", objSalary.EmployeeId); SqlCmd.Parameters.AddWithValue("@ActionBy", objSalary.ActionBy); accounts = dbLayer.GetEntityList <SalaryDetailDTO>(SqlCmd); } return(accounts); }