コード例 #1
0
ファイル: StaffBaseViewModel.cs プロジェクト: ar-nex/nmhs
        private void UpdateDistinctList()
        {
            StaffAddDb db = new StaffAddDb();
            ObservableCollection <string> xList = new ObservableCollection <string>();

            xList = db.GetDistinctList(Models.StaffColName.VacancyStatus);
            if (xList.Count > 0)
            {
                Vacancy = xList;
            }
            else
            {
                Vacancy.Add("PERMANENT");
            }

            xList = db.GetDistinctList(Models.StaffColName.Designation);
            if (xList.Count > 0)
            {
                DesignationList = xList;
            }
            else
            {
                DesignationList.Add("AT");
            }

            xList       = db.GetDistinctList(Models.StaffColName.Subject);
            SubjectList = xList;

            xList = db.GetDistinctList(Models.StaffColName.SalarySource);
            if (xList.Count > 0)
            {
                SalarySourceList = xList;
            }
            else
            {
                SalarySourceList.Add("SSA SCHOOL");
            }

            // xList = db.GetDistinctList(Models.StaffColName.EmployeeGroup);
            xList = new ObservableCollection <string>();
            if (xList.Count > 0)
            {
                EmpGroupList = xList;
            }
            else
            {
                EmpGroupList.Add("Gr-A");
            }

            //  xList = db.GetDistinctList(Models.StaffColName.ApprvQualification);
            xList = new ObservableCollection <string>();
            if (xList.Count > 0)
            {
                ApprvQualificationList = xList;
            }
            else
            {
                ApprvQualificationList.Add("GRADUATE");
                ApprvQualificationList.Add("POST GRADUATE");
            }

            xList = db.GetDistinctList(Models.StaffColName.PayBand);
            if (xList.Count > 0)
            {
                PayBandList = xList;
            }
            else
            {
                PayBandList.Add("PB4");
            }
        }