}//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
}// 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
/// <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
}//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
}//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
} // 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
public int SaveTopic(TopicEntities topicEntities) { TopicDAL topicDAL = new TopicDAL(); return topicDAL.SaveTopic(topicEntities); }
public List<TopicEntities> GetTopicPageWise(int pageIndex, ref int recordCount, int length) { TopicDAL topicDAL = new TopicDAL(); return topicDAL.GetTopicPageWise(pageIndex, ref recordCount, length); }
public TopicEntities GetTopicByID(int ID) { TopicDAL topicDAL = new TopicDAL(); return topicDAL.GetTopicByID(ID); }
//for Subject drp public List<TopicEntities> GetSubjectForDrp() { TopicDAL topicDAL = new TopicDAL(); return topicDAL.GetSubjectForDrp(); }
public int DeleteTopic(int ID, ref string oUTPUT) { TopicDAL topicDAL = new TopicDAL(); return topicDAL.DeleteTopic(ID, ref oUTPUT); }