Ejemplo n.º 1
0
 /// <summary>
 /// 查询会议纪要
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSearch_TextChanged(object sender, EventArgs e)
 {
     gvMeetingSummary.DataSourceID = null;
     //根据会议名称,开始时间和结束时间查询会议纪要信息
     gvMeetingSummary.DataSource = MeetingSummaryManager.SearchMeetingSummary(txtRoomName.Value, txtBeginTime.Value, txtEndTime.Value);
     gvMeetingSummary.DataBind();
 }
Ejemplo n.º 2
0
    /// <summary>
    /// 修改会议纪要
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        try
        {
            int            id             = Convert.ToInt32(Request.QueryString["MSID"]);
            MeetingSummary meetingSummary = new MeetingSummary();
            meetingSummary.Visitor       = txtVisitor.Value;
            meetingSummary.MSID          = id;
            meetingSummary.MissingPeople = txtMissingPeople.Value;
            meetingSummary.MeetingTitle  = txtTitle.Text;
            meetingSummary.BeginTime     = Convert.ToDateTime(txtStartTime.Text);
            meetingSummary.EndTime       = Convert.ToDateTime(txtEndTime.Text);
            meetingSummary.Compere       = ddlCompere.SelectedItem.Value;
            UserInfo user = null;
            //负责人为当前登录用户
            if (Session["user"] != null)
            {
                user = Session["user"] as UserInfo;
            }
            meetingSummary.ChargeMan      = user.Name;
            meetingSummary.MeetingContent = txtMeetintContent.Value;

            //调用更新方法 更新会议纪要信息
            MeetingSummaryManager.UpdateMeetingSummary(meetingSummary);
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('更新会议纪要成功');window.location='SelMeeting.aspx'</script>");
        }
        catch (Exception)
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('更新会议纪要失败')</script>");
            return;
        }
    }
Ejemplo n.º 3
0
    /// <summary>
    ///  删除选中项
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnDelAll_Click(object sender, EventArgs e)
    {
        string ids = string.Empty;

        for (int i = 0; i < gvMeetingSummary.Rows.Count; i++)
        {
            CheckBox cbSel = this.gvMeetingSummary.Rows[i].FindControl("cbAllCb") as CheckBox;
            if (cbSel.Checked == true)
            {
                HiddenField hfMSID = this.gvMeetingSummary.Rows[i].FindControl("hfMSID") as HiddenField;
                ids += hfMSID.Value + ",";
            }
        }
        if (ids.Length > 0)
        {
            ids = ids.Substring(0, ids.Length - 1);
        }
        else
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('请选择要删除的项!')</script>");
            return;
        }
        MeetingSummaryManager.DelMeetingSummary(ids);
        Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('删除成功')</script>");
        Bind();
    }
Ejemplo n.º 4
0
    private void Bind()
    {
        PagedDataSource pds = new PagedDataSource();

        pds.DataSource       = MeetingSummaryManager.SearchMeetingSummary(txtRoomName.Value, txtBeginTime.Value, txtEndTime.Value);
        pds.AllowPaging      = true;
        pds.PageSize         = 5;
        pds.CurrentPageIndex = Pager1.PageIndex;
        Pager1.PageCount     = pds.PageCount;
        Pager1.DataCount     = pds.Count;

        gvMeetingSummary.DataSourceID = null;
        //根据会议名称,开始时间和结束时间查询会议纪要信息
        gvMeetingSummary.DataSource = pds;
        gvMeetingSummary.DataBind();
    }
Ejemplo n.º 5
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (IsValid)
        {
            //判断缺席人中是否含有出席人
            //参与者
            string otherman = txtOtherMan.Text;
            // 缺席者
            string absentman = txtMissingPeople.Value;
            //判断缺席者是否存在参与者中
            if (otherman.Contains(absentman))
            {
                Response.Write("<script>alert('此缺席人在参与者中已存在!');</script>");
                return;
            }


            //获得用户登录的ID
            UserInfo       user    = Session["user"] as UserInfo;
            MeetingSummary meeting = new MeetingSummary();

            meeting.MeetingTitle   = txtTitle.Text;                          //会议主题
            meeting.MeetingContent = txtMeetingContent.Value;                //会议内容
            meeting.BeginTime      = Convert.ToDateTime(txtStartTime.Value); //开始时间
            meeting.EndTime        = Convert.ToDateTime(txtEndTime.Value);   //结束时间
            meeting.MissingPeople  = txtMissingPeople.Value;                 //缺席人员
            meeting.Compere        = txtOtherMan.Text;                       //参与 者
            meeting.ChargeMan      = user.Name;                              //负责人,就是会议纪要人,也就是登录用户



            //进行添加操作
            try
            {
                MeetingSummaryManager.AddMeetingSummary(meeting);
                Response.Write("<script>alert('添加成功!');location.href='SelMeeting.aspx';</script>");
            }
            catch (Exception)
            {
                Response.Write("<script>alert('添加失败!');</script>");
            }
        }
    }
Ejemplo n.º 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.QueryString["MSID"] == null)
         {
             Response.Redirect("SelMeeting.aspx");
         }
         //获得要查看的会议纪要的id
         int            id             = Convert.ToInt32(Request.QueryString["MSID"]);
         MeetingSummary meetingSummary = MeetingSummaryManager.GetMeetingSummaryById(id);
         lblRoomName.Text        = meetingSummary.MeetingTitle;
         txtBeginTime.Value      = meetingSummary.BeginTime.ToString();
         txtEndTime.Value        = meetingSummary.EndTime.ToString();
         txtMeetingContent.Value = meetingSummary.MeetingContent;
         txtMissingPeople.Value  = meetingSummary.MissingPeople;
         txtCompere.Value        = meetingSummary.Compere;
         txtVisitor.Value        = meetingSummary.Visitor;
     }
 }
Ejemplo n.º 7
0
    /// <summary>
    /// GridView生成事件时激发
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void gvMeetingSummary_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string name = e.CommandName;

        //更新
        if (name == "Up")
        {
            Response.Redirect("UpdateMeeting.aspx?MSID=" + e.CommandArgument.ToString());
        }
        //删除
        else if (name == "Del")
        {
            MeetingSummaryManager.DelMeetingSummary(e.CommandArgument.ToString());
        }
        //查看详情
        else if (name == "Det")
        {
            Response.Redirect("MeetingDetails.aspx?MSID=" + e.CommandArgument.ToString());
        }
    }
Ejemplo n.º 8
0
    /// <summary>
    /// GridView生成事件时激发
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void gvMeetingSummary_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string name = e.CommandName;

        //更新
        if (name == "Up")
        {
            Response.Redirect("UpdateMeeting.aspx?MSID=" + e.CommandArgument.ToString());
        }
        //删除
        else if (name == "Del")
        {
            MeetingSummaryManager.DelMeetingSummary(e.CommandArgument.ToString());
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('删除成功')</script>");
            Bind();
        }
        //查看详情
        else if (name == "Det")
        {
            Response.Redirect("MeetingDetails.aspx?MSID=" + e.CommandArgument.ToString());
        }
    }