Пример #1
0
        public SemForm(MainForm p, string id)
        {
            try
            {
                data        = new ListSem();
                CONNECT     = new Connect();
                this.UserID = id;
                this.parent = p;

                InitializeComponent();

                int style = NativeWinAPI.GetWindowLong(this.Handle, NativeWinAPI.GWL_EXSTYLE);
                style |= NativeWinAPI.WS_EX_COMPOSITED;
                NativeWinAPI.SetWindowLong(this.Handle, NativeWinAPI.GWL_EXSTYLE, style);

                data.Read(UserID);
                data.ShowSemToGridView(dtgvSem);
                lSum.Text  = "Số tín chỉ: " + data.SumOfCre.ToString();
                lAver.Text = "Điểm TB: " + data.Average.ToString();

                bMod.Visible = bDel.Visible = false;
                data.SEMESTERS.Clear();

                SetColor(Properties.Settings.Default.Color);
            }
            catch (Exception err)
            {
                MessageBox.Show("Đã xảy ra lỗi, vui lòng liên hệ đội ngũ phát triển!");
                ReportError rp = new ReportError(this, err);
                rp.Show();
            }
        }
        public ScoreStatistics(MainForm p, string id, string name)
        {
            try
            {
                data            = new ListSem();
                CONNECT         = new Connect();
                this.UserID     = id;
                this.parent1    = p;
                this.sNameOfSem = name;
                InitializeComponent();
                int style = NativeWinAPI.GetWindowLong(this.Handle, NativeWinAPI.GWL_EXSTYLE);
                style |= NativeWinAPI.WS_EX_COMPOSITED;
                NativeWinAPI.SetWindowLong(this.Handle, NativeWinAPI.GWL_EXSTYLE, style);

                data.Read(UserID);
                SetColor(Properties.Settings.Default.Color);
                CreateChart();

                parent = "mainform";
                //var canvas = new Bunifu.DataViz.Canvas();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Đã xảy ra lỗi, vui lòng liên hệ đội ngũ phát triển!");
                ReportError rp = new ReportError(this, ex);
                rp.Show();
            }
        }
        public ScoreStatistics(SemForm p, string id)
        {
            try
            {
                data         = new ListSem();
                CONNECT      = new Connect();
                this.UserID  = id;
                this.parent2 = p;
                InitializeComponent();

                data.Read(UserID);
                SetColor(Properties.Settings.Default.Color);
                parent = "semform";

                CreateChartOfSemesters();
                //var canvas = new Bunifu.DataViz.Canvas();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Đã xảy ra lỗi, vui lòng liên hệ đội ngũ phát triển!");
                ReportError rp = new ReportError(this, ex);
                rp.Show();
            }
        }