Ejemplo n.º 1
0
 void gv_DrivePlan_MouseUp(object sender, MouseEventArgs e)
 {
     if (gv_DrivePlan.FocusedColumn == gridColumn_Code)
     {
         bool result = new DrivePlanDao().BuildDriveCode(_current.DrivePlanID);
         if (result)
         {
             MsgBox.ShowInfo("学车码生成成功!");
             _listDriveplay          = new DrivePlanDao().GetListStudentId(_studentid);
             gc_DrivePlan.DataSource = null;
             gc_DrivePlan.DataSource = _listDriveplay;
             gc_DrivePlan.RefreshDataSource();
         }
     }
 }
Ejemplo n.º 2
0
        void tabcMain_SelectedPageChanged(object sender, LayoutTabPageChangedEventArgs e)
        {
            if (e.Page == tabAccept && !_isLoadAccept)
            {
                var list = new StudentAcceptDao().GetList_ID(Student.StudentID);
                gc_Accept.DataSource = list;
                gc_Accept.RefreshDataSource();
                _isLoadAccept = true;
            }
            else if (e.Page == tabAudit && !_isLoadAudit)
            {
                var list = new AuditItemDao().GetListByStuID(Student.StudentID);
                gc_Audit.DataSource = list;
                gc_Audit.RefreshDataSource();
                _isLoadAudit = true;
            }
            else if (e.Page == tabCharge && !_isLoadCharge)
            {
                var list = new StudentChargeDao().GetByStudentList(Student.StudentID);
                gc_Charge.DataSource = list;
                gc_Charge.RefreshDataSource();

                var itemList = new StudentChargeItemDao().GetListByStudentID(Student.StudentID);
                gc_Charge_item.DataSource = itemList;
                gc_Charge_item.RefreshDataSource();
                _isLoadCharge = true;
            }
            else if (e.Page == tabScore && !_isLoadScore)
            {
                var list = new StudentScoreDao().GetListByStuID(Student.StudentID);
                gc_Score.DataSource = list;
                gc_Score.RefreshDataSource();
                _isLoadScore = true;
            }
            else if (e.Page == tabTrainHour && !_isLoadTrainHour)
            {
                var _list = new StudentSummaryDao().GetModel(Student.StudentID);
                if (_list == null)
                {
                    return;
                }
                textEdit1.Text = string.IsNullOrEmpty(ValueConvert.ToString(_list.Subject1ExamPassTime)) ? "" : ValueConvert.ToDateTime(_list.Subject1ExamPassTime).ToString("yyyy-MM-dd");
                textEdit2.Text = string.IsNullOrEmpty(ValueConvert.ToString(_list.Subject2ExamPassTime)) ? "" : ValueConvert.ToDateTime(_list.Subject2ExamPassTime).ToString("yyyy-MM-dd");
                textEdit3.Text = string.IsNullOrEmpty(ValueConvert.ToString(_list.Subject3ExamPassTime)) ? "" : ValueConvert.ToDateTime(_list.Subject3ExamPassTime).ToString("yyyy-MM-dd");
                textEdit4.Text = string.IsNullOrEmpty(ValueConvert.ToString(_list.Subject4ExamPassTime)) ? "" : ValueConvert.ToDateTime(_list.Subject4ExamPassTime).ToString("yyyy-MM-dd");

                var list = new StudentProgressSumDao().GetListByStudentID(Student.StudentID);
                gc_TrainHour.DataSource = list;
                gc_TrainHour.RefreshDataSource();
                _isLoadTrainHour = true;
            }
            else if (e.Page == tabTrain && !_isLoadTrain)
            {
                var list = new StudentDistDao().GetList(Student.StudentID);
                gcStudentDist.DataSource = list;
                gcStudentDist.RefreshDataSource();
                _isLoadTrain = true;

                var _list = new StudentTrainDao().GetListByStudentID(Student.StudentID);
                gc_Train.DataSource = _list;
                gc_Train.RefreshDataSource();
            }
            else if (e.Page == TabPreExam && !_isLoadPreExam)
            {
                var list = new StudentPreExamDao().GetListByStudentID(Student.StudentID);
                gc_PreExam.DataSource = list;
                gc_PreExam.RefreshDataSource();
                _isLoadPreExam = true;
            }
            else if (e.Page == TabFeeAudit && !_isLoadFeeAudit)
            {
                var list = new StudentFeeauditProjectDao().GetListByStudentID(Student.StudentID);
                gc_FeeAudit.DataSource = list;
                gc_FeeAudit.RefreshDataSource();
                _isLoadFeeAudit = true;
            }
            else if (e.Page == TabStudentMark && !_isLoadStudentMark)
            {
                var list = new StudentMarkDao().GetList(Student.StudentID);
                gc_StudentMark.DataSource = list;
                gc_StudentMark.RefreshDataSource();
                _isLoadStudentMark = true;
            }
            else if (e.Page == TabDrivePlan && !_isLoadDrivePlan)
            {
                var list = new DrivePlanDao().GetListStudentId(Student.StudentID);
                gc_DrivePlan.DataSource = list;
                gc_DrivePlan.RefreshDataSource();
                _isLoadDrivePlan = true;
            }
            else if (e.Page == TabAccount && !_isLoadAccount)
            {
                Account model = new AccountDao().GetModel_StudentID(Student.StudentID);
                if (model != null)
                {
                    text_AccountCode.Text        = model.AccountCode;
                    text_Amount.Text             = model.Amount.ToString();
                    text_CashAmount.Text         = model.CashAmount.ToString();
                    text_FreezeCashAmount.Text   = model.FreezeCashAmount.ToString();
                    text_FreezeUncashAmount.Text = model.FreezeUncashAmount.ToString();
                    text_UncashAmount.Text       = model.UncashAmount.ToString();
                    text_OperateID.Text          = model.OperateID.ToString();
                    text_OperateTime.Text        = model.OperateTime.ToString();
                    text_Note.Text   = model.Note;
                    text_Status.Text = model.Status == 1 ? "可提现" : "不可提现";

                    var account_seq = new AccountSeqDao().GetListByStudentID(Student.StudentID);
                    gc_AccountSeq.DataSource = account_seq;
                    gc_AccountSeq.RefreshDataSource();

                    var account_freeze_seq = new AccountFreezeSeqDao().GetListByStudentID(Student.StudentID);
                    gc_AccountFreezeSeq.DataSource = account_freeze_seq;
                    gc_AccountFreezeSeq.RefreshDataSource();

                    _isLoadAccount = true;
                }
            }
        }