public int GetPendingLeavesCount()
        {
            int result             = 0;
            ActualLeaveCount Model = new ActualLeaveCount();

            string usp = "select * from [LMS].[GetPendingLeavesCount]()";

            Model = _dbContext._sp_GetPendingLeaveCount.FromSql(usp).FirstOrDefault();
            if (Model != null)
            {
                result = Model.LeaveCount;
            }
            return(result);
        }
Esempio n. 2
0
        public int GetLeaveCount(int PersonId, int TypeId)
        {
            int result             = 0;
            ActualLeaveCount Model = new ActualLeaveCount();

            var    param1 = new SqlParameter("@PersonId", PersonId);
            var    param2 = new SqlParameter("@TypeId", TypeId);
            string usp    = "LMS.usp_GetLeaveCount @TypeId,@PersonId";

            Model = _dbContext._sp_GetLeaveCount.FromSql(usp, param2, param1).FirstOrDefault();
            if (Model != null)
            {
                result = Model.LeaveCount;
            }
            return(result);
        }