Beispiel #1
0
        /// <summary>
        /// 绑定数据到lup下拉框(按菜品查询的)
        /// </summary>
        private void BindInglupDish()
        {
            DataTable        tempDataTable      = new DataTable();
            BUCMS_DishServer myBUCMS_DishServer = new BUCMS_DishServer();
            BUCMS_ItemDetail myBUCMS_ItemDetail = new BUCMS_ItemDetail();

            try
            {
                tempDataTable = myBUCMS_DishServer.GetOrder(false, string.Empty, string.Empty, false);
                this.lupDishName.Properties.DataSource = tempDataTable;
                this.lupDishName.ItemIndex             = 0;

                tempDataTable = myBUCMS_ItemDetail.GetItemByType(VariedItemType.DishType);
                this.lupDishType.Properties.DataSource = tempDataTable;
                this.lupDishType.ItemIndex             = 0;

                tempDataTable = myBUCMS_ItemDetail.GetItemByType(VariedItemType.TasteType);
                this.lupTaste.Properties.DataSource = tempDataTable;
                this.lupTaste.ItemIndex             = 0;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #2
0
        /// <summary>
        /// 数据绑定控件
        /// </summary>
        private void BindingControls()
        {
            BUCMS_ItemDetail tempBUCMSItemDetail = new BUCMS_ItemDetail();

            try
            {
                DataTable tempDataTable = tempBUCMSItemDetail.GetItemByType(VariedItemType.DishType);
                ClassAssist.CommonOperator.DataBindingLookUpEdit(lupType, tempDataTable, "Name", "ID", true);
                tempDataTable         = tempBUCMSItemDetail.GetItemByType(VariedItemType.TasteType);
                rilupTaste.DataSource = tempDataTable;
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            }
        }
Beispiel #3
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());
            }
        }
Beispiel #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;
            }
        }
Beispiel #5
0
        private void frmDishInfoOperate_Load(object sender, EventArgs e)
        {
            DataTable myDT = myBUCMS_ItemDetail.GetItemByType(VariedItemType.DishType);

            ClassAssist.CommonOperator.DataBindingLookUpEdit(EditDishTypeID, myDT, "Name", "ID", true);
            this.EditDishTypeID.ItemIndex = 0;
            this.EditStockGoodsID.Properties.DataSource = myBUCMS_Stock.GetOrder(false, string.Empty, string.Empty, false);
            this.EditStockGoodsID.ItemIndex             = 0;
        }
Beispiel #6
0
 /// <summary>
 /// GridControl中的数据绑定
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void tbctrl_SelectedPageChanging(object sender, DevExpress.XtraTab.TabPageChangingEventArgs e)
 {
     try
     {
         string    ItemType      = e.Page.Tag.ToString();
         DataTable tempDataTable = myBUCMS_ItemDetail.GetItemByType(ItemType);
         foreach (Control tempControl in e.Page.Controls)
         {
             if (tempControl.GetType() == typeof(DevExpress.XtraGrid.GridControl))
             {
                 ((DevExpress.XtraGrid.GridControl)tempControl).DataSource = tempDataTable;
             }
         }
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message);
     }
 }
Beispiel #7
0
        //private void BindLookUpEdit()
        //{
        //    DataTable myDT = myBUCMS_ItemDetail.GetItemByType(VariedItemType.RoomFloor);
        //    this.EditFloorID.Properties.DataSource = myDT;
        //    this.EditEquipmentID.Properties.DataSource = myBUCMS_Equipment.GetDataSource();
        //    if (ItemID.Equals(-5))
        //    {
        //        this.EditFloorID.Properties.DataSource = myBUCMS_ItemDetail.GetItemByType(VariedItemType.RoomFloor);
        //        this.EditFloorID.ItemIndex = 0;
        //        this.EditEquipmentID.Properties.DataSource = myBUCMS_Equipment.GetDataSource();
        //        this.EditEquipmentID.ItemIndex = 0;
        //    }
        //}

        private void frmRoomInfoOperate_Load(object sender, EventArgs e)
        {
            if (ItemID.Equals(-5))
            {
                DataTable myDataTable = myBUCMS_ItemDetail.GetItemByType(VariedItemType.RoomFloor);
                ClassAssist.CommonOperator.DataBindingLookUpEdit(EditFloorID, myDataTable, "Name", "ID", true);
                this.EditFloorID.ItemIndex = 0;
                this.EditEquipmentID.Properties.DataSource = myBUCMS_Equipment.GetDataSource();
                this.EditEquipmentID.ItemIndex             = 0;
            }
            else
            {
                DataTable myDataTable = myBUCMS_ItemDetail.GetItemByType(VariedItemType.RoomFloor);
                ClassAssist.CommonOperator.DataBindingLookUpEdit(EditFloorID, myDataTable, "Name", "ID", true);
                //this.EditFloorID.Properties.DataSource = myBUCMS_ItemDetail.GetItemByType(VariedItemType.RoomFloor);
                //ClassAssist.CommonOperator.DataBindingLookUpEdit(EditFloorID, myDataTable, "NAME", "ID", true);
                this.EditEquipmentID.Properties.DataSource = myBUCMS_Equipment.GetDataSource();
                FillInfo(this.tempInfo);
            }
        }
Beispiel #8
0
 /// <summary>
 /// 生成各楼层的TabPage,并添加到TabControl
 /// </summary>
 private void AddFloorInfo()
 {
     this.xtraTabControlMain.TabPages.Clear();
     try
     {
         DataTable FloorInfo = myBUCMSItemDetail.GetItemByType(VariedItemType.RoomFloor);
         for (int i = 0; i < FloorInfo.Rows.Count; i++)
         {
             DevExpress.XtraTab.XtraTabPage tbPageNew = new DevExpress.XtraTab.XtraTabPage();
             tbPageNew.Name    = FloorInfo.Rows[i]["ID"].ToString();
             tbPageNew.Text    = FloorInfo.Rows[i]["Name"].ToString();
             tbPageNew.Tooltip = FloorInfo.Rows[i]["Description"].ToString();
             this.xtraTabControlMain.TabPages.Add(tbPageNew);
             AddRoomInfo(tbPageNew);
         }
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message, "Floor");
     }
 }
        /// <summary>
        /// 对cmbeDishType数据绑定
        /// </summary>
        private void BindComoboxEdit()
        {
            DataTable myDT = myBUCMS_ItemDetail.GetItemByType(VariedItemType.DishType);

            for (int i = 0; i < myDT.Rows.Count; i++)
            {
                if (Convert.ToInt32(myDT.Rows[i]["TypeID"]) == 1)
                {
                    cmbeDishType.Properties.Items.Add(myDT.Rows[i]["Name"].ToString());
                }
                else
                {
                    return;
                }
            }
            this.cmbeDishType.Properties.Items.Insert(0, "全部");
            cmbeDishType.SelectedIndex = 0;
        }
Beispiel #10
0
 /// <summary>
 /// 绑定数据到lup下拉框
 /// </summary>
 private void BindingLup()
 {
     try
     {
         myDataTable = myBUCMS_ItemDetail.GetItemByType(VariedItemType.BackResult);
         this.lupReason.Properties.DataSource = myDataTable;
         this.lupReason.ItemIndex             = 0;
         myDataTable = myBUCMS_DishServer.GetOrder(false, string.Empty, string.Empty, false);
         this.lupDisName.Properties.DataSource = myDataTable;
         this.lupDisName.ItemIndex             = 0;
         myDataTable = new BUT_User().GetAllUserInfo();
         this.lupCreatePerson.Properties.DataSource = myDataTable;
         this.lupCreatePerson.ItemIndex             = 0;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }