Exemplo n.º 1
0
Arquivo: UserBLL.cs Projeto: Ato42/CMS
        } // function LoginIn

        /// <summary>
        /// 查询所有会议
        /// </summary>
        /// <param name="sqlItems">查询的内容</param>
        /// <returns>一组会议信息</returns>
        /// 作者:王宇昊
        /// 创建时间:2014-09-18
        /// 修改时间:
        public List <ConferenceModel> GetConferenceInfo(string sqlItems)
        {
            List <ConferenceModel> ConM   = new List <ConferenceModel>();
            ConferenceDAL          ConDAL = new ConferenceDAL();

            ConM = ConDAL.GetAllRecord(sqlItems);
            return(ConM);
        }// function GetConferenceInfo
Exemplo n.º 2
0
        }// function GetInConMemberRegisterInfo

        /// <summary>
        /// 获取任务单
        /// </summary>
        /// <param name="employee"></param>
        /// <returns></returns>
        /// 作者:王宇昊
        /// 创建时间:2014-09-19
        /// 修改时间:
        public List <TaskModel> GetTask(EmployeeModel employee)
        {
            ConferenceDAL          conDal   = new ConferenceDAL();
            List <ConferenceModel> conModel = new List <ConferenceModel>();
            List <TaskModel>       taskList = new List <TaskModel>();

            conModel = conDal.GetAllRecord(employee.EmId.ToString());

            foreach (ConferenceModel con in conModel)
            {
                if (con.ConStaffMen == employee.EmId)
                {
                    TaskModel task = new TaskModel();
                    task.TaskConference = con; // 获取会议信息
                    //task.TaskConName = con.ConName; //获取会议名称
                    //task.TaskConTime = con.ConStartTime;//获取会议时间

                    BoardroomDAL          BdrDAL        = new BoardroomDAL();
                    List <BoardroomModel> BoardroomList = new List <BoardroomModel>();
                    BoardroomList = BdrDAL.GetAllRecord(con.ConPlace.ToString());

                    BoardroomModel Boardroom = new BoardroomModel();

                    foreach (BoardroomModel Bdr in BoardroomList)
                    {
                        if (Bdr.BdrId == con.ConPlace)
                        {
                            Boardroom = Bdr;
                        }
                    }

                    task.TaskBdrName = Boardroom.BdrName;//获取会议室名称

                    BoardroomDAL   boardroomDal   = new BoardroomDAL();
                    BoardroomModel boardroomModel = new BoardroomModel();

                    ConUseResourceDAL          conUseRscDal  = new ConUseResourceDAL();
                    List <ConUseResourceModel> conUseRscList = new List <ConUseResourceModel> ();
                    task.TaskResource = new ArrayList();
                    conUseRscList     = conUseRscDal.GetUseResource(con.ConId);
                    if (conUseRscList.Count != 0)
                    {
                        foreach (ConUseResourceModel conUseRsc in conUseRscList)
                        {
                            task.TaskResource.Add(conUseRsc.DeviceId);//获取资源ID列表
                        } // end foreach
                    }
                    taskList.Add(task);
                } // end if
            }     // end foreach

            return(taskList);
        }// function GetTask
Exemplo n.º 3
0
        }// function UpdateConference

        /// <summary>
        /// 会议管理员对会议申请进行审核
        /// </summary>
        /// <param name="conference">会议实体类的实例化对象</param>
        /// <returns>true:审核成功;false:审核失败</returns>
        /// 作者:王宇昊
        /// 创建时间:2014-09-18
        /// 修改时间:
        public bool VerifyConference(ConferenceModel conference)
        {
            try
            {
                ConferenceDAL ConDAL = new ConferenceDAL();
                if (conference.ConStatus == '1')
                {
                    ConDAL.UpdateARecord(conference);

                    SendTask(conference.ConSubMen, conference.ConName + "会议审核成功", "已通知各参会人员");//发送回执单信息给申请人员

                    BoardroomDAL          BdrDAL        = new BoardroomDAL();
                    List <BoardroomModel> BoardroomList = new List <BoardroomModel>();
                    BoardroomList = BdrDAL.GetAllRecord(conference.ConPlace.ToString());

                    BoardroomModel Boardroom = new BoardroomModel();

                    foreach (BoardroomModel Bdr in BoardroomList)
                    {
                        if (Bdr.BdrId == conference.ConPlace)
                        {
                            Boardroom = Bdr;
                        }
                    }

                    string Topic = string.Format("{0}会议通知", conference.ConName);
                    string Body  = string.Format("会议名称:{0}<br />会议地点:{1}<br />主办单位:{2}<br />会议时间:{3}", conference.ConName, Boardroom.BdrName, conference.ConHost, conference.ConStartTime);
                    SendNotice(conference, Topic, Body);//查找与会人员通过邮件发布会议修改的信息
                    List <ConUseResourceModel> ConUse = new List <ConUseResourceModel>();
                    ConUseResourceDAL          CURDAL = new ConUseResourceDAL();
                    Body = Body + "<br />会议资源:";

                    ConUse = CURDAL.GetUseResource(conference.ConId);

                    foreach (ConUseResourceModel CU in ConUse)
                    {
                        Body = Body + CU.DeviceId.ToString() + ",";
                    }
                    SendTask(conference.ConStaffMen, Topic, Body);//发送新任务单信息给会务人员
                }
                else
                {
                    ConDAL.UpdateARecord(conference);
                }
                return(true);
            }
            catch
            {
                return(false);
            }
        }// function VerifyConference
Exemplo n.º 4
0
Arquivo: UserBLL.cs Projeto: Ato42/CMS
        }// function DelCon

        /// <summary>
        /// 对已提交申请但未审核的会议进行更改
        /// </summary>
        /// <param name="conference">会议表实体类</param>
        /// <returns>true:申请提交成功;false:申请提交失败</returns>
        /// 作者:王宇昊
        /// 创建时间:2014-09-18
        /// 修改时间:
        public bool UpdateCon(ConferenceModel conference)
        {
            try
            {
                ConferenceDAL ConDAL = new ConferenceDAL();
                if (conference.ConStatus == '0')
                {
                    ConDAL.UpdateARecord(conference);
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }// function UpdateCon
Exemplo n.º 5
0
        /// <summary>
        /// 会议管理员删除会议
        /// </summary>
        /// <param name="conference">会议表实体类</param>
        /// <returns>true:申请提交成功;false:申请提交失败</returns>
        /// 作者:王宇昊
        /// 创建时间:2014-09-18
        /// 修改时间:
        public bool DelConference(ConferenceModel conference)
        {
            try
            {
                ConferenceDAL ConDAL = new ConferenceDAL();
                if (conference.ConStatus == '0')
                {
                    ConDAL.DelARecord(conference);
                }
                else
                {
                    ConDAL.DelARecord(conference);

                    BoardroomDAL          BdrDAL        = new BoardroomDAL();
                    List <BoardroomModel> BoardroomList = new List <BoardroomModel>();
                    BoardroomList = BdrDAL.GetAllRecord(conference.ConPlace.ToString());

                    BoardroomModel Boardroom = new BoardroomModel();

                    foreach (BoardroomModel Bdr in BoardroomList)
                    {
                        if (Bdr.BdrId == conference.ConPlace)
                        {
                            Boardroom = Bdr;
                        }
                    }

                    ConDAL.UpdateARecord(conference);
                    string Topic = string.Format("{0}会议取消通知", conference.ConName);
                    string Body  = string.Format("会议名称:{0}<br />会议地点:{1}<br />主办单位:{2}<br />会议时间:{3}<br />会议由于特殊原因取消,请诸位告知", conference.ConName, Boardroom.BdrName, conference.ConHost, conference.ConStartTime);
                    SendTask(conference.ConSubMen, Topic, Body);   //向会议申请人发送会议取消的消息
                    SendNotice(conference, Topic, Body);           //查找与会人员通过邮件发布会议取消的信息
                    SendTask(conference.ConStaffMen, Topic, Body); //发送新任务单信息给会务人员
                }
                return(true);
            }
            catch
            {
                return(false);
            }
        }// function DelConference
Exemplo n.º 6
0
Arquivo: UserBLL.cs Projeto: Ato42/CMS
        }// function GetBoardroomInfo

        /// <summary>
        /// 申请会议
        /// </summary>
        /// <param name="conferenceInfo">会议信息</param>
        /// <param name="resource">资源设备编号信息</param>
        /// <returns>是否成功申请</returns>
        /// 作者:王宇昊
        /// 创建时间:2014-09-18
        /// 修改时间:
        ///
        ///

        public int ConApply(ConferenceModel conferenceInfo, List <string> resource)
        {
            try
            {
                ConferenceDAL       ConDAL = new ConferenceDAL();
                ConUseResourceDAL   CURDAL = new ConUseResourceDAL();
                ConUseResourceModel CURM   = new ConUseResourceModel();
                //
                ResourceDAL   RDAL   = new ResourceDAL();
                ResourceModel RMODEL = new ResourceModel();

                int CId = ConDAL.AddARecordReturnId(conferenceInfo);//返回会议的ID
                if (CId != -1)
                {
                    foreach (string DeviceId in resource)
                    {
                        CURM.ConId    = CId;
                        CURM.DeviceId = Convert.ToInt32(DeviceId);
                        CURDAL.AddARecord(CURM);

                        // 将资源表中的状态标志改为1,被预订
                        RMODEL.ResourceId     = Convert.ToInt32(DeviceId);
                        RMODEL.ResourceStatus = '1';
                        RDAL.UpdateAStatus(RMODEL);
                    }
                    return(CId);
                }
                else
                {
                    return(-1);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }// function ConApply