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


C# DAO.ToString方法代码示例

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


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

示例1: SetCounselTeacherForm

        public SetCounselTeacherForm(DAO.CounselTeacherRecord.CounselTeacherType Type,List<string> StudentIDList)
        {
            InitializeComponent();
            _UDTTransfer = new DAO.UDTTransfer ();
            this.MaximumSize = this.MinimumSize = this.Size;
            _CounselTeacherType = Type;
            _StudentIDList = new List<int>();
            _hasCounselStudent_List = new List<DAO.UDT_CounselStudent_ListDef>();
            _StudentIDList = (from data in StudentIDList select int.Parse(data)).ToList();
            if(StudentIDList.Count>0)
                _hasCounselStudent_List = _UDTTransfer.GetCounselStudentListIDs(StudentIDList);

            this.Text = "指定" + Type.ToString();
        }
开发者ID:ChunTaiChen,项目名称:Counsel_System,代码行数:14,代码来源:SetCounselTeacherForm.cs

示例2: GetCounselTeacherByType

        /// <summary>
        /// 透過輔導系統老師類別取得老師
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static List<DAO.CounselTeacherRecord> GetCounselTeacherByType(DAO.CounselTeacherRecord.CounselTeacherType type)
        { 
          
            List<DAO.CounselTeacherRecord> CounselTeacherList = new List<DAO.CounselTeacherRecord>();

            QueryHelper hepler = new QueryHelper();
            string strSQL = "select distinct teacher.id as id1,tag_teacher.id as id2,teacher.teacher_name,teacher.nickname,tag.name,tag.prefix from teacher inner join tag_teacher on teacher.id=tag_teacher.ref_teacher_id inner join tag on tag_teacher.ref_tag_id=tag.id where tag.prefix='輔導' and tag.name='"+type.ToString ()+"';";
            DataTable dt = hepler.Select(strSQL);


            foreach (DataRow dr in dt.Rows)
            { 
                DAO.CounselTeacherRecord counselTeacherRec = new DAO.CounselTeacherRecord ();
                // 教師編號
                counselTeacherRec.TeacherID = dr[0].ToString();
                // TeacherTagID
                counselTeacherRec.TeacherTag_ID=int.Parse(dr[1].ToString ());
                // 教師名稱
                if (string.IsNullOrEmpty(dr[3].ToString()))
                    counselTeacherRec.TeacherFullName = dr[2].ToString();
                else
                    counselTeacherRec.TeacherFullName = dr[2].ToString() + "(" + dr[3].ToString() + ")";

                // 類別
                counselTeacherRec.counselTeacherType = type;
                CounselTeacherList.Add(counselTeacherRec);
            }
            return CounselTeacherList.OrderBy(x=>x.TeacherFullName).ToList ();
        }
开发者ID:ChunTaiChen,项目名称:Counsel_System,代码行数:34,代码来源:Utility.cs


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