Пример #1
0
        private static MissingScanTime BindScanTimeData(IDataReader dataReader)
        {
            MissingScanTime objItem = new MissingScanTime();

            objItem.EntityID      = SqlHelper.GetInt(dataReader, "EntityID");
            objItem.EmployeeNo    = SqlHelper.GetString(dataReader, "EmployeeNo");
            objItem.EmployeeCode  = SqlHelper.GetInt(dataReader, "EmployeeCode");
            objItem.FirstName_EN  = SqlHelper.GetString(dataReader, "FirstName_EN");
            objItem.MiddleName_EN = SqlHelper.GetString(dataReader, "MiddleName_EN");
            objItem.LastName_EN   = SqlHelper.GetString(dataReader, "LastName_EN");
            objItem.Work_Date     = SqlHelper.GetDateTime(dataReader, "Work_Date");
            objItem.ST_InTime     = SqlHelper.GetString(dataReader, "ST_InTime");
            objItem.ST_OutTime    = SqlHelper.GetString(dataReader, "ST_OutTime");
            objItem.InTime        = SqlHelper.GetString(dataReader, "InTime");
            objItem.OutTime       = SqlHelper.GetString(dataReader, "OutTime");
            objItem.DirectManager = SqlHelper.GetInt(dataReader, "DirectManager");
            objItem.DomainId      = SqlHelper.GetString(dataReader, "DomainId");
            return(objItem);
        }
Пример #2
0
        public static MissingScanTimeCollection GetMissingScanTime(MissCanTimePara objPara)
        {
            var pars = new SqlParameter[]
            {
                new SqlParameter("@EmployeeCode", objPara.EmployeeCode),
                new SqlParameter("@StartDate", objPara.StartDate),
                new SqlParameter("@EndDate", objPara.EndDate),
                new SqlParameter("@EntityID", objPara.EntityID),
            };

            MissingScanTimeCollection collection = new MissingScanTimeCollection();

            using (var reader = SqlHelper.ExecuteReaderService(ModuleConfig.MyConnection, "USP_TMS_NotFillScanTime_Report", pars))
            {
                MissingScanTime obj = new MissingScanTime();
                while (reader.Read())
                {
                    obj = BindScanTimeData(reader);
                    collection.Add(obj);
                }
            }
            return(collection);
        }