Example #1
0
        public string GetAllConfigType()
        {
            //班次类别
            string[] TsEmShift = sM_CONFIG_KEYBO.GetConfigKey("TsEmShift").sValue.Split(',');
            //加班类型
            string[] TsEmWorkoverType = sM_CONFIG_KEYBO.GetConfigKey("TsEmWorkoverType").sValue.Split(',');
            //请假类型
            string[] TsEmLeaveType = sM_CONFIG_KEYBO.GetConfigKey("TsEmLeaveType").sValue.Split(',');
            //调休类型
            string[] TsEmShiftLeaveType = sM_CONFIG_KEYBO.GetConfigKey("TsEmShiftLeaveType").sValue.Split(',');
            //迟到类型
            string[] TsEmToBeLateType = sM_CONFIG_KEYBO.GetConfigKey("TsEmToBeLateType").sValue.Split(',');
            //旷工类型
            string[] TsEmAbsenteeism = sM_CONFIG_KEYBO.GetConfigKey("TsEmAbsenteeism").sValue.Split(',');
            tempType typeList        = new tempType();

            foreach (var item in TsEmShift)
            {
                typevalue tempvalue = new typevalue();
                tempvalue.value = item;
                tempvalue.label = item;
                typeList.teamShiftList.Add(tempvalue);
            }
            typeList.teamShiftList      = this.configType(TsEmShift);
            typeList.overWorkList       = this.configType(TsEmWorkoverType);
            typeList.leaveWorkList      = this.configType(TsEmLeaveType);
            typeList.shiftLeaveWorkList = this.configType(TsEmShiftLeaveType);
            typeList.beLateWorkList     = this.configType(TsEmToBeLateType);
            typeList.absenteeismWork    = this.configType(TsEmAbsenteeism);
            //IList<tempType> list = new List<tempType>();
            //list.Add(typeList);
            return(JsonConvert.SerializeObject(typeList));
        }
Example #2
0
        /// <summary>
        /// 创建类别List,方便前台显示
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public IList <typevalue> configType(string[] param)
        {
            IList <typevalue> _temp = new List <typevalue>();

            foreach (var item in param)
            {
                typevalue _tempvalue = new typevalue();
                _tempvalue.value = item;
                _tempvalue.label = item;
                _temp.Add(_tempvalue);
            }
            return(_temp);
        }