本文整理汇总了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();
}
示例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;
}
示例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);
}
}
}
示例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;
}
示例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];
}
示例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;
}
示例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);
}
}
示例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;
}
示例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();
//};
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}