Beispiel #1
0
        public static void BindCombox(ComboBox cb)
        {
            StudentSystemConfig config = StaticCacheManager.GetConfig <StudentSystemConfig>();

            string[] array = subjects2;
            if (config.SubjectIs4)
            {
                array = subjects1;
            }
            foreach (string str in array)
            {
                cb.Items.Add(str);
            }
        }
Beispiel #2
0
        public InitButtonPanel()
        {
            InitializeComponent();

            StudentSystemConfig config = StaticCacheManager.GetConfig <StudentSystemConfig>();

            if (config.SubjectIs4)
            {
                this.btnSubject2.Visible  = false;
                this.btnSubject20.Visible = true;
                this.btnSubject21.Visible = true;
                this.btnSubject20.Click  += new EventHandler(StudentHelper.subject20_Click);
                this.btnSubject21.Click  += new EventHandler(StudentHelper.subject21_Click);
            }
            else
            {
                this.btnSubject2.Visible  = true;
                this.btnSubject2.Click   += new EventHandler(StudentHelper.subject2_Click);
                this.btnSubject20.Visible = false;
                this.btnSubject21.Visible = false;
            }
            this.btnSubject1.Click += new EventHandler(StudentHelper.subject1_Click);
            this.btnSubject3.Click += new EventHandler(StudentHelper.subject3_Click);

            this.btnChangePwd.Click  += new EventHandler(btnChangePwd_Click);
            this.btnExitSystem.Click += new EventHandler(btnExitSystem_Click);
            this.btnLockSystem.Click += new EventHandler(btnLockSystem_Click);

            this.btnReg.Click    += new EventHandler(btnReg_Click);
            this.btnPhoto.Click  += new EventHandler(btnPhoto_Click);
            this.btnUpdate.Click += new EventHandler(btnUpdate_Click);
            this.btnFee.Click    += new EventHandler(btnFee_Click);

            this.btnApplyF6.Click += new EventHandler(StudentHelper.F6_Click);
            this.btnApplyF7.Click += new EventHandler(StudentHelper.F7_Click);

            this.btnExamHint.Click += new EventHandler(btnExamHint_Click);

            this.btnPrintF2.Click += new EventHandler(StudentHelper.F2_Click);
            this.btnPrintF3.Click += new EventHandler(StudentHelper.F3_Click);
            this.btnPrintF4.Click += new EventHandler(StudentHelper.F4_Click);
            this.btnPrintF5.Click += new EventHandler(StudentHelper.F5_Click);
        }
Beispiel #3
0
        private void cbSubject_TextChanged(object sender, EventArgs e)
        {
            string subject = this.cbSubject.Text.Trim();

            if (subject.Length > 0)
            {
                StudentSystemConfig config = StaticCacheManager.GetConfig <StudentSystemConfig>();
                string      sqlformat      = "SELECT a.c_hmhp, b.c_name, b.c_sex, b.c_idcard, b.c_examid,b.c_state,b.date_lastexam FROM table_students AS b LEFT JOIN table_coach AS a ON b.i_coachid=a.id WHERE b.c_state = '{0}' And {1}";
                string      sql            = string.Empty;
                IDataAccess access         = FT.DAL.DataAccessFactory.GetDataAccess();
                string      tmp1           = string.Empty;
                string      tmp2           = string.Empty;
                string      tmp3           = string.Empty;
                string      tmp4           = string.Empty;
                string      tmp            = string.Empty;
                if (subject.StartsWith("科目一"))
                {
                    tmp1 = "初始报名";
                    tmp2 = access.LowerEqualDateString("b.date_baoming", System.DateTime.Now.AddDays(0 - config.RegToSubject1));
                    tmp3 = "科目一不合格";
                    tmp4 = access.LowerEqualDateString("b.date_lastexam", System.DateTime.Now.AddDays(0 - config.Subject1ReExam));
                }
                else if (subject.StartsWith("科目二"))
                {
                    if (!config.SubjectIs4)
                    {
                        tmp1 = "科目一合格";
                        tmp2 = access.LowerEqualDateString("b.date_lastexam", System.DateTime.Now.AddDays(0 - config.Subject1To20Days));
                        tmp3 = "科目二不合格";
                        tmp4 = access.LowerEqualDateString("b.date_lastexam", System.DateTime.Now.AddDays(0 - config.Subject20ReExam));
                    }
                    else if (subject.IndexOf("桩") != -1)
                    {
                        tmp1 = "科目一合格";
                        tmp2 = access.LowerEqualDateString("b.date_lastexam", System.DateTime.Now.AddDays(0 - config.Subject1To20Days));
                        tmp3 = "科目二(桩)不合格";
                        tmp4 = access.LowerEqualDateString("b.date_lastexam", System.DateTime.Now.AddDays(0 - config.Subject20ReExam));
                    }
                    else//场内
                    {
                        tmp1 = "科目二(桩)合格";
                        tmp2 = access.LowerEqualDateString("b.date_lastexam", System.DateTime.Now.AddDays(0 - config.Subject20To21Days));
                        tmp3 = "科目二(场地)不合格";
                        tmp4 = access.LowerEqualDateString("b.date_lastexam", System.DateTime.Now.AddDays(0 - config.Subject21ReExam));
                    }
                }

                else
                {
                    if (!config.SubjectIs4)
                    {
                        tmp = "科目二";
                    }
                    else
                    {
                        tmp = "科目二(场地)";
                    }
                    tmp1 = tmp + "合格";

                    tmp2 = access.LowerEqualDateString("b.date_lastexam", System.DateTime.Now.AddDays(0 - config.Subject21To3Days));
                    tmp3 = "科目三不合格";
                    tmp4 = access.LowerEqualDateString("b.date_lastexam", System.DateTime.Now.AddDays(0 - config.Subject3ReExam));
                }

                sql = string.Format(sqlformat, new string[] { tmp1, tmp2 });
                Console.WriteLine(sql);
                DataTable dt = access.SelectDataTable(sql, "test");
                sql = string.Format(sqlformat, new string[] { tmp3, tmp4 });
                Console.WriteLine(sql);
                DataTable dt2 = access.SelectDataTable(sql, "test");
                if (dt != null && dt2 != null)
                {
                    dt.Merge(dt2);
                }
                if (dt != null && dt.Rows.Count > 0)
                {
                    this.dataGridView1.Rows.Clear();
                    foreach (DataRow dr in dt.Rows)
                    {
                        this.dataGridView1.Rows.Add(new object[] { dr[0], dr[1], dr[2], dr[3], dr[4], dr[5], dr[6] });
                    }
                    this.lbCount.Text = "共" + dt.Rows.Count + "条记录";
                }
                else
                {
                    this.dataGridView1.Rows.Clear();
                    this.lbCount.Text = "共0条记录";
                }
            }
        }
