Beispiel #1
0
        private void BindControls()
        {
            dataGridView1.DataSource = null;
            dataGridView1.DataSource = this.MvProject.FeederTable;
            foreach (DataGridViewColumn column in dataGridView1.Columns)
            {
                column.Visible = false;
            }

            dataGridView1.Columns[2].Visible = !this.MvProject.IsShip;

            dataGridView1.Columns[4].Visible = true;
            dataGridView1.Columns[4].Width   = 150;
            dataGridView1.Columns[5].Visible = true;

            dataGridView1.Columns[2].DisplayIndex = 0;
            dataGridView1.Columns[4].DisplayIndex = 1;
            dataGridView1.Columns[5].DisplayIndex = 2;

            Util.CompositeBinder binder = new Util.CompositeBinder(this._singleLineFolder, "EMA", dataGridView3);

            Data.Mdb mdb = Data.MdbFactory.GetUniqueInstance;
            mdb.ShowCatergoty(comboBox1);
            mdb.ShowSubCatergory(comboBox1.Text, comboBox2);
        }
Beispiel #2
0
        public void BindFeederTypes()
        {
            if (dataGridView1.CurrentRow == null)
            {
                return;
            }

            if (this.MvProject.IsShip)
            {
                string feederType = dataGridView1.CurrentRow.Cells["FeederType"].Value.ToString();
                this._singleLineFolder = this.GetSingleLineFolder("", feederType);

                Util.CompositeBinder binder = new Util.CompositeBinder(this._singleLineFolder, "EMA", dataGridView3);

                return;
            }
            else
            {
                string       groupID = dataGridView1.CurrentRow.Cells[1].Value.ToString();
                DataRow[]    rows    = this.MvProject.GroupTable.Select("GroupID = '" + groupID + "'");
                Data.MvGroup group   = new Data.MvGroup(this.MvProject, rows[0]);

                string feederType = dataGridView1.CurrentRow.Cells["FeederType"].Value.ToString();
                this._singleLineFolder = this.GetSingleLineFolder(group.Rating, feederType);

                Util.CompositeBinder binder = new Util.CompositeBinder(this._singleLineFolder, "EMA", dataGridView3);
            }

            return;
        }