MyOffice(经理评分)

Posted aaaaliling

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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();

          
        }

































































以上是关于MyOffice(经理评分)的主要内容,如果未能解决你的问题,请参考以下文章

创建MyOffice项目

经理评分系统

小项目 经理评分系统 总结

项目经理评分

经理评分项目

经理评分课后小项目