Beispiel #1
0
        private static REmployee GetItemFromReader(IDataReader dataReader)
        {
            REmployee objItem = new REmployee();

            objItem.EntityID = SqlHelper.GetInt(dataReader, "EntityID");

            objItem.EmployeeCode = SqlHelper.GetInt(dataReader, "EmployeeCode");

            objItem.EmployeeNo = SqlHelper.GetString(dataReader, "EmployeeNo");

            objItem.EmployeeName_EN = SqlHelper.GetString(dataReader, "EmployeeName_EN");

            objItem.Email = SqlHelper.GetString(dataReader, "Email");

            objItem.DirectManager = SqlHelper.GetInt(dataReader, "DirectManager");

            objItem.DirectManagerNo = SqlHelper.GetString(dataReader, "DirectManagerNo");

            objItem.DirectManagerName = SqlHelper.GetString(dataReader, "DirectManagerName");

            objItem.IndirectManager = SqlHelper.GetInt(dataReader, "IndirectManager");

            objItem.InDirectManagerNo = SqlHelper.GetString(dataReader, "InDirectManagerNo");

            objItem.InDirectManagerName = SqlHelper.GetString(dataReader, "InDirectManagerName");

            objItem.GroupCode = SqlHelper.GetInt(dataReader, "GroupCode");

            objItem.GroupName = SqlHelper.GetString(dataReader, "GroupName");

            objItem.DeptCode = SqlHelper.GetInt(dataReader, "DeptCode");

            objItem.DeptName = SqlHelper.GetString(dataReader, "DeptName");

            objItem.PositionID = SqlHelper.GetInt(dataReader, "PositionID");

            objItem.PositionName = SqlHelper.GetString(dataReader, "PositionName");

            objItem.IsScan = SqlHelper.GetBoolean(dataReader, "IsScan");

            objItem.RangeDate = SqlHelper.GetString(dataReader, "RangeDate");

            return(objItem);
        }
Beispiel #2
0
        public static REmployeeCollections GetReminderList(REmployeePara objPara)
        {
            REmployeeCollections collection = new REmployeeCollections();

            using (var reader = SqlHelper.ExecuteReaderService(ModuleConfig.MyConnection, "USP_TMS_NotCheckINOUT_Get", new SqlParameter[]
            {
                new SqlParameter("@EntityID", objPara.EntityID),
                new SqlParameter("@FromDate", objPara.FromDate),
                new SqlParameter("@NumOfDay", objPara.NumOfDay),
            }))
            {
                while (reader.Read())
                {
                    REmployee obj = new REmployee();
                    obj = GetItemFromReader(reader);
                    collection.Add(obj);
                }
            }
            return(collection);
        }