public bool checkstatusforapplyleave(string employeeid, DateTime today, DateTime from, Int32 leavetype) { bool result = false; var status = obj.Hrms_EmpCheckApplyLeaveStatus(today, from, employeeid, leavetype).Single().Value; if (status > 0) { result = true; } return(result); }