当前位置: 首页>>代码示例>>C#>>正文


C# AccessHelper.Select方法代码示例

本文整理汇总了C#中AccessHelper.Select方法的典型用法代码示例。如果您正苦于以下问题:C# AccessHelper.Select方法的具体用法?C# AccessHelper.Select怎么用?C# AccessHelper.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AccessHelper的用法示例。


在下文中一共展示了AccessHelper.Select方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Form_Load

        private void Form_Load(object sender, EventArgs e)
        {
            this.Text = "新增" + _Catalog;

            Access = new AccessHelper();
            List<GraduationRequirement> graduationRequirements = Access.Select<GraduationRequirement>();
            List<DepartmentGroup> departmentGroups = Access.Select<DepartmentGroup>();

            ComboItem comboItem1 = new ComboItem("不進行複製");
            comboItem1.Tag = null;

            this.cboGraduationRequirementRule.Items.Add(comboItem1);
            foreach (GraduationRequirement var in graduationRequirements)
            {
                IEnumerable<DepartmentGroup> filterRecords = departmentGroups.Where(x => x.UID == var.DepartmentGroupID.ToString());
                if (filterRecords.Count() == 0)
                    continue;

                string departmentGroup = filterRecords.Select(x => x.Name).ElementAt(0);
                ComboItem item = new ComboItem(departmentGroup + "-" + var.Name);
                item.Tag = var;
                cboGraduationRequirementRule.Items.Add(item);
            }

            cboGraduationRequirementRule.SelectedItem = comboItem1;
            txtName.Focus();
        }
开发者ID:jungfengpaulwang,项目名称:EMBACore,代码行数:27,代码来源:GraduationRequirementRuleCreator.cs

示例2: UDTTimeListSelectAll

 /// <summary>
 /// 取得所以有重補修期間
 /// </summary>
 /// <returns></returns>
 public static List<UDTTimeListDef> UDTTimeListSelectAll()
 {
     List<UDTTimeListDef> retVal = new List<UDTTimeListDef>();
     AccessHelper accessHelper = new AccessHelper();
     retVal = accessHelper.Select<UDTTimeListDef>();
     return retVal;        
 }
开发者ID:ChunTaiChen,项目名称:K12.Retake.Shinmin,代码行数:11,代码来源:UDTTransfer.cs

示例3: _bgLoadData_DoWork

        void _bgLoadData_DoWork(object sender, DoWorkEventArgs e)
        {
            _TeacherNameDict.Clear();
            // 取得教師資料
            List<TeacherRecord> tRecList = Teacher.SelectAll();
            foreach(TeacherRecord rec in tRecList)
                if(rec.Status== TeacherRecord.TeacherStatus.一般)
                    if(!_TeacherNameDict.ContainsKey(rec.ID))
                    {
                        string TName = rec.Name;

                        if (!string.IsNullOrEmpty(rec.Nickname))
                            TName += "(" + rec.Nickname + ")";

                        _TeacherNameDict.Add(rec.ID, TName);
                    }


            // 取得公告資料
            AccessHelper accHelper = new AccessHelper();
            List<udtNotice> udtDataList = accHelper.Select<udtNotice>();
            _NoticeDict.Clear();
            udtDataList = udtDataList.OrderBy(x => x.PostTime).ToList();
            foreach(udtNotice data in udtDataList)
            {
                if (!_NoticeDict.ContainsKey(data.UID))
                    _NoticeDict.Add(data.UID, data);
            }

            // 取得需要允許的班級公告資料
            _NoticeApproveDict.Clear();

            if(_NoticeDict.Keys.Count>0)
            {
                string query="ref_notice_id in("+string.Join(",",_NoticeDict.Keys.ToArray())+")";
                List<udtNoticeApprove> apDataList = accHelper.Select<udtNoticeApprove>(query);
                foreach(udtNoticeApprove data in apDataList)
                {
                    string nid=data.NoticeID.ToString();
                    if (!_NoticeApproveDict.ContainsKey(nid))
                        _NoticeApproveDict.Add(nid, new List<udtNoticeApprove>());

                    _NoticeApproveDict[nid].Add(data);
                }
            }
        }
