Example #1
0
        /// <summary>
        /// 添加包厢信息
        /// </summary>
        /// <param name="paramTabPage"></param>
        private void AddRoomInfo(DevExpress.XtraTab.XtraTabPage paramTabPage)
        {
            BUCMS_RoomType myBURoomType = new BUCMS_RoomType();

            try
            {
                ListView  tempListView = GetInitedBuffet(paramTabPage.Text);
                DataTable RoomInfo     = myBURoomType.GetOrder(false, "FloorID", paramTabPage.Name, false);
                if (RoomInfo.Rows.Count <= 0)
                {
                    paramTabPage.Tooltip = "此楼层暂未安排包厢";
                }
                paramTabPage.Controls.Add(tempListView);
                tempListView.Dock = DockStyle.Fill;
                for (int i = 0; i < RoomInfo.Rows.Count; i++)
                {
                    ListViewGroup tempListViewGroup = new ListViewGroup();
                    tempListViewGroup.Name    = RoomInfo.Rows[i]["ID"].ToString();
                    tempListViewGroup.Header  = RoomInfo.Rows[i]["Name"].ToString() + "        备注:";
                    tempListViewGroup.Header += RoomInfo.Rows[i]["Description"].ToString();
                    tempListViewGroup.Tag     = RoomInfo.Rows[i]["EquipmentID"];
                    tempListView.Groups.Add(tempListViewGroup);
                    AddBuffetsInfo(tempListViewGroup);
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, "Room");
            }
        }
Example #2
0
        /// <summary>
        /// 单页显示
        /// </summary>
        private void DisplayAllInOnePage()
        {
            this.xtraTabControlMain.TabPages.Clear();
            BUCMS_RoomType myBURoomType = new BUCMS_RoomType();

            try
            {
                ListView  tempListView = GetInitedBuffet("全部");
                DataTable RoomInfo     = myBURoomType.GetOrder(false, string.Empty, string.Empty, false);
                DevExpress.XtraTab.XtraTabPage tbPageNew = new DevExpress.XtraTab.XtraTabPage();
                tbPageNew.Name    = "All";
                tbPageNew.Text    = "所有餐台信息";
                tbPageNew.Tooltip = "全部的餐台信息";
                this.xtraTabControlMain.TabPages.Add(tbPageNew);
                tbPageNew.Controls.Add(tempListView);
                for (int i = 0; i < RoomInfo.Rows.Count; i++)
                {
                    ListViewGroup tempListViewGroup = new ListViewGroup();
                    tempListViewGroup.Name    = RoomInfo.Rows[i]["ID"].ToString();
                    tempListViewGroup.Header  = RoomInfo.Rows[i]["Name"].ToString() + "        备注:";
                    tempListViewGroup.Header += RoomInfo.Rows[i]["Description"].ToString();
                    tempListViewGroup.Tag     = RoomInfo.Rows[i]["EquipmentID"];
                    tempListView.Groups.Add(tempListViewGroup);
                    AddBuffetsInfo(tempListViewGroup);
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, "Floor");
            }
        }
Example #3
0
 /// <summary>
 /// 生成包厢信息TabPage,并添加到TabControl
 /// </summary>
 /// 创建人:桂书丛
 /// 创建日期:2013-02-24
 private void AddRoomInfo()
 {
     this.xtraTabControlMain.TabPages.Clear();
     try
     {
         DataTable RoomInfo = new BUCMS_RoomType().GetOrder(false, string.Empty, string.Empty, false);
         if (RoomInfo.Rows.Count <= 0)
         {
             XtraMessageBox.Show("未安排包厢", "暂无法营业……", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
         for (int i = 0; i < RoomInfo.Rows.Count; i++)
         {
             DevExpress.XtraTab.XtraTabPage tbPageNew = new DevExpress.XtraTab.XtraTabPage();
             tbPageNew.Name    = RoomInfo.Rows[i]["ID"].ToString();
             tbPageNew.Text    = RoomInfo.Rows[i]["Name"].ToString();
             tbPageNew.Tooltip = RoomInfo.Rows[i]["Description"].ToString();
             this.xtraTabControlMain.TabPages.Add(tbPageNew);
             AddBuffetsInfo(tbPageNew, "Room");
         }
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message, "Room");
     }
 }