Beispiel #1
0
        private void dgv_CurrentCellChanged(object sender, EventArgs e)
        {
            if (((XDatagrid)sender).CurrentCell == null)
            {
                return;
            }

            this.btnOK.Enabled  = true;
            this.selected_istab = (istab)((XDatagrid)sender).Rows[((XDatagrid)sender).CurrentCell.RowIndex].Cells["col_istab"].Value;
        }
Beispiel #2
0
        public static istabVM ToViewModel(this istab istab)
        {
            if (istab == null)
            {
                return(null);
            }

            istabVM i = new istabVM
            {
                id            = istab.id,
                tabtyp        = istab.tabtyp,
                typcod        = istab.typcod,
                abbreviate_en = istab.abbreviate_en,
                abbreviate_th = istab.abbreviate_th,
                typdes_en     = istab.typdes_en,
                typdes_th     = istab.typdes_th,
                istab         = istab
            };

            return(i);
        }