Beispiel #4
0
        public override void EmmitMenu()
        {
            ToolStripMenuItem top = this.AddToMenu("驾驶人预录入(&S)");
            ToolStripMenuItem tmp = this.BuildSubMenu("初始报名", typeof(StudentBrowser));

            top.DropDownItems.Add(tmp);
            tmp = this.BuildSubMenu("照片采集", typeof(DriverPicCapture));
            top.DropDownItems.Add(tmp);
            tmp = this.BuildSubMenu("学员缴费", typeof(StudentFeeBrowser));
            top.DropDownItems.Add(tmp);
            tmp = this.BuildSubMenu("学员修改", typeof(UpdateForm));
            top.DropDownItems.Add(tmp);

            tmp = this.BuildSubMenu("学员列表", typeof(StudentSearch));
            top.DropDownItems.Add(tmp);

            this.AddSeparatorToMenu(top);

            tmp        = this.BuildTopMenu("直接打机动车驾驶证申请表");
            tmp.Click += new EventHandler(StudentHelper.F7_Click);
            top.DropDownItems.Add(tmp);
            tmp        = this.BuildTopMenu("套打-机动车驾驶证申请表");
            tmp.Click += new EventHandler(StudentHelper.F6_Click);
            top.DropDownItems.Add(tmp);
            tmp        = this.BuildTopMenu("套打-机动车驾驶培训记录");
            tmp.Click += new EventHandler(StudentHelper.F2_Click);
            top.DropDownItems.Add(tmp);
            tmp        = this.BuildTopMenu("套打-机动车驾驶人身体条件证明");
            tmp.Click += new EventHandler(StudentHelper.F3_Click);
            top.DropDownItems.Add(tmp);
            tmp        = this.BuildTopMenu("套打-机动车驾驶员培训学员登记表");
            tmp.Click += new EventHandler(StudentHelper.F4_Click);
            top.DropDownItems.Add(tmp);
            tmp        = this.BuildTopMenu("套打-科目三考试成绩表");
            tmp.Click += new EventHandler(StudentHelper.F5_Click);
            top.DropDownItems.Add(tmp);

            this.AddSeparatorToMenu(top);


            tmp        = this.BuildTopMenu("科目一成绩录入");
            tmp.Click += new EventHandler(StudentHelper.subject1_Click);
            top.DropDownItems.Add(tmp);

            StudentSystemConfig config = StaticCacheManager.GetConfig <StudentSystemConfig>();

            if (config.SubjectIs4)
            {
                tmp        = this.BuildTopMenu("科目二(桩)成绩录入");
                tmp.Click += new EventHandler(StudentHelper.subject20_Click);
                top.DropDownItems.Add(tmp);

                tmp        = this.BuildTopMenu("科目二(场地)成绩录入");
                tmp.Click += new EventHandler(StudentHelper.subject21_Click);
                top.DropDownItems.Add(tmp);
            }
            else
            {
                tmp        = this.BuildTopMenu("科目二成绩录入");
                tmp.Click += new EventHandler(StudentHelper.subject2_Click);
                top.DropDownItems.Add(tmp);
            }
            tmp        = this.BuildTopMenu("科目三成绩录入");
            tmp.Click += new EventHandler(StudentHelper.subject3_Click);
            top.DropDownItems.Add(tmp);

            this.AddSeparatorToMenu(top);
            tmp = this.BuildSubMenu("退学", typeof(QuitForm));
            top.DropDownItems.Add(tmp);
            this.AddSeparatorToMenu(top);

            tmp = this.BuildSubMenu("照片采集配置", typeof(CapturePhotoSetting));
            top.DropDownItems.Add(tmp);

            tmp = this.BuildSubMenu("操作快捷界面", typeof(InitButtonPanel));
            top.DropDownItems.Add(tmp);
        }