//load
        private void frmManageStudentInformation_Load(object sender, EventArgs e)
        {
            this.Visible = false;
            Util.EndAnimate(this, Util.Effect.Slide, 150, 180);

            #region Decen
            StaffModel = frmHome.staffModel;
            if (frmHome.lstDecent != null)
            {
                foreach (DecentralizeModel decen in frmHome.lstDecent)
                {
                    if (StaffModel.StrStaffTypeID == decen.StrStaffTypeID && this.Name == decen.StrFormID)
                    {
                        Decentralize = _Decen.getDecentralizeStaffIdForm(decen.StrStaffTypeID, decen.StrFormID);
                    }
                }
            }
            #endregion

            #region Multi-Language
            //string lan = Language.StrLanguageID;
            // _lstWord = _Word.getLstWord(this.Name);
            Language = frmHome.languageModel;
            //_lstLanWord = _WL.getLstLanguageWord(Language.StrLanguageID, this.Name);
            if (frmHome.lstLanguageWord != null)
            {
                _lstLanWord = _WL.getLstLanguageWord(Language.StrLanguageID, this.Name);
                foreach (LanguageWordModel lnword in _lstLanWord)
                {
                    _wordModel = _Word.getWordSelected(lnword.StrWordID);
                    if (lblTitle.Text == _wordModel.StrWordName)
                    {
                        lblTitle.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnAdd.Text == _wordModel.StrWordName)
                    {
                        btnAdd.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnUpdate.Text == _wordModel.StrWordName)
                    {
                        btnUpdate.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnDelete.Text == _wordModel.StrWordName)
                    {
                        btnDelete.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnExportList.Text == _wordModel.StrWordName)
                    {
                        btnExportList.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnSave.Text == _wordModel.StrWordName)
                    {
                        btnSave.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblID.Text == _wordModel.StrWordName)
                    {
                        lblID.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblName.Text == _wordModel.StrWordName)
                    {
                        lblName.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblBirthDay.Text == _wordModel.StrWordName)
                    {
                        lblBirthDay.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblStartDay.Text == _wordModel.StrWordName)
                    {
                        lblStartDay.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblPhone.Text == _wordModel.StrWordName)
                    {
                        lblPhone.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblMail.Text == _wordModel.StrWordName)
                    {
                        lblMail.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblIdCard.Text == _wordModel.StrWordName)
                    {
                        lblIdCard.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblAddress.Text == _wordModel.StrWordName)
                    {
                        lblAddress.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblGender.Text == _wordModel.StrWordName)
                    {
                        lblGender.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (radNam.Text == _wordModel.StrWordName)
                    {
                        radNam.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (radNu.Text == _wordModel.StrWordName)
                    {
                        radNu.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblStatus.Text == _wordModel.StrWordName)
                    {
                        lblStatus.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (radAvailable.Text == _wordModel.StrWordName)
                    {
                        radAvailable.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (radUnavailable.Text == _wordModel.StrWordName)
                    {
                        radUnavailable.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lbLFaculty.Text == _wordModel.StrWordName)
                    {
                        lbLFaculty.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lkeFaculty.Properties.NullText == _wordModel.StrWordName)
                    {
                        lkeFaculty.Properties.NullText = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblClass.Text == _wordModel.StrWordName)
                    {
                        lblClass.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lkeClass.Properties.NullText == _wordModel.StrWordName)
                    {
                        lkeClass.Properties.NullText = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colStudentID.Caption == _wordModel.StrWordName)
                    {
                        colStudentID.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colFullName.Caption == _wordModel.StrWordName)
                    {
                        colFullName.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colBirthday.Caption == _wordModel.StrWordName)
                    {
                        colBirthday.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colStartYear.Caption == _wordModel.StrWordName)
                    {
                        colStartYear.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (ColSex.Caption == _wordModel.StrWordName)
                    {
                        ColSex.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colPhoneNumber.Caption == _wordModel.StrWordName)
                    {
                        colPhoneNumber.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colEmail.Caption == _wordModel.StrWordName)
                    {
                        colEmail.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colIDCard.Caption == _wordModel.StrWordName)
                    {
                        colIDCard.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colAddress.Caption == _wordModel.StrWordName)
                    {
                        colAddress.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colStatus.Caption == _wordModel.StrWordName)
                    {
                        colStatus.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colFaculty.Caption == _wordModel.StrWordName)
                    {
                        colFaculty.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colClass.Caption == _wordModel.StrWordName)
                    {
                        colClass.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                }
            }
            #endregion

            dteBirthday.EditValue  = DateTime.Now.Date;
            dteStartYear.EditValue = DateTime.Now.Date;

            // _lstClass = _Class.loadClass();
            lkeClass.Properties.ValueMember   = "StrClassID";
            lkeClass.Properties.DisplayMember = "StrClassName";
            //lkeClass.Properties.DataSource = _lstClass;
            lkeClass.Properties.Columns["colClassID"].FieldName   = "StrClassID";
            lkeClass.Properties.Columns["colClassName"].FieldName = "StrClassName";

            _lstFaculty = _Faculty.loadFaculty();
            lkeFaculty.Properties.ValueMember   = "StrFacultyID";
            lkeFaculty.Properties.DisplayMember = "StrFacultyName";
            lkeFaculty.Properties.DataSource    = _lstFaculty;
            lkeFaculty.Properties.Columns["colFacultyID"].FieldName   = "StrFacultyID";
            lkeFaculty.Properties.Columns["colFacultyName"].FieldName = "StrFacultyName";

            ///*GridView*/
            _lstStudent = _Student.loadStudent();

            _LstClass = _Class.loadClass();
            LookUpEdit_Class.DataSource = _LstClass;
            LookUpEdit_Class.Columns["colClassID"].FieldName   = "StrClassID";
            LookUpEdit_Class.Columns["colClassName"].FieldName = "StrClassName";

            LookUpEdit_Faculty.DataSource = _lstFaculty;
            LookUpEdit_Faculty.Columns["colFacultyID"].FieldName   = "StrFacultyID";
            LookUpEdit_Faculty.Columns["colFacultyName"].FieldName = "StrFacultyName";

            gcListStudent.DataSource = _lstStudent;
            _setStatusForm();
        }
Пример #2
0
 private void _lstLoadListFaculty()
 {
     _lstFaculty = _Faculty.loadFaculty();
     gcListFaculty.DataSource = _lstFaculty;
 }
Пример #3
0
        //load
        private void frmManageClass_Load(object sender, EventArgs e)
        {
            this.Visible = false;
            Util.EndAnimate(this, Util.Effect.Slide, 150, 180);
            StaffModel = frmHome.staffModel;
            if (frmHome.lstDecent != null)
            {
                foreach (DecentralizeModel decen in frmHome.lstDecent)
                {
                    if (StaffModel.StrStaffTypeID == decen.StrStaffTypeID && this.Name == decen.StrFormID)
                    {
                        Decentralize = _Decen.getDecentralizeStaffIdForm(decen.StrStaffTypeID, decen.StrFormID);
                    }
                }
            }

            _lstFaculty = _Faculty.loadFaculty();
            lkeFaculty.Properties.ValueMember   = "StrFacultyID";
            lkeFaculty.Properties.DisplayMember = "StrFacultyName";
            lkeFaculty.Properties.DataSource    = _lstFaculty;
            lkeFaculty.Properties.Columns["colFacultyID"].FieldName   = "StrFacultyID";
            lkeFaculty.Properties.Columns["colFacultyName"].FieldName = "StrFacultyName";

            _lstCourse = _Course.loadCourse();
            lkeCourse.Properties.ValueMember   = "StrCourseID";
            lkeCourse.Properties.DisplayMember = "StrCourseID";
            lkeCourse.Properties.DataSource    = _lstCourse;
            lkeCourse.Properties.Columns["colCourseID"].FieldName = "StrCourseID";

            ///*GridView*/
            _lstClass = _Class.loadClass();

            LookUpEdit_Faculty.DataSource = _lstFaculty;
            LookUpEdit_Faculty.Columns["colFacultyID"].FieldName   = "StrFacultyID";
            LookUpEdit_Faculty.Columns["colFacultyName"].FieldName = "StrFacultyName";

            LookUpEdit_Course.DataSource = _lstCourse;
            LookUpEdit_Course.Columns["colCourseID"].FieldName = "StrCourseID";

            gcListClass.DataSource = _lstClass;
            _setStatusForm();

            #region Multi-Language
            //string lan = Language.StrLanguageID;
            // _lstWord = _Word.getLstWord(this.Name);
            Language = frmHome.languageModel;
            //_lstLanWord = _WL.getLstLanguageWord(Language.StrLanguageID, this.Name);
            if (frmHome.lstLanguageWord != null)
            {
                _lstLanWord = _WL.getLstLanguageWord(Language.StrLanguageID, this.Name);
                foreach (LanguageWordModel lnword in _lstLanWord)
                {
                    _wordModel = _Word.getWordSelected(lnword.StrWordID);
                    if (lblTitle.Text == _wordModel.StrWordName)
                    {
                        lblTitle.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnAdd.Text == _wordModel.StrWordName)
                    {
                        btnAdd.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnUpdate.Text == _wordModel.StrWordName)
                    {
                        btnUpdate.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnDelete.Text == _wordModel.StrWordName)
                    {
                        btnDelete.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnSave.Text == _wordModel.StrWordName)
                    {
                        btnSave.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblClassID.Text == _wordModel.StrWordName)
                    {
                        lblClassID.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblClassName.Text == _wordModel.StrWordName)
                    {
                        lblClassName.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblCourse.Text == _wordModel.StrWordName)
                    {
                        lblCourse.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblFaculty.Text == _wordModel.StrWordName)
                    {
                        lblFaculty.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lkeFaculty.Properties.NullText == _wordModel.StrWordName)
                    {
                        lkeFaculty.Properties.NullText = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lkeCourse.Properties.NullText == _wordModel.StrWordName)
                    {
                        lkeCourse.Properties.NullText = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (gcListClass.Text == _wordModel.StrWordName)
                    {
                        gcListClass.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (grpInformationClass.Text == _wordModel.StrWordName)
                    {
                        grpInformationClass.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colClassID.Caption == _wordModel.StrWordName)
                    {
                        colClassID.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colClassName.Caption == _wordModel.StrWordName)
                    {
                        colClassName.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colCourse.Caption == _wordModel.StrWordName)
                    {
                        colCourse.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colFaculty.Caption == _wordModel.StrWordName)
                    {
                        colFaculty.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                }
            }
            #endregion
        }
        //load
        private void frmManageLecturerInformation_Load(object sender, EventArgs e)
        {
            this.Visible = false;
            Util.EndAnimate(this, Util.Effect.Slide, 150, 180);
            StaffModel = frmHome.staffModel;
            if (frmHome.lstDecent != null)
            {
                foreach (DecentralizeModel decen in frmHome.lstDecent)
                {
                    if (StaffModel.StrStaffTypeID == decen.StrStaffTypeID && this.Name == decen.StrFormID)
                    {
                        Decentralize = _Decen.getDecentralizeStaffIdForm(decen.StrStaffTypeID, decen.StrFormID);
                        break;
                    }
                }
            }
            dteBirthday.EditValue = DateTime.Now.Date;

            _lstFaculty = _Faculty.loadFaculty();
            lkeFaculty.Properties.ValueMember   = "StrFacultyID";
            lkeFaculty.Properties.DisplayMember = "StrFacultyName";
            lkeFaculty.Properties.DataSource    = _lstFaculty;
            lkeFaculty.Properties.Columns["colFacultyID"].FieldName   = "StrFacultyID";
            lkeFaculty.Properties.Columns["colFacultyName"].FieldName = "StrFacultyName";

            _lstStaffType = _StaffType.loadStaffType();
            lkeStaffType.Properties.ValueMember   = "StrStaffTypeID";
            lkeStaffType.Properties.DisplayMember = "StrStaffTypeName";
            lkeStaffType.Properties.DataSource    = _lstStaffType;
            lkeStaffType.Properties.Columns["colStaffTypeID"].FieldName   = "StrStaffTypeID";
            lkeStaffType.Properties.Columns["colStaffTypeName"].FieldName = "StrStaffTypeName";

            foreach (StaffTypeModel staff in _lstStaffType)
            {
                if (staff.StrStaffTypeID == StaffModel.StrStaffTypeID || staff.StrStaffTypeID == "Adms")
                {
                    _lstStaffType.Remove(staff);
                    _lstStaffType = _StaffType.loadStaffType();
                    break;
                }
            }
            #region Multi-Language
            Language = frmHome.languageModel;
            //_lstLanWord = _WL.getLstLanguageWord(Language.StrLanguageID, this.Name);
            if (frmHome.lstLanguageWord != null)
            {
                _lstLanWord = _WL.getLstLanguageWord(Language.StrLanguageID, this.Name);
                foreach (LanguageWordModel lnword in _lstLanWord)
                {
                    _wordModel = _Word.getWordSelected(lnword.StrWordID);
                    if (lblTitle.Text == _wordModel.StrWordName)
                    {
                        lblTitle.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnAdd.Text == _wordModel.StrWordName)
                    {
                        btnAdd.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnUpdate.Text == _wordModel.StrWordName)
                    {
                        btnUpdate.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnDelete.Text == _wordModel.StrWordName)
                    {
                        btnDelete.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnExportList.Text == _wordModel.StrWordName)
                    {
                        btnExportList.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnSave.Text == _wordModel.StrWordName)
                    {
                        btnSave.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblID.Text == _wordModel.StrWordName)
                    {
                        lblID.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblName.Text == _wordModel.StrWordName)
                    {
                        lblName.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblBirthDay.Text == _wordModel.StrWordName)
                    {
                        lblBirthDay.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblPhone.Text == _wordModel.StrWordName)
                    {
                        lblPhone.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblMail.Text == _wordModel.StrWordName)
                    {
                        lblMail.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblIdCard.Text == _wordModel.StrWordName)
                    {
                        lblIdCard.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblAddress.Text == _wordModel.StrWordName)
                    {
                        lblAddress.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblGender.Text == _wordModel.StrWordName)
                    {
                        lblGender.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (radNam.Text == _wordModel.StrWordName)
                    {
                        radNam.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (radNu.Text == _wordModel.StrWordName)
                    {
                        radNu.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblStatus.Text == _wordModel.StrWordName)
                    {
                        lblStatus.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (radAvailable.Text == _wordModel.StrWordName)
                    {
                        radAvailable.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (radUnavailable.Text == _wordModel.StrWordName)
                    {
                        radUnavailable.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lbLFaculty.Text == _wordModel.StrWordName)
                    {
                        lbLFaculty.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lkeFaculty.Properties.NullText == _wordModel.StrWordName)
                    {
                        lkeFaculty.Properties.NullText = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblStaffType.Text == _wordModel.StrWordName)
                    {
                        lblStaffType.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lkeStaffType.Properties.NullText == _wordModel.StrWordName)
                    {
                        lkeStaffType.Properties.NullText = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colLecturerID.Caption == _wordModel.StrWordName)
                    {
                        colLecturerID.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colFullName.Caption == _wordModel.StrWordName)
                    {
                        colFullName.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colBirthday.Caption == _wordModel.StrWordName)
                    {
                        colBirthday.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (ColSex.Caption == _wordModel.StrWordName)
                    {
                        ColSex.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colPhoneNumber.Caption == _wordModel.StrWordName)
                    {
                        colPhoneNumber.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colEmail.Caption == _wordModel.StrWordName)
                    {
                        colEmail.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colIDCard.Caption == _wordModel.StrWordName)
                    {
                        colIDCard.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colAddress.Caption == _wordModel.StrWordName)
                    {
                        colAddress.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colStatus.Caption == _wordModel.StrWordName)
                    {
                        colStatus.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colFaculty.Caption == _wordModel.StrWordName)
                    {
                        colFaculty.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colStaffType.Caption == _wordModel.StrWordName)
                    {
                        colStaffType.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (gvLecturerList.ViewCaption == _wordModel.StrWordName)
                    {
                        gvLecturerList.ViewCaption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (grpInformationLecturer.Text == _wordModel.StrWordName)
                    {
                        grpInformationLecturer.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                }
            }
            #endregion
            ///*GridView*/
            _lstLecturer = _Staff.loadStaff();
            LookUpEdit_Faculty.DataSource = _lstFaculty;
            LookUpEdit_Faculty.Columns["colFacultyID"].FieldName   = "StrFacultyID";
            LookUpEdit_Faculty.Columns["colFacultyName"].FieldName = "StrFacultyName";

            LookUpEdit_StaffType.DataSource = _lstStaffType;
            LookUpEdit_StaffType.Columns["colStaffTypeID"].FieldName   = "StrStaffTypeID";
            LookUpEdit_StaffType.Columns["colStaffTypeName"].FieldName = "StrStaffTypeName";

            foreach (StaffModel st in _lstLecturer)
            {
                if (st.StrStaffTypeID == "Adms")
                {
                    _lstLecturer.Remove(st);
                    break;
                    // _lstLecturer = _Staff.loadStaff();
                }
            }
            gcListLecturer.DataSource = _lstLecturer;
            _setStatusForm();
        }
Пример #5
0
        private void frmManageSubject_Load(object sender, EventArgs e)
        {
            StaffModel = frmHome.staffModel;
            if (frmHome.lstDecent != null)
            {
                foreach (DecentralizeModel decen in frmHome.lstDecent)
                {
                    if (StaffModel.StrStaffTypeID == decen.StrStaffTypeID && this.Name == decen.StrFormID)
                    {
                        Decentralize = _Decen.getDecentralizeStaffIdForm(decen.StrStaffTypeID, decen.StrFormID);
                    }
                }
            }
            #region Multi-Language
            //string lan = Language.StrLanguageID;
            // _lstWord = _Word.getLstWord(this.Name);
            Language = frmHome.languageModel;
            //_lstLanWord = _WL.getLstLanguageWord(Language.StrLanguageID, this.Name);
            if (frmHome.lstLanguageWord != null)
            {
                _lstLanWord = _WL.getLstLanguageWord(Language.StrLanguageID, this.Name);
                foreach (LanguageWordModel lnword in _lstLanWord)
                {
                    _wordModel = _Word.getWordSelected(lnword.StrWordID);
                    if (lblTitle.Text == _wordModel.StrWordName)
                    {
                        lblTitle.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnAdd.Text == _wordModel.StrWordName)
                    {
                        btnAdd.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnUpdate.Text == _wordModel.StrWordName)
                    {
                        btnUpdate.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnDelete.Text == _wordModel.StrWordName)
                    {
                        btnDelete.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (btnSave.Text == _wordModel.StrWordName)
                    {
                        btnSave.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblSubjectID.Text == _wordModel.StrWordName)
                    {
                        lblSubjectID.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblSubjectName.Text == _wordModel.StrWordName)
                    {
                        lblSubjectName.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblFacuty.Text == _wordModel.StrWordName)
                    {
                        lblFacuty.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblStartDay.Text == _wordModel.StrWordName)
                    {
                        lblStartDay.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lblEndDay.Text == _wordModel.StrWordName)
                    {
                        lblEndDay.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (lkeFaculty.Text == _wordModel.StrWordName)
                    {
                        lkeFaculty.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colSubjectID.Caption == _wordModel.StrWordName)
                    {
                        colSubjectID.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colSubjectName.Caption == _wordModel.StrWordName)
                    {
                        colSubjectName.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colFaculty.Caption == _wordModel.StrWordName)
                    {
                        colFaculty.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colEndTime.Caption == _wordModel.StrWordName)
                    {
                        colEndTime.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (colStartTime.Caption == _wordModel.StrWordName)
                    {
                        colStartTime.Caption = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (gcListSubject.Text == _wordModel.StrWordName)
                    {
                        gcListSubject.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                    if (grpInformationSubject.Text == _wordModel.StrWordName)
                    {
                        grpInformationSubject.Text = _WL.getMeanByID(lnword.StrID, Language.StrLanguageID);
                    }
                }
            }
            #endregion
            dteStartTime.EditValue = DateTime.Now.Date;
            dteEndTime.EditValue   = DateTime.Now.Date;

            _lstFaculty = _Faculty.loadFaculty();
            lkeFaculty.Properties.ValueMember   = "StrFacultyID";
            lkeFaculty.Properties.DisplayMember = "StrFacultyName";
            lkeFaculty.Properties.DataSource    = _lstFaculty;
            lkeFaculty.Properties.Columns["colFacultyID"].FieldName   = "StrFacultyID";
            lkeFaculty.Properties.Columns["colFacultyName"].FieldName = "StrFacultyName";

            ///*GridView*/
            _lstSubject = _Subject.loadSubject();

            LookUpEdit_Faculty.DataSource = _lstFaculty;
            LookUpEdit_Faculty.Columns["colFacultyID"].FieldName   = "StrFacultyID";
            LookUpEdit_Faculty.Columns["colFacultyName"].FieldName = "StrFacultyName";

            gcListSubject.DataSource = _lstSubject;
            _setStatusForm();
        }