コード例 #1
0
ファイル: Form1.cs プロジェクト: BestTheBest/3copyryght
 public Form1()
 {
     InitializeComponent();
     f = new cl(this);
     comboBox4.SelectedIndex = 4;
     list.Sort();
 }
コード例 #2
0
        public void get()
        {
            f.dataGridView1.RowCount = list.Count + 1;
            for (int i = 0; i < list.Count; i++)
            {
                cl obj1 = list[i];

                f.dataGridView1.Rows[i].Cells[0].Value = obj1.getpri();
                f.dataGridView1.Rows[i].Cells[1].Value = obj1.getima();
                f.dataGridView1.Rows[i].Cells[2].Value = obj1.getpob();
                f.dataGridView1.Rows[i].Cells[3].Value = obj1.getpos();
            }
        }
コード例 #3
0
        public void set()
        {
            cl obj = new cl();

            obj.setpas(f.textBox1.Text);
            obj.setpri(f.textBox2.Text);
            obj.setima(f.textBox3.Text);
            obj.setpob(f.textBox4.Text);
            obj.setpos(f.comboBox4.Text);
            obj.setzar(Convert.ToDouble(f.textBox6.Text));
            obj.setrez(f.textBox7.Text);
            obj.setskarg(f.textBox8.Text);
            list.Add(obj);
        }
コード例 #4
0
        public void get3()
        {
            f.dataGridView3.RowCount = list.Count + 1;
            for (int i = 0; i < list.Count; i++)
            {
                cl obj1 = list[i];

                f.dataGridView3.Rows[i].Cells[0].Value = obj1.getpri();
                f.dataGridView3.Rows[i].Cells[1].Value = obj1.getima();
                f.dataGridView3.Rows[i].Cells[2].Value = obj1.getpob();
                f.dataGridView3.Rows[i].Cells[3].Value = obj1.getzar();
                f.dataGridView3.Rows[i].Cells[4].Value = obj1.getzar() * 0.1;
                f.dataGridView3.Rows[i].Cells[5].Value = obj1.getzar() * 1.1;
            }
        }
コード例 #5
0
 public void get252()
 {
     f.dataGridView2.RowCount = list.Count + e;
     for (int i = 0; i < list.Count; i++)
     {
         cl obj1 = list[i];
         if (obj1.getpos().Contains(f.textBox9.Text))
         {
             f.dataGridView2.Rows[e].Cells[0].Value = obj1.getpri();
             f.dataGridView2.Rows[e].Cells[1].Value = obj1.getima();
             f.dataGridView2.Rows[e].Cells[2].Value = obj1.getpob();
             f.dataGridView2.Rows[e].Cells[3].Value = obj1.getpas();
             f.dataGridView2.Rows[e].Cells[4].Value = obj1.getpos();
             f.textBox12.Text = obj1.getrez();
             f.textBox5.Text  = obj1.getskarg();
             e = e + 1;
         }
     }
 }
コード例 #6
0
        public void get25()
        {
            f.dataGridView2.RowCount = list.Count + e;
            for (int i = 0; i < list.Count; i++)
            {
                cl obj1 = list[i];

                if (f.comboBox1.SelectedItem.ToString() == obj1.getpos())
                {
                    f.dataGridView2.Rows[e].Cells[0].Value = obj1.getpri();
                    f.dataGridView2.Rows[e].Cells[1].Value = obj1.getima();
                    f.dataGridView2.Rows[e].Cells[2].Value = obj1.getpob();
                    f.dataGridView2.Rows[e].Cells[3].Value = obj1.getpas();
                    f.dataGridView2.Rows[e].Cells[4].Value = obj1.getpos();
                    f.textBox12.Text = obj1.getrez();
                    f.textBox5.Text  = obj1.getskarg();
                    e = e + 1;
                }
            }
        }
コード例 #7
0
        public void get41()
        {
            f.comboBox1.Items.Clear();
            f.comboBox1.BeginUpdate();

            for (int i = 0; i < list.Count; i++)
            {
                int r    = 0;
                cl  obj1 = list[i];

                if (i == 0)
                {
                    f.comboBox1.Items.Add(obj1.getpri().ToString());
                }
                if (i > 0)
                {
                    for (int k = 0; k < i; k++)
                    {
                        cl obj2 = list[k];
                        if (obj2.getpri().ToString() != obj1.getpri().ToString())
                        {
                            r = 1;
                        }
                        else
                        {
                            r = 0; k = i;
                        }
                    }
                    if (r == 1)
                    {
                        f.comboBox1.Items.Add(obj1.getpri().ToString());
                    }
                }
            }
            f.comboBox1.EndUpdate();
        }