Interface of ITOO ------ Return OrganizationName

 

                     

                           Interface of ITOO ------ Return OrganizationName

 

     
      During the Project of ITOO,it is really full of joy andhappineseven though the time 

and process sometimes is pretty tough. Here is a summary ofone of process of 

Interface:

         

   

   

  Here are the code: (allthese code are  type in theITOO.BasicSystemSetting.Service)

 


At IBasicOrganizationService:

#region 根据学院名称,返回其各个专业名称--Daniel+2016-2-13 
        /// <summary>
        /// 根据学院名称,返回其各个专业名称
        /// </summary>
        /// <param name="CollegeName">学院名称</param>
        /// <returns></returns>
        [OperationContract]
        List<ViewModel.BasicOrganizationViewModel> QueryCollegeNameByCollegeName(string CollegeName);
        #endregion



   At  BasicOrganizationWCFService


#region 根据学院名称,返回其各个专业名称--Daniel+2016-2-13 
        /// <summary>
        /// 根据学院名称,返回其各个专业名称
        /// </summary>
        /// <param name="CollegeName">学院名称</param>
        /// <returns></returns>
        public List<BasicOrganizationViewModel>QueryCollegeNameByCollegeName(string CollegeName)
        {
            return basicOrganiztionBll.QueryCollegeNameByCollegeName(CollegeName);
        }
        #endregion


  At  IBasicOrganizationBll

 
#region 根据学院名称,返回其各个专业名称--Daniel+2016-2-13 
        /// <summary>
       /// 根据学院名称,返回所有专业名称
        /// </summary>
       /// <param name="CollegeName">学校名称</param>
        /// <returns></returns>
       List<ViewModel.BasicOrganizationViewModel> QueryCollegeNameByCollegeName(string CollegeName);
        #endregion

  


  At BasicOrganizationBll

#region 根据学院名称,返回其各个专业名称--Daniel+2016-2-13 
        /// <summary>	
        /// 根据学院名称,返回其各个专业名称
        /// </summary>
        /// <param name="CollegeName">学院名称</param>
        /// <returns></returns>
        public List<ViewModel.BasicOrganizationViewModel> QueryCollegeNameByCollegeName(string CollegeName)
        {
            //把实体装换成为viewmodel
            List<BasicOrganizationViewModel> list1 = new List<BasicOrganizationViewModel>();

            //调用D层方法
            list1 = this.CurrentDal.LoadItems(s => s.OrganizationName == CollegeName && s.IsEnabled == 1).Select(s => new BasicOrganizationViewModel() { OrganizationID =s.OrganizationID }).ToList();

            List<BasicOrganizationViewModel>list2 = new List<BasicOrganizationViewModel>();
            var pid = list1[0].OrganizationID;
            list2 = this.CurrentDal.LoadItems(s => s.OrganizationPID == pid && s.IsEnabled == 1).Select(s => new BasicOrganizationViewModel() { OrganizationName = s.OrganizationName ,OrganizationID=s.OrganizationID,OrganizationCode=s.OrganizationCode,SchoolLevelID=s.SchoolLevelID,OrganizationPID=s.OrganizationPID,Tuition=s.Tuition,OrganizitionTypeID=s.OrganizitionTypeID}).ToList();

            return list2;
        }
        #endregion



    At the first begin, some classmate they are so kind coming to share how to create 


 a interface when I even don’t known how to make it , as the time pass, which I  


realize that it is not a big deal. Just keep at it and stick to it .



  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 11
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值