Esempio n. 1
0
    private void Bind()
    {
        PagedDataSource pds = new PagedDataSource();

        pds.DataSource       = RoomInfoManager.GetAllRoomInfo(txtRoomName.Text);
        pds.AllowPaging      = true;
        pds.PageSize         = 5;
        pds.CurrentPageIndex = Pager1.PageIndex;
        Pager1.PageCount     = pds.PageCount;
        Pager1.DataCount     = pds.Count;

        gvRoomInfo.DataSourceID = null;
        gvRoomInfo.DataSource   = pds;
        gvRoomInfo.DataBind();
    }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ddlDepartment.DataSourceID = null;
            ddlDepartment.DataSource   = DepartmentManager.GetAllDepartment();
            ddlDepartment.DataBind();

            ddlRoomName.DataSourceID = null;
            ddlRoomName.DataSource   = RoomInfoManager.GetAllRoomInfo();
            ddlRoomName.DataBind();

            //判断MID是否为空,不为空则是修改,为空则是添加会议申请
            if (Request.QueryString["MID"] != null)
            {
                lblTitle.Text = "会议修改";
                mid           = Convert.ToInt32(Request.QueryString["MID"]);
                MeetingApplication mApplication = MeetingApplicationManager.GetMeetingApplicationById(mid);
                txtMeetTitle.Text  = mApplication.MeetTitle;
                txtsummary.Text    = mApplication.MeetingSummary;
                txtcompere.Text    = mApplication.Compere;
                txtContent.Value   = mApplication.MeetContent;
                txtbeginTime.Value = mApplication.BeginTime.ToShortDateString();
                txtendTime.Value   = mApplication.EndTime.ToShortDateString();
                selectPerson.Items.Add(new ListItem(mApplication.WithinEnlistMan, mApplication.WithinEnlistMan)); //与会人员
                ddlDepartment.SelectedValue         = mApplication.DepartmentID.Id.ToString();
                ddlInstancyDegree.SelectedItem.Text = mApplication.InstancyDegree;                                //紧急程度
                ddlRoomName.SelectedItem.Text       = ddlRoomName.Items.FindByText(mApplication.RoomInfo.RoomName).Text;
                txtMeetNumber.Value = mApplication.MeetNumber.ToString();
            }
            else
            {
                lblTitle.Text = "新增会议";
            }
        }
    }
Esempio n. 3
0
 /// <summary>
 /// 根据会议室名称查询
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSearchRoom_Click(object sender, EventArgs e)
 {
     gvRoomInfo.DataSourceID = null;
     gvRoomInfo.DataSource   = RoomInfoManager.GetAllRoomInfo(txtRoomName.Text);
     gvRoomInfo.DataBind();
 }