Exemplo n.º 1
0
        private void AddOrEdit(FieldViewModel vmField)
        {
            var win = new FieldDetailWindow(vmField);
            var rst = win.ShowDialog();

            if (rst != null && rst == true)
            {
                base.SearchCmd.Execute(null);
            }
        }
Exemplo n.º 2
0
        public static FieldViewModel Parse(DbField dbField)
        {
            if (dbField == null)
            {
                return(null);
            }
            FieldViewModel fvm = OOMapper.Map <DbField, FieldViewModel>(dbField,
                                                                        new DefaultMapConfig()
                                                                        .ConvertUsing <DbField, FieldViewModel>(f => new FieldViewModel
            {
                fieldname   = f.column_name,
                displayname = f.column_comment,
                fieldtype   = f.field_type,
                tbname      = f.table_name
            }));

            return(fvm);
        }