コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                selectCategoryDropDownList.DataSource    = aRoomInfoManager.GetAllCategory;
                selectCategoryDropDownList.DataTextField = "room_no";
                selectCategoryDropDownList.DataBind();
            }
            int id = Convert.ToInt32(selectCategoryDropDownList.SelectedValue);

            roomLabel.Text = RoomInfoManager.GetRoomInfoByID(id).ToString();
        }
コード例 #2
0
 private void CreateRoomList()
 {
     foreach (RoomInfo roomInfo in roomsList)
     {
         GameObject      roomInfoObject  = Instantiate(RoomInfoPrefab, RoomsScrollContent.transform);
         RoomInfoManager roomInfoManager = roomInfoObject.GetComponent <RoomInfoManager>();
         roomInfoManager.thisRoomInfo = roomInfo;
         roomInfoManager.RoomName     = RoomName;
         roomInfoManager.MapName      = MapName;
         roomInfoManager.UpdateRoomInfo();
         roomInfoObjects.Add(roomInfoObject);
     }
 }
コード例 #3
0
ファイル: SelMeetingRome.aspx.cs プロジェクト: 262734254/OA
 /// <summary>
 /// GridView内生成事件时激发
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void gvRoomInfo_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     //判断是修改还是删除
     if (e.CommandName == "Up")
     {
         Response.Redirect("UpdateMeetingRomeInfo.aspx?RoomId=" + e.CommandArgument);
     }
     else
     {
         //删除
         RoomInfoManager.DeleteRoomInfo(e.CommandArgument.ToString());
         Page.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('删除成功!')");
         return;
     }
 }
コード例 #4
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();
    }
コード例 #5
0
    /// <summary>
    /// 添加会议室
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            RoomInfo roomInfo = new RoomInfo();
            roomInfo.RoomName      = txtRomeName.Value;
            roomInfo.ContainNum    = Convert.ToInt32(txtContainNum.Value);
            roomInfo.Equip         = txtEquip.Value;
            roomInfo.RomeAddr      = txtAddress.Value;
            roomInfo.RomeCondition = txtRomeCondition.Value;

            //调用业务逻辑层添加会议室
            RoomInfoManager.AddRoomInfo(roomInfo);
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('添加会场成功');window.location='SelMeetingRome.aspx'</script>");
        }
    }
コード例 #6
0
    /// <summary>
    /// 提交修改的会场信息
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        if (IsValid)
        {
            RoomInfo room = new RoomInfo();
            room.RID           = RoomId;
            room.RoomName      = txtRomeName.Value;
            room.RomeAddr      = txtAddress.Value;
            room.RomeCondition = txtRomeCondition.Text;
            room.Equip         = txtEquip.Text;
            room.ContainNum    = Convert.ToInt32(txtContainNum.Value);

            //调用业务逻辑层方法修改会场信息
            RoomInfoManager.ModifyRoomInfo(room);
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('修改会场信息成功');wndow.location.href='SelMeetingRome.aspx';</script>");
        }
    }
コード例 #7
0
ファイル: SearchRoom.aspx.cs プロジェクト: 262734254/OA
    /// <summary>
    /// 根据会议室查询该会议室的使用情况
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ddlRoomName_SelectedIndexChanged(object sender, EventArgs e)
    {
        RoomInfo room = RoomInfoManager.SearchRoomInfoById(Convert.ToInt32(ddlRoomName.SelectedValue));

        string roomName = ddlRoomName.SelectedItem.Value;

        lblRoomName.Text          = roomName;
        lblRemark.Text            = room.RomeCondition;
        dlRoomArrage.DataSourceID = null;
        dlRoomArrage.DataSource   = RoomArrageManager.SearchRoomArrageStateByRoomName(roomName);
        if (dlRoomArrage.DataSource == null)
        {
            lblRoomState.Text = "空闲中..";
        }
        else
        {
            lblRoomState.Text = "占用中..";
        }
        dlRoomArrage.DataBind();
    }
コード例 #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //判断会场ID是否为空,为空则跳转到会场列表页面
         if (Request.QueryString["RoomId"] == null)
         {
             Response.Redirect("SelMeetingRome.aspx");
         }
         else
         {
             //绑定会场信息
             RoomId = Convert.ToInt32(Request.QueryString["RoomId"]);
             RoomInfo roomInfo = RoomInfoManager.SearchRoomInfoById(RoomId);
             txtRomeName.Value     = roomInfo.RoomName;
             txtContainNum.Value   = roomInfo.ContainNum.ToString();
             txtEquip.Text         = roomInfo.Equip;
             txtAddress.Value      = roomInfo.RomeAddr;
             txtRomeCondition.Text = roomInfo.RomeCondition;
         }
     }
 }
コード例 #9
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 = "新增会议";
            }
        }
    }
コード例 #10
0
 public BookRoomController()
 {
     roomInfoManager = new RoomInfoManager();
     bookRoomManager = new BookRoomManager();
 }
コード例 #11
0
 // Ensure that the instance is destroyed when the game is stopped in the editor.
 void OnApplicationQuit()
 {
     s_Instance = null;
 }
コード例 #12
0
 public RoomInfoController()
 {
     roomInfoManager = new RoomInfoManager();
 }
コード例 #13
0
ファイル: SelMeetingRome.aspx.cs プロジェクト: 262734254/OA
 /// <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();
 }