Пример #1
0
        private void NewDeviceForm_Load(object sender, EventArgs e)
        {
            LoadLanguage("");

            this.txb_addr_part1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(new Smart.ToolUtil.StringControlUtil().NumTextKeyPress);
            this.txb_addr_part2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(new Smart.ToolUtil.StringControlUtil().NumTextKeyPress);
            this.txb_addr_part3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(new Smart.ToolUtil.StringControlUtil().NumTextKeyPress);
            this.txb_addr_part4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(new Smart.ToolUtil.StringControlUtil().NumTextKeyPress);


            DAL.DAL_Device   devicedal   = new DAL.DAL_Device();
            DAL.DAL_Position positiondal = new DAL.DAL_Position();

            DataTable _dt = devicedal.GetDeviceTypeList();

            if (_dt != null)
            {
                cmb_DeviceType.Items.Clear();

                foreach (DataRow _row in _dt.Rows)
                {
                    cmb_DeviceType.Items.Add(_row[0]);
                }
            }
            _dt = positiondal.selectPositionListInfo("");
            if (_dt != null)
            {
                cmb_DevicePosition.Items.Clear();

                foreach (DataRow _row in _dt.Rows)
                {
                    cmb_DevicePosition.Items.Add(_row[1]);
                }
            }
        }