//函数
        #region 页面加载
        public FrmHisInOutStationHead()
        {
            InitializeComponent();

            label8.Text = HardwareName.Value(CorpsName.CodeSenderAddress) + ":";
            label4.Text = HardwareName.Value(CorpsName.StationSplace) + ":";
            label5.Text = HardwareName.Value(CorpsName.StaHeadSplace) + ":";

            dtEndTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            dtStartTime.Text = DateTime.Today.ToString();


            #region 加载部门, 工种, 证书, 职务, 职务等级 信息
            if (!lhsh.LoadInfo(treeInfo, cmbWorkType, cmbCerType, cmbDutyName, cmbDutyClass, 1))
            {
                    MessageBox.Show("对不起, 基本数据加载失败!");
                    return;
            }
            #endregion

            #region 加载分站信息
            lhab.LoadInfo(cmb_Station, cmb_StaHead, false);
            #endregion

            treeInfo.ExpandAll();
            treeInfo.SelectedNode = treeInfo.Nodes[0];

            cbPSize.SelectedIndex = 0;

            // 加载设备类型,生产厂家
            DeptBLL deptbll = new DeptBLL();
            deptbll.getEquTYpeCmb(cmbEquType);             // 设备类型
            deptbll.getEquFactoryCmb(cmbFactory);          // 生产厂家
        }
Example #2
0
        public FrmHisInOutMine()
        {
            InitializeComponent();

            dtEndTime.Text =  DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            dtStartTime.Text = DateTime.Today.ToString("yyyy-MM-dd HH:mm:ss");
            #region 加载部门, 工种, 证书, 职务, 职务等级 信息
            if (!lhmb.LoadInfo(treeInfo, cmbWorkType, null, cmbDutyName, null, 1))
            {
                MessageBox.Show("对不起, 基本数据加载失败!");
                return;
            }
            #endregion

            treeInfo.ExpandAll();
            treeInfo.SelectedNode = treeInfo.Nodes[0];

            // 加载设备类型,生产厂家
            DeptBLL deptbll = new DeptBLL();
            deptbll.getEquTYpeCmb(cmbEquType);             // 设备类型
            deptbll.getEquFactoryCmb(cmbFactory);          // 生产厂家

            label8.Text = HardwareName.Value(CorpsName.CodeSenderAddress) + ":";
            dgValue.Columns[0].HeaderText = HardwareName.Value(CorpsName.CodeSenderAddress);
            this.SelectInfo();
        }
        // 加载下拉菜单信息
        private void LoadCmb()
        {
            DeptBLL deptbll = new DeptBLL();

            deptbll.getDutyNameCmb(cmbDutyName);    // 职务名称
            deptbll.getWorkTypeCmb(cmbWorkType);    // 工种
            deptbll.getCerTypeCmb(cmbCerType);      // 证书类别

            deptbll.getEquTYpeCmb(cmbEquType);      // 设备类型
            deptbll.getEquFactoryCmb(cmb);          // 生产厂家
        }