开发者ID:ischool-desktop,项目名称:Notice,代码行数:46,代码来源:NoticeApproveForm.cs

示例4: UDTSuggestListSelectByTimeListID

 /// <summary>
 /// 透過期間ID取得該期間建議重補修清單
 /// </summary>
 /// <param name="ID"></param>
 /// <returns></returns>
 public static List<UDTSuggestListDef> UDTSuggestListSelectByTimeListID(string UID)
 {
     List<UDTSuggestListDef> retVal = new List<UDTSuggestListDef>();
     AccessHelper accessHelper = new AccessHelper();
     string qry = "ref_time_list_id="+UID;
     retVal = accessHelper.Select<UDTSuggestListDef>(qry);
     return retVal;
 }
开发者ID:ChunTaiChen,项目名称:K12.Retake.Shinmin,代码行数:13,代码来源:UDTTransfer.cs

示例5: getConf

        private static UDT.AbsenceConfiguration getConf(string key, string defaultValue)
        {
            AccessHelper ah = new AccessHelper();

            List<UDT.AbsenceConfiguration> configs = ah.Select<UDT.AbsenceConfiguration>(string.Format("conf_name='{0}'", key));

            if (configs.Count < 1)
            {
                UDT.AbsenceConfiguration conf = new AbsenceConfiguration();
                conf.Name = key;
                conf.Content = defaultValue;
                List<ActiveRecord> recs = new List<ActiveRecord>();
                recs.Add(conf);
                ah.SaveAll(recs);
                configs = ah.Select<UDT.AbsenceConfiguration>(string.Format("conf_name='{0}'", key));
            }

            return configs[0];
        }
开发者ID:jungfengpaulwang,项目名称:EMBACore,代码行数:19,代码来源:AbsenceConfiguration.cs

示例6: OnPrimaryKeyChangedAsync

        protected override void OnPrimaryKeyChangedAsync()
        {
            //Get the Course Record
            Record = SHCourse.SelectByID(PrimaryKey);

            //Get the Course_Ext Record
            AccessHelper ah = new AccessHelper();
            List<UDT.CourseExt> moreInfo = ah.Select<UDT.CourseExt>("ref_course_id='" + this.PrimaryKey + "'");
            this.Course2 = (moreInfo.Count > 0) ? moreInfo[0] : null;
        }
开发者ID:jungfengpaulwang,项目名称:EMBACore,代码行数:10,代码来源:Course_BasicInfo.cs

示例7: LoadData

 public static void LoadData()
 {
     AccessHelper ah = new AccessHelper();
     foreach (UDT_ClassRoomLayout udtLayout in ah.Select<UDT_ClassRoomLayout>())
     {
         ClassRoomLayout layout = new ClassRoomLayout(udtLayout);
         layouts.Add(layout);
         dicLayouts.Add(layout.UID, layout);
     }
 }
开发者ID:jungfengpaulwang,项目名称:EMBACore,代码行数:10,代码来源:ClassRoomLayouts.cs

示例8: OnPrimaryKeyChangedAsync

        protected override void OnPrimaryKeyChangedAsync()
        {
            AccessHelper access = new AccessHelper();
            List<School> schools = access.Select<School>(string.Format("uid='{0}'", PrimaryKey));

            if (schools.Count > 0)
                SchoolData = schools[0];
            else
                SchoolData = null;
        }
开发者ID:KunHsiang,项目名称:KHJHCentralOffice,代码行数:10,代码来源:BasicInfoItem.cs

