示例#1
0
        private void PointBook_Load(object sender, EventArgs e)
        {
            var dc = new ClassSRMDataContext(Config.connection);

            GC.Collect();
            GC.WaitForPendingFinalizers();
            var tosifi = Config.ReadSetting("Tosifi System");

            if (tosifi == "true")
            {
                cmbScore2Visibility.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
                cmbScoreVisibility.Visibility  = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
            }
            else
            {
                cmbScore2Visibility.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
                cmbScoreVisibility.Visibility  = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
            }

            tblSchoolBindingSource.DataSource = dc.SelectSchool();
            cmbClass.ItemIndex = 0;


            if (isQuastion)
            {
                cmbBook.SelectedIndex = bookIndex;
                cmbClass.EditValue    = SchoolId;
                tblStudentBindingSource.DataSource = dc.SelectStudentByClassIdNoIMG((int)cmbClass.EditValue);
                cmbStudent.EditValue = StudentId;
            }
        }
示例#2
0
        private void Process_Load(object sender, EventArgs e)
        {
            var dc = new ClassSRMDataContext(Config.connection);

            tblSchoolBindingSource.DataSource = dc.SelectSchool();
            cmbClass.ItemIndex = 0;
        }
示例#3
0
文件: Form1.cs 项目: esafb52/ClassSRM
        private void btnSchoolList_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var dc = new ClassSRMDataContext(Config.connection);

            new Schoollist().ShowDialog();
            tblSchoolBindingSource.DataSource = dc.SelectSchool();
        }
示例#4
0
        private void PointActivityList_Load(object sender, EventArgs e)
        {
            var dc = new ClassSRMDataContext(Config.connection);

            tblSchoolBindingSource.DataSource = dc.SelectSchool();
            cmbClass.ItemIndex = 0;
            EditableProgressBar();
        }
示例#5
0
        private void frmLetterAll_Load(object sender, EventArgs e)
        {
            var dc = new ClassSRMDataContext(Config.connection);

            tblSchoolBindingSource.DataSource = dc.SelectSchool();
            cmbClass.ItemIndex = 0;
            txtDate.EditValue  = DateTime.Now;
        }
示例#6
0
        private void Ask_Load(object sender, EventArgs e)
        {
            GC.Collect();
            GC.WaitForPendingFinalizers();
            var dc = new ClassSRMDataContext(Config.connection);

            tblSchoolBindingSource.DataSource = dc.SelectSchool();
            cmbClass.ItemIndex = 0;
        }
示例#7
0
文件: Form1.cs 项目: esafb52/ClassSRM
        private void Form1_Load(object sender, EventArgs e)
        {
            var dc = new ClassSRMDataContext(Config.connection);

            tblSchoolBindingSource.DataSource = dc.SelectSchool();
            cmbClass.ItemIndex = Convert.ToInt32(Config.ReadSetting("Default School"));
            EnableAnim();
            pCalendar.DateTime = DateTime.Now;
            initScheduler();
            txtDate1.DateTime = DateTime.Now;
        }
示例#8
0
        private void CompareBarChart_Load(object sender, EventArgs e)
        {
            try
            {
                var dc = new ClassSRMDataContext(Config.connection);

                tblSchoolBindingSource.DataSource = dc.SelectSchool();
            }
            catch (Exception)
            {
            }
        }
示例#9
0
        private void Gifts_Load(object sender, EventArgs e)
        {
            var dc = new ClassSRMDataContext(Config.connection);

            CreateCustomDate();
            try
            {
                tblSchoolBindingSource.DataSource = dc.SelectSchool();
                cmbClass.ItemIndex = 0;
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, "خطا", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#10
0
        private void TopStudent_Load(object sender, EventArgs e)
        {
            if (tabPane1.SelectedPage == tbMonth)
            {
                try
                {
                    var dc = new ClassSRMDataContext(Config.connection);

                    tblSchoolBindingSource.DataSource = dc.SelectSchool();
                    cmbClass.ItemIndex = 0;
                }
                catch (Exception)
                {
                }
            }
            txtDate.EditValue = DateTime.Now;
        }
示例#11
0
        private void PointActivity_Load(object sender, EventArgs e)
        {
            GC.Collect();
            GC.WaitForPendingFinalizers();
            var dc = new ClassSRMDataContext(Config.connection);

            getAllItemsName();
            if (Config.ReadSetting("ActivityPoint").Equals("Free"))
            {
                rd.SelectedIndex = 0;
            }
            else
            {
                rd.SelectedIndex = 1;
            }

            rd_SelectedIndexChanged(null, null);

            tblSchoolBindingSource.DataSource = dc.SelectSchool();
            cmbClass.ItemIndex = 0;
        }
示例#12
0
        private void AddStudent_Load(object sender, EventArgs e)
        {
            var dc = new ClassSRMDataContext(Config.connection);

            tblSchoolBindingSource.DataSource = dc.SelectSchool();
        }