public List <tbl_DeptLeaveRequest> GetLeaveRequest(string PA, string PSA, string DeptMasterID) { try { DALBase obj = new DALBase(_config); List <tbl_DeptLeaveRequest> listObj = new List <tbl_DeptLeaveRequest>(); DataSet ds = obj.GetLeaveRequestBYIdForDept(ConstantStoredProcedure.SP_GetLeaveRequestMasterDept, PA, PSA, DeptMasterID); DataTable dt = ds.Tables[0]; if (dt.Rows.Count > 0) { foreach (DataRow dtRow in dt.Rows) { var LeaveID = dtRow["LEAVEID"].ToString(); var Descr = dtRow["Description"].ToString(); var objLeave = new tbl_DeptLeaveRequest(); objLeave.LeaveCode = LeaveID; objLeave.LeaveCategory = Descr; listObj.Add(objLeave); } } return(listObj); } catch (Exception ex) { throw ex; } }