コード例 #1
0
ファイル: QDf.cs プロジェクト: phu26/ltudql1_2017_ck3_10
 private void QDf_Load(object sender, EventArgs e)
 {
     HSB.getSS();
     HSB.Load();
     HSB.TLSL();
     lbltoithieu.Text = HocSinhDTO.toithieu.ToString();
     lbltoida.Text    = HocSinhDTO.toida.ToString();
     lblsstoida.Text  = clasDTO.SS.ToString();
     lbldiemdat.Text  = CTMonHoc.DiemDat.ToString();
 }
コード例 #2
0
        private void updateD_Click(object sender, EventArgs e)
        {
            if (subjectoffstudentGrid.SelectedRows.Count > 0)
            {
                DataGridViewRow row  = dshsgrid.SelectedRows[0];
                string          mail = row.Cells[5].Value.ToString();
                HSB.GetMaHS(mail);
                HSB.getMon();
                DataGridViewRow row2 = subjectoffstudentGrid.SelectedRows[0];

                var    mon   = from ma in CTMonHoc.mh where ma.TenMon1 == row2.Cells[0].Value.ToString() select ma.MaMon1;
                string Mamh  = mon.FirstOrDefault().ToString();
                string d1    = txt15p.Text;
                string d2    = txt1t.Text;
                string d3    = txtck.Text;
                float  diem1 = float.Parse(d1);
                float  diem2 = float.Parse(d2);
                float  diem3 = float.Parse(d3);

                if ((diem1 <= 10 && diem1 >= 0) && (diem1 <= 10 && diem1 >= 0) && (diem1 <= 10 && diem1 >= 0))
                {
                    HSB.CapNhatDiem(HocSinhDTO.id, Mamh, diem1, diem2, diem3);
                    HSB.TLSL();
                    MessageBox.Show("update successfull");
                    dshsgrid_SelectionChanged(sender, e);
                }
                else
                {
                    MessageBox.Show("điểm môn không được lớn hơn 10 hoặc nhỏ hơn 0");
                }
            }
            else
            {
                MessageBox.Show("vui lòng chọn môn cần cập nhật");
            }
        }
コード例 #3
0
ファイル: MainGUI.cs プロジェクト: phu26/ltudql1_2017_ck3_10
        public void MainGUI_Load(object sender, EventArgs e)
        {
            HSB.TLSL();
            HSB.Loadkl();
            HSB.AVG();

            List <string> l = new List <string>();

            foreach (var s in clasDTO.lop)
            {
                l.Add(s.TenL1);
            }
            dslopcbox.DataSource = l.ToList();

            if (UsserrDTO.u.Per != 0)
            {
                button14.Visible = true;
            }

            if (UsserrDTO.u.Per == 0)
            {
                pictureBox3.Visible = false;

                button1.Visible = false;
                button2.Visible = false;
                button3.Visible = false;
                button4.Visible = false;
                button5.Visible = false;
                button6.Visible = false;
                button7.Visible = false;
                button9.Visible = true;
                showinpanel(new DSclass());
            }
            else
            {
                if (UsserrDTO.u.Per == 1)
                {
                    pictureBox3.Visible = false;

                    button1.Visible  = false;
                    button2.Visible  = false;
                    button3.Visible  = false;
                    button4.Visible  = false;
                    button5.Visible  = false;
                    button6.Visible  = false;
                    button7.Visible  = false;
                    button8.Visible  = false;
                    button9.Visible  = false;
                    button10.Visible = true;
                }
                else
                {
                    if (UsserrDTO.u.Per == 2)
                    {
                        button1.Visible  = false;
                        button2.Visible  = false;
                        button3.Visible  = false;
                        button4.Visible  = false;
                        button5.Visible  = false;
                        button6.Visible  = false;
                        button7.Visible  = false;
                        button8.Visible  = false;
                        button9.Visible  = true;
                        button11.Visible = true;
                        button12.Visible = true;
                        button13.Visible = true;
                    }
                }
            }
        }