コード例 #1
0
        /// <summary>
        /// 添加餐台信息
        /// </summary>
        /// <param name="paramListViewGroup">The param list view group.</param>
        private void AddBuffetsInfo(ListViewGroup paramListViewGroup)
        {
            BUCMS_Buffets myBUBuffets = new BUCMS_Buffets();

            try
            {
                DataTable BuffetsInfo = myBUBuffets.GetOrder(false, "RoomTypeID", paramListViewGroup.Name, false);
                if (BuffetsInfo.Rows.Count <= 0)
                {
                    ListViewItem tempListViewItem = GetInitedBuffetControl(null);
                    paramListViewGroup.Header += "餐台";
                    tempListViewItem.Group     = paramListViewGroup;
                    paramListViewGroup.ListView.Items.Add(tempListViewItem);
                }
                foreach (DataRow tempDataRow in BuffetsInfo.Rows)
                {
                    ListViewItem tempListViewItem = GetInitedBuffetControl(tempDataRow);
                    tempListViewItem.Group = paramListViewGroup;
                    paramListViewGroup.ListView.Items.Add(tempListViewItem);
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, "Buffets");
            }
        }
コード例 #2
0
        /// <summary>
        /// 绑定数据到lup下拉框(按账单查询的)
        /// </summary>
        private void Bindinglup()
        {
            DataTable        LupDatatable       = new DataTable();
            BUCMS_Buffets    myBUCMS_Buffets    = new BUCMS_Buffets();
            BUCMS_VIPType    myBUCMS_VIPType    = new BUCMS_VIPType();
            BUCMS_VIPClient  myBUCMS_VIPClient  = new BUCMS_VIPClient();
            BUCMS_Employee   myBUCMS_Employee   = new BUCMS_Employee();
            BUCMS_ItemDetail myBUCMS_ItemDetail = new BUCMS_ItemDetail();

            try
            {
                LupDatatable = myBUCMS_Buffets.GetOrder(false, string.Empty, string.Empty, false);
                ClassAssist.CommonOperator.DataBindingLookUpEdit(this.lupTableName, LupDatatable, "Name", "ID", true);
                LupDatatable = myBUCMS_VIPType.GetOrder(false, string.Empty, string.Empty, false);
                ClassAssist.CommonOperator.DataBindingLookUpEdit(lupVIPType, LupDatatable, "Name", "ID", true);
                LupDatatable = myBUCMS_VIPClient.GetOrder(false, string.Empty, string.Empty, false);
                ClassAssist.CommonOperator.DataBindingLookUpEdit(lupVIPClient, LupDatatable, "Name", "ID", true);
                LupDatatable = myBUCMS_Employee.GetOrder(false, string.Empty, string.Empty, false);
                ClassAssist.CommonOperator.DataBindingLookUpEdit(lupWaiter, LupDatatable, "Name", "ID", true);
                LupDatatable = myBUCMS_ItemDetail.GetItemByType(VariedItemType.PayType);
                ClassAssist.CommonOperator.DataBindingLookUpEdit(lupPayment, LupDatatable, "Name", "ID", true);
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.ToString());
            }
        }
コード例 #3
0
 private void SelectedPageChanging(DevExpress.XtraTab.XtraTabPage paramPage)
 {
     try
     {
         if (Convert.ToInt32(paramPage.Tag) == 1)
         {
             tempDataTable = myBUCMS_RoomType.GetOrder(true, string.Empty, string.Empty, false);
         }
         else
         {
             tempDataTable = myBUCMS_Buffets.GetOrder(true, string.Empty, string.Empty, false);
         }
         foreach (Control tempControl in paramPage.Controls)
         {
             if (tempControl.GetType() == typeof(DevExpress.XtraGrid.GridControl))
             {
                 ((DevExpress.XtraGrid.GridControl)tempControl).DataSource = tempDataTable;
             }
         }
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message);
     }
 }
コード例 #4
0
        /// <summary>
        /// 绑定数据到lup下拉框(按账单查询的)
        /// </summary>
        private void Bindinglup()
        {
            DataTable        LupDatatable       = new DataTable();
            BUCMS_Buffets    myBUCMS_Buffets    = new BUCMS_Buffets();
            BUCMS_VIPType    myBUCMS_VIPType    = new BUCMS_VIPType();
            BUCMS_VIPClient  myBUCMS_VIPClient  = new BUCMS_VIPClient();
            BUCMS_Employee   myBUCMS_Employee   = new BUCMS_Employee();
            BUCMS_ItemDetail myBUCMS_ItemDetail = new BUCMS_ItemDetail();

            try
            {
                LupDatatable = myBUCMS_Buffets.GetOrder(false, string.Empty, string.Empty, false);
                this.lupTableName.Properties.DataSource = LupDatatable;
                this.lupTableName.ItemIndex             = 0;
                LupDatatable = myBUCMS_VIPType.GetOrder(false, string.Empty, string.Empty, false);
                this.lupVIPType.Properties.DataSource = LupDatatable;
                this.lupVIPType.ItemIndex             = 0;
                LupDatatable = myBUCMS_VIPClient.GetOrder(false, string.Empty, string.Empty, false);
                this.lupVIPClient.Properties.DataSource = LupDatatable;
                this.lupVIPClient.ItemIndex             = 0;
                LupDatatable = myBUCMS_Employee.GetOrder(false, string.Empty, string.Empty, false);
                this.lupWaiter.Properties.DataSource = LupDatatable;
                this.lupWaiter.ItemIndex             = 0;
                LupDatatable = myBUCMS_ItemDetail.GetItemByType(VariedItemType.PayType);
                this.lupPayment.Properties.DataSource = LupDatatable;
                this.lupPayment.ItemIndex             = 0;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #5
0
 /// <summary>
 /// 添加餐台信息
 /// </summary>
 /// <param name="paramTabPage">The param tab page.</param>
 /// 创建人:桂书丛
 /// 创建日期:2013-02-24
 private void AddBuffetsInfo(DevExpress.XtraTab.XtraTabPage paramTabPage, string paramFlages)
 {
     try
     {
         ListView  tempListView = GetInitedBuffet(paramTabPage.Text);
         DataTable BuffetInfo   = new DataTable();
         if (paramFlages == "Status")
         {
             BuffetInfo = myBUBuffets.GetOrder(false, "StateID", paramTabPage.Name, false);
         }
         else
         {
             BuffetInfo = myBUBuffets.GetOrder(false, "RoomTypeID", paramTabPage.Name, false);
         }
         if (BuffetInfo.Rows.Count <= 0)
         {
             paramTabPage.Tooltip = "当前无满足条件的餐台";
         }
         paramTabPage.Controls.Add(tempListView);
         tempListView.Dock = DockStyle.Fill;
         if (BuffetInfo.Rows.Count <= 0)
         {
             ListViewItem tempListViewItem = GetInitedBuffetControl(null);
             tempListView.Items.Add(tempListViewItem);
         }
         foreach (DataRow tempDataRow in BuffetInfo.Rows)
         {
             ListViewItem tempListViewItem = GetInitedBuffetControl(tempDataRow);
             tempListView.Items.Add(tempListViewItem);
         }
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message, "Buffet");
     }
 }