private static LeaveWF GetItem(IDataReader dataReader)
        {
            LeaveWF objItem = new LeaveWF();

            objItem.ID                  = SqlHelper.GetInt(dataReader, "ID");
            objItem.EmployeeCode        = SqlHelper.GetInt(dataReader, "EmployeeCode");
            objItem.EmployeeNo          = SqlHelper.GetString(dataReader, "EmployeeNo");
            objItem.EmployeeName_EN     = SqlHelper.GetString(dataReader, "EmployeeName_EN");
            objItem.CreatedDate         = SqlHelper.GetDateTime(dataReader, "CreatedDate");
            objItem.StartDate           = SqlHelper.GetDateTime(dataReader, "StartDate");
            objItem.EndDate             = SqlHelper.GetDateTime(dataReader, "EndDate");
            objItem.FullName_EN         = SqlHelper.GetString(dataReader, "FullName_EN");
            objItem.StatusName          = SqlHelper.GetString(dataReader, "StatusName");
            objItem.ApprovalLevel       = SqlHelper.GetInt(dataReader, "ApprovalLevel");
            objItem.DirectManagerCode   = SqlHelper.GetInt(dataReader, "DirectManagerCode");
            objItem.DirectManagerNo     = SqlHelper.GetString(dataReader, "DirectManagerNo");
            objItem.DirectManagerName   = SqlHelper.GetString(dataReader, "DirectManagerName");
            objItem.InDirectManagerCode = SqlHelper.GetInt(dataReader, "InDirectManagerCode");
            objItem.InDirectManagerNo   = SqlHelper.GetString(dataReader, "InDirectManagerNo");
            objItem.InDirectManagerName = SqlHelper.GetString(dataReader, "InDirectManagerName");
            objItem.RoleFullName        = SqlHelper.GetString(dataReader, "RoleFullName");
            objItem.Description         = SqlHelper.GetString(dataReader, "Description");

            return(objItem);
        }
        public static LeaveWFCollection GetLeaveReason(LeaveWFPara Filter)
        {
            LeaveWFCollection collection = new LeaveWFCollection();
            var sqlParams = new SqlParameter[]
            {
                new SqlParameter("@EntityID", Filter.EntityID),
                new SqlParameter("@WorkDate", Filter.WorkDate),
                new SqlParameter("@EmployeeCode", Filter.EmployeeCode),
            };

            using (var reader = SqlHelper.ExecuteReaderService(ModuleConfig.MyConnection, "MIS_HRApps.dbo.USP_LMS_LeaveInfoDetail_Get", sqlParams))
            {
                LeaveWF obj = new LeaveWF();
                while (reader.Read())
                {
                    obj = GetItem(reader);
                    collection.Add(obj);
                }
            }
            return(collection);
        }