• C#从入门到放弃--下拉清单List<Model>添加行数据


      Combox的下拉框填充值有两种方式获取,一为后台将值传到List<Model>里,这种情况值是可变的;二为直接写死,在List<Model>里添加数据,这里提供第二种方式下行数据的添加方式。

    TransTypeList = new ObservableCollection<TransTypeModel>
                    {
                        new TransTypeModel { PARAM_CODE = "创建", PARAM_ALIAS = "创建" },
                        new TransTypeModel { PARAM_CODE = "领用", PARAM_ALIAS = "领用" },
                        new TransTypeModel { PARAM_CODE = "上机", PARAM_ALIAS = "上机" },
                        new TransTypeModel { PARAM_CODE = "下机", PARAM_ALIAS = "下机" },
                        new TransTypeModel { PARAM_CODE = "退回", PARAM_ALIAS = "退回" },
                        new TransTypeModel { PARAM_CODE = "维修", PARAM_ALIAS = "维修" },
                        new TransTypeModel { PARAM_CODE = "报废", PARAM_ALIAS = "报废" }
                    };
    this.vm.TransTypeList.Insert(0, new TransTypeModel { PARAM_CODE = "", PARAM_ALIAS = "请选择事务类型" });
    SelectTransTypeModel = this.vm.TransTypeList.FirstOrDefault();
  • 相关阅读:
    theme-windowAnimationStyle 动画设置
    Perl中的正则表达式
    repo sync下载脚本
    Virtual Box创建共享目录
    ubuntu下安装jdk
    adb logcat 命令
    如何提高上传带宽
    Ubuntu安装dos2unix工具
    Android打Path的方法
    Ubuntu快捷键
  • 原文地址:https://www.cnblogs.com/xuhp/p/9842230.html
Copyright © 2020-2023  润新知