zoukankan      html  css  js  c++  java
  • MyOffice(经理评分)

      public FrmShow()
            {
                InitializeComponent();
                this.Init();//初始化员工信息
                this.UpdateView();//将员工信息绑定到listView1上
            }

    //准备一个容器,可以容纳3个员工对象
            SE[] engineers = new SE[3];
          /// <summary>
           /// 初始化员工信息
          /// </summary>
            public void Init()
            {
                SE a = new SE();
                a.Id = 111;
                a.Name = "王小毛";
                a.Age = 26;
                a.Ping = "未评价";
                a.Fen = "0";
                engineers[0] = a;

                SE b = new SE();
                b.Id = 112;
                b.Name = "周新雨";
                b.Age = 22;
                b.Ping = "未评价";
                b.Fen = "0";
                engineers[1] = b;

                SE c= new SE();
                c.Id = 112;
                c.Name = "张烨";
                c.Age = 30;
                c.Ping = "未评价";
                c.Fen = "0";
                engineers[2] = c;
              

            }
            /// <summary>
            /// 将员工信息绑定到listView1上
            /// </summary>
            public void UpdateView()
            {
                listView1.Items.Clear();
                for (int i = 0; i < engineers.Length; i++)
                {
                    //一个item就是一个员工对象
                    ListViewItem item = new ListViewItem(engineers[i].Id.ToString());
                    item.SubItems.Add(engineers[i].Name.ToString());
                    item.SubItems.Add(engineers[i].Age.ToString());
                    item.SubItems.Add(engineers[i].Ping.ToString());
                    item.SubItems.Add(engineers[i].Fen.ToString());

                    this.listView1.Items.Add(item);
                }
            }

     private void listView1_DoubleClick(object sender, EventArgs e)
            {
                ListViewItem selectItem = listView1.SelectedItems[0];
                FrmJudge frm = new FrmJudge();
                frm.selectItem = selectItem;
                frm.ShowDialog();
            }

     public ListViewItem selectItem = null;
            private void FrmJudge_Load(object sender, EventArgs e)
            {
                txtName.Text = selectItem.SubItems[1].Text;
                txtName.ReadOnly = true;
            }
              private void btnPing_Click(object sender, EventArgs e)
            {
                selectItem.SubItems[3].Text = rtxtPing.Text;
                selectItem.SubItems[4].Text = txtNian.Text;
                this.Close();

              
            }

  • 相关阅读:
    【arm】using as: GNU assember学习笔记
    【linux】gcc编译选项:-fomit-frame-pointer,-fno-tree-vectorize,-fno-strict-aliasing以及ARM相关选项
    【arm】armv8中通用寄存器的饱和指令实现(对标arm32:ssat,usat,qadd,qsub)
    【shell】常用的几种shell解释器:sh,bash,zsh,ash,csh
    【linux/Tools】Performance Profile Tools——perf and gprof
    【android】如何查看Android设备的CPU架构信息
    【arm】big-LITTLE architecture and How to check core, frequency, features of CPU and memory infos
    【python】创建excel文档.csv
    【mpeg4】MPEG-4 B帧帧间预测模式
    【linux】关于find命令查找的排序规则探索以及排序方法
  • 原文地址:https://www.cnblogs.com/aaaaliling/p/8710159.html
Copyright © 2011-2022 走看看