private void FrmStudentRankList_Load(object sender, EventArgs e) { LinkListFullInfo temp = new LinkListFullInfo(); //F = temp.loadfullInfo(F); F = temp.setStGioi(F); F = F.MergeSort(F); L = temp.setStKha(L); L = L.MergeSort(L); datas = F.change(F); datas1 = L.change(L); datas.AddRange(datas1); foreach (string s in datas) { textBox1.Text = string.Join(Environment.NewLine, datas); } using (StreamWriter sw = new StreamWriter("Danhsachhocsinhkhagioi.txt")) { foreach (string s in datas) { sw.WriteLine(s); } } }
private void FrmStudentFail_Load(object sender, EventArgs e) { LinkListFullInfo temp = new LinkListFullInfo(); //F = temp.loadfullInfo(F); F = temp.setStTruot(F); F = F.MergeSortFail(F); datas = F.change(F); foreach (string s in datas) { textBox1.Text = string.Join(Environment.NewLine, datas); } using (StreamWriter sw = new StreamWriter("Danhsachhocsinhtruot.txt")) { foreach (string s in datas) { sw.WriteLine(s); } } btnFileout.Enabled = true; }
private void BtnShow_Click(object sender, EventArgs e) { int type = Convert.ToInt32(textBox2.Text); LinkListFullInfo p = new LinkListFullInfo(); F = p.loadfullInfo(F); count1 = p.total(F, type); count2 = p.count(F, type); percent1 = Math.Round(percent1, 2); percent2 = 100 - percent1; percent2 = Math.Round(percent2, 2); label6.Text = count1.ToString(); label12.Text = count2.ToString(); string out1 = String.Format("{0:0.00}", percent1); string out2 = String.Format("{0:0.00}", percent2); label11.Text = out1 + "%"; label10.Text = out2 + "%"; int result = count1 - count2; label9.Text = result.ToString(); F = null; F = p.loadStudentType(F, type); datas = p.change(F); foreach (string s in datas) { textBox1.Text = string.Join(Environment.NewLine, datas); } using (StreamWriter sw = new StreamWriter("DanhSachTheoDoituongDuThi.txt")) { foreach (string s in datas) { sw.WriteLine(s); } } btnFileout.Enabled = true; }