Exemplo n.º 1
0
        public void BindToMTKanjouKamkouComboBoxWithKamokuCodeCaption(MTComboBox combo, int parentId)
        {
            var self = this;

            combo.SelectedIndexChanged += delegate(object sender, EventArgs arg) {
                models.db.Row kamokuRow = (combo.bindedTable as models.db.mtables.MTKanjouKamoku).GetRowFromCodeCache(parentId, combo.SelectedKeyAsStr);
                self.ClearRows();
                self.Text = "";
                if (kamokuRow != null)
                {
                    self.InitRowsWithMTKanjouKamokuWithKamokuCodeCaption((combo.bindedTable.OwnerDB as models.db.KaikeiDatabase).MTKanjouKamoku, (int)kamokuRow.GetLong("id", 0), "kamoku_code", 2);
                }
            };
        }
Exemplo n.º 2
0
        public void BindToMTKamkouComboBoxReverse(MTComboBox combo)
        {
            var self = this;

            combo.SelectedIndexChanged += delegate(object sender, EventArgs arg) {
                models.db.Row kamokuRow = (combo.bindedTable as models.db.mtables.MTKamoku).GetRowFromCodeCache(combo.SelectedKeyAsStr);
                self.ClearRows();
                self.Text = "";
                self.OnSelectedIndexChanged(null);
                if (kamokuRow != null)
                {
                    self.InitRowsWithMTHojoKamokuReverse((combo.bindedTable.OwnerDB as models.db.KaikeiDatabase).MTHojoKamoku, (int)kamokuRow.GetLong("id", 0));
                }
            };
        }