Exemplo n.º 1
0
        }//function VerifyTopic

        /// <summary>
        /// 添加议题
        /// </summary>
        /// <param name="topic"></param>
        /// 作者:吴若彤
        /// 创建时间:2014-09-19
        /// 修改时间:2014-09-19
        public bool AddTopic(TopicModel topic)
        {
            try
            {
                TopicDAL topicdal = new TopicDAL();
                topicdal.AddARecord(topic);
                return(true);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }//function AddTopic
Exemplo n.º 2
0
Arquivo: UserBLL.cs Projeto: Ato42/CMS
        }// function UpdateCon

        /// <summary>
        /// 申请议题
        /// </summary>
        /// <param name="topic">议题实体类</param>
        /// <returns>操作成功返回true,失败返回false</returns>
        /// 作者:王宇昊
        /// 创建时间:2014-09-18
        /// 修改时间:
        public bool TopicApply(TopicModel topic)
        {
            try
            {
                TopicDAL TDAL = new TopicDAL();
                TDAL.AddARecord(topic);
                return(true);
            }
            catch
            {
                return(false);
            }
        }// function TopicApply
Exemplo n.º 3
0
 /// <summary>
 /// 查询议题
 /// </summary>
 /// <returns></returns>
 /// 作者:吴若彤
 /// 创建时间:2014-09-19
 /// 修改时间:2014-09-19
 public List <TopicModel> GetTopicInfo(string sqlItems)
 {
     try
     {
         List <TopicModel> list     = new List <TopicModel>();
         TopicDAL          topicdal = new TopicDAL();
         list = topicdal.GetAllRecord(sqlItems);
         return(list);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }//function  GetTopicInfo
Exemplo n.º 4
0
        }//function  GetTopicInfo

        /// <summary>
        /// 审核议题
        /// </summary>
        /// <param name="status"></param>
        /// <param name="topic"></param>
        /// <returns></returns>
        /// 作者:吴若彤
        /// 创建时间:2014-09-19
        /// 修改时间:2014-09-19
        public bool VerifyTopic(char status, TopicModel topic)
        {
            try
            {
                topic.TopicStatus = status;
                TopicDAL topicdal = new TopicDAL();
                topicdal.UpdateARecord(topic);

                EmployeeDAL   ed = new EmployeeDAL();
                EmployeeModel em = ed.GetARecord(topic.TopicApplicantId);

                MailSendBLL.sendMail("议题审核通过", "您的议题“" + topic.TopicHead + "”已经通过审核,可以申请会议。", em.EmEmail);

                return(true);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }//function VerifyTopic
Exemplo n.º 5
0
        }//function AddTopic

        /// <summary>
        /// 修改议题
        /// </summary>
        /// <param name="topic"></param>
        /// <returns></returns>
        /// 作者:吴若彤
        /// 创建时间:2014-09-19
        /// 修改时间:2014-09-19
        public bool UpdateTopic(TopicModel topic)
        {
            try
            {
                TopicDAL topicdal = new TopicDAL();
                if (topicdal.UpdateARecord(topic))
                {
                    EmployeeDAL   ed = new EmployeeDAL();
                    EmployeeModel em = ed.GetARecord(topic.TopicApplicantId);
                    MailSendBLL.sendMail("议题审核通过", "您的议题“" + topic.TopicHead + "”已经通过审核,可以申请会议。", em.EmEmail);
                    return(true);
                }
                else
                {
                    throw new Exception("议题修改失败");
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        } //function UpdateTopic
Exemplo n.º 6
0
Arquivo: UserBLL.cs Projeto: Ato42/CMS
        } // function GetAllEmployee

        /// <summary>
        /// 查询用户申请的通过议题
        /// </summary>
        /// <returns>一组议题信息</returns>
        /// 作者:王宇昊
        /// 创建时间:2014-09-20
        /// 修改时间:
        public List <TopicModel> GetUserTopic(EmployeeModel employee)
        {
            try
            {
                List <TopicModel> list      = new List <TopicModel>();
                List <TopicModel> topiclist = new List <TopicModel>();
                TopicModel        topic     = new TopicModel();
                TopicDAL          topicdal  = new TopicDAL();
                list = topicdal.GetAllRecord(employee.EmId.ToString());
                foreach (TopicModel TM in list)
                {
                    if (TM.TopicApplicantId == employee.EmId && TM.TopicStatus == '1')
                    {
                        topic = TM;
                        topiclist.Add(TM);
                    }
                }
                return(topiclist);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }//function  GetUserTopic
Exemplo n.º 7
0
 public int SaveTopic(TopicEntities topicEntities)
 {
     TopicDAL topicDAL = new TopicDAL();
     return topicDAL.SaveTopic(topicEntities);
 }
Exemplo n.º 8
0
 public List<TopicEntities> GetTopicPageWise(int pageIndex, ref int recordCount, int length)
 {
     TopicDAL topicDAL = new TopicDAL();
     return topicDAL.GetTopicPageWise(pageIndex, ref recordCount, length);
 }
Exemplo n.º 9
0
 public TopicEntities GetTopicByID(int ID)
 {
     TopicDAL topicDAL = new TopicDAL();
     return topicDAL.GetTopicByID(ID);
 }
Exemplo n.º 10
0
 //for Subject drp
 public List<TopicEntities> GetSubjectForDrp()
 {
     TopicDAL topicDAL = new TopicDAL();
     return topicDAL.GetSubjectForDrp();
 }
Exemplo n.º 11
0
 public int DeleteTopic(int ID, ref string oUTPUT)
 {
     TopicDAL topicDAL = new TopicDAL();
     return topicDAL.DeleteTopic(ID, ref oUTPUT);
 }