Exemple #1
0
        private void RefreshDevCfg()
        {
            MesDBAccess.BLL.BatteryCataBll batCataBll = new MesDBAccess.BLL.BatteryCataBll();
            List <string> batCatas = GetBatteryCataList();

            this.comboBox4.Items.Clear();
            if (batCatas.Count > 0)
            {
                this.comboBox4.Items.AddRange(batCatas.ToArray());
            }

            if (this.comboBox4.Items.Count > 0)
            {
                this.comboBox4.SelectedIndex = 0;
            }
            MesDBAccess.BLL.ViewDevLineBatteryCfgBll devLineCfgBll = new MesDBAccess.BLL.ViewDevLineBatteryCfgBll();
            string strWhere = "";

            if (comboBox3.Text != "所有")
            {
                strWhere = string.Format("ShopSection='{0}' ", comboBox3.Text);
            }
            DataSet ds = devLineCfgBll.GetList(strWhere);

            this.dataGridView2.DataSource = ds.Tables[0];
            this.dataGridView2.Columns["DevBatteryCfgID"].HeaderText = "产线配置ID";
            this.dataGridView2.Columns["ShopSection"].HeaderText     = "工段名称";
            this.dataGridView2.Columns["LineID"].HeaderText          = "产线序号";
            this.dataGridView2.Columns["mark"].HeaderText            = "描述";
            this.dataGridView2.Columns["batteryCataCode"].HeaderText = "电芯型号";
            this.dataGridView2.Columns["palletCataID"].HeaderText    = "料筐型号";
            this.dataGridView2.Columns["plcDefVal"].HeaderText       = "PLC值";
            this.dataGridView2.AutoSizeRowsMode    = DataGridViewAutoSizeRowsMode.AllCells;
            this.dataGridView2.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
        }