示例9: RibbonButtons

        public RibbonButtons()
        {
            Program.MainPanel.RibbonBarItems["管理"]["新增"].Image = Properties.Resources.atom_add_128;
            Program.MainPanel.RibbonBarItems["管理"]["新增"].Size = RibbonBarButton.MenuButtonSize.Large;
            Program.MainPanel.RibbonBarItems["管理"]["新增"].Click += delegate
            {
                DialogResult dr = new AddNewForm().ShowDialog();
                if (dr == DialogResult.OK)
                    Program.RefreshFilteredSource();
            };

            Program.MainPanel.RibbonBarItems["管理"]["刪除"].Image = Properties.Resources.atom_close_128;
            Program.MainPanel.RibbonBarItems["管理"]["刪除"].Size = RibbonBarButton.MenuButtonSize.Large;
            Program.MainPanel.RibbonBarItems["管理"]["刪除"].Click += delegate
            {
                DialogResult dr = MessageBox.Show("刪除選擇的學校?", "Campus", MessageBoxButtons.YesNo);

                if (dr == DialogResult.Yes)
                {
                    AccessHelper ah = new AccessHelper();
                    List<School> schools = ah.Select<School>(Program.MainPanel.SelectedSource);

                    schools.ForEach((x) => x.Deleted = true);
                    schools.SaveAll();
                    Program.RefreshFilteredSource();
                }
            };

            //Program.MainPanel.RibbonBarItems["進階"]["搜尋"].Image = Properties.Resources.lamp_search_128;
            //Program.MainPanel.RibbonBarItems["進階"]["搜尋"].Size = RibbonBarButton.MenuButtonSize.Medium;
            //Program.MainPanel.RibbonBarItems["進階"]["搜尋"].Click += delegate
            //{
            //    new SearchForm().ShowDialog();
            //};

            //Program.MainPanel.RibbonBarItems["進階"]["批次"].Size = RibbonBarButton.MenuButtonSize.Medium;
            //Program.MainPanel.RibbonBarItems["進階"]["批次"]["Desktop 管理"].Click += delegate
            //{
            //    new DesktopModuleManagerForm().ShowDialog();
            //};
            //Program.MainPanel.RibbonBarItems["進階"]["批次"]["UDM 管理"].Click += delegate
            //{
            //    new UDMManagerForm().ShowDialog();
            //};

            //Program.MainPanel.SelectedSourceChanged += delegate
            //{
            //    Program.MainPanel.RibbonBarItems["總務"]["單筆查詢"].Enable = Program.MainPanel.SelectedSource.Count > 0;
            //};
            //Program.MainPanel.RibbonBarItems["總務"]["單筆查詢"].Size = RibbonBarButton.MenuButtonSize.Medium;
            //Program.MainPanel.RibbonBarItems["總務"]["單筆查詢"].Click += delegate
            //{
            //    new VirtualAccountFound.VAFinder().ShowDialog();
            //};
        }
开发者ID:KunHsiang,项目名称:KHJHCentralOffice,代码行数:55,代码来源:RibbonButtons.cs

示例10: UDTStudentFitnessRecordListSelectByStudentIDList

 /// <summary>
 /// 依學生ID 取得學生體適能資料
 /// </summary>
 /// <param name="StudentIDList"></param>
 /// <returns></returns>
 public static List<UDT_StudentFitnessRecord> UDTStudentFitnessRecordListSelectByStudentIDList(List<string> StudentIDList)
 {
     List<UDT_StudentFitnessRecord> dataList = new List<UDT_StudentFitnessRecord>();
     if (StudentIDList.Count > 0)
     {
         AccessHelper accessHelper = new AccessHelper();
         // 當有 Where 條件寫法
         string query = "ref_student_id in(" + string.Join(",", StudentIDList.ToArray()) + ")";
         dataList = accessHelper.Select<UDT_StudentFitnessRecord>(query);
     }
     return dataList;
 }
开发者ID:ChunTaiChen,项目名称:ischool_fitness,代码行数:17,代码来源:UDTTransfer.cs

示例11: SelectConfigure

        /// <summary>
        /// 取得設定
        /// </summary>
        /// <returns></returns>
        public static List<ConfigureRecord> SelectConfigure()
        {
            List<ConfigureRecord> dataList = new List<ConfigureRecord>();

            AccessHelper accessHelper = new AccessHelper();
            // 當有 Where 條件寫法
            dataList = accessHelper.Select<ConfigureRecord>();

            if (dataList == null)
                return new List<ConfigureRecord>();

            return dataList;
        }
开发者ID:redolin,项目名称:K12.Report.ExamFailStudentReport,代码行数:17,代码来源:Configure.cs

示例12: SelectTagMappingAll

        /// <summary>
        /// 取得設定
        /// </summary>
        /// <returns></returns>
        public static List<TagMappingRecord> SelectTagMappingAll()
        {
            List<TagMappingRecord> dataList = new List<TagMappingRecord>();

            AccessHelper accessHelper = new AccessHelper();
            // 當有 Where 條件寫法
            dataList = accessHelper.Select<TagMappingRecord>();

            if (dataList == null)
                return new List<TagMappingRecord>();

            return dataList;
        }
开发者ID:redolin,项目名称:K12.Report.ZhuengtouPointsCompetition,代码行数:17,代码来源:TagMapping.cs

示例13: ABUDTMultipleRecordSelectByStudentIDList

        /// <summary>
        /// 依學生ID 查詢 綜合紀錄表 複選記錄 
        /// </summary>
        /// <param name="StudentIDList"></param>
        /// <returns></returns>
        public static List<UDTMultipleRecordDef> ABUDTMultipleRecordSelectByStudentIDList(List<string> StudentIDList)
        {
            List<UDTMultipleRecordDef> retVal = new List<UDTMultipleRecordDef>();

            if (StudentIDList.Count > 0)
            {
                AccessHelper accHelper = new AccessHelper();
                string qry = "ref_student_id in(" + string.Join(",", StudentIDList.ToArray()) + ")";
                retVal = accHelper.Select<UDTMultipleRecordDef>(qry);
            }

            return retVal;
        }
开发者ID:ChunTaiChen,项目名称:Counsel_System,代码行数:18,代码来源:UDTTransfer.cs

示例14: GetConfigDataItemDict

        /// <summary>
        /// 取得所有代碼對照
        /// </summary>
        /// <returns></returns>
        public Dictionary<string, List<ConfigDataItem>> GetConfigDataItemDict()
        {
            Dictionary<string, List<ConfigDataItem>> Value = new Dictionary<string, List<ConfigDataItem>>();
            AccessHelper accHelper = new AccessHelper();
            List<udt_ConfigData> datas = accHelper.Select<udt_ConfigData>();
            foreach(udt_ConfigData data in datas)
            {
                if(!string.IsNullOrEmpty(data.ConfigName ))
                    Value.Add(data.ConfigName,ConvertXMLStrToItem(data.Content));
            }

            return Value;
        }
开发者ID:ischool-desktop,项目名称:LHDB_SH,代码行数:17,代码来源:ConfigData.cs

示例15: SaveByRecordList

        /// <summary>
        /// 更新設定
        /// </summary>
        /// <param name="rec"></param>
        public static void SaveByRecordList(List<TagMappingRecord> recList)
        {
            List<TagMappingRecord> dataList = new List<TagMappingRecord>();

            AccessHelper accessHelper = new AccessHelper();

            // 先刪除所有資料
            dataList = accessHelper.Select<TagMappingRecord>();
            accessHelper.DeletedValues(dataList);

            if (recList.Count > 0)
            {
                // 新增此次所有資料
                accessHelper.InsertValues(recList);
            }
        }
开发者ID:redolin,项目名称:K12.Report.ZhuengtouPointsCompetition,代码行数:20,代码来源:TagMapping.cs


注:本文中的AccessHelper.Select方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。