Beispiel #1
0
 /// <summary>
 /// 绑定控件
 /// </summary>
 private void BindingControls()
 {
     try
     {
         myDataTable = myBUCMS_VIPClient.VIPSearch(false, string.Empty, string.Empty); //false表示全部查询
         this.gridControlVIPInfo.DataSource = myDataTable;
         myDataTable = myBUCMS_VIPType.GetOrder(false, string.Empty, string.Empty, false);
         this.lupVIPType.Properties.DataSource = myDataTable;
         this.lupVIPType.ItemIndex             = 0;
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message);
     }
 }
Beispiel #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());
            }
        }
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);
                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 #4
0
        /// <summary>
        /// 检测会员名称和折扣是否唯一
        /// </summary>
        /// <returns></returns>
        private int CheckOnlyVIPDiscount(string paramFiledName, string paramVIPDiscount)
        {
            BUCMS_VIPType myBUCMS_VIPType = new BUCMS_VIPType();
            DataTable     myDataTable     = new DataTable();

            myDataTable = myBUCMS_VIPType.GetOrder(false, paramFiledName, paramVIPDiscount, false);
            if (myDataTable.Rows.Count > 0)
            {
                return(1);//已存在改会员卡
            }
            return(0);
        }
Beispiel #5
0
 /// <summary>
 /// 绑定数据到gridControl表格(会员卡信息)
 /// </summary>
 public void InitializeControls()
 {
     try
     {
         DataTable myDataTable = myBUCMS_VIPType.GetOrder(false, string.Empty, string.Empty, false);
         this.gridControlMain.DataSource = myDataTable;
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message);
     }
 }
Beispiel #6
0
        /// <summary>
        ///绑定数据到会员级别下拉框(会员卡信息)
        /// </summary>
        public void InitializeControls()
        {
            //获取CMS_VIPType表即会员卡信息表中的数据时直接调用BUCMS_VIPType的这个方法
            BUCMS_VIPType myBUCMS_VIPType = new BUCMS_VIPType();

            try
            {
                DataTable myDataTable = myBUCMS_VIPType.GetOrder(false, string.Empty, string.Empty, false);
                //绑定到下拉框
                this.lkdVIPType.Properties.DataSource = myDataTable;
                this.lkdVIPType.ItemIndex             = 0;
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            }
        }
Beispiel #7
0
        /// <summary>
        /// Handles the SelectionChanged event of the gridViewMain control.选中一项时发生
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="DevExpress.Data.SelectionChangedEventArgs"/> instance containing the event data.</param>
        /// 整理人:桂书丛
        /// 整理时间:2013-02-28
        private void gridViewMain_SelectionChanged(object sender, DevExpress.Data.SelectionChangedEventArgs e)
        {
            DataRow tempDataRow = this.gridViewMain.GetFocusedDataRow();                                            //取出选中行的原始数据(在数据库中的)(数据库中的数据不一定全在控件中显示)

            if (tempDataRow == null)
            {
                return;
            }
            string        myVIPID         = tempDataRow["VIPTypeID"].ToString();
            BUCMS_VIPType myBUCMS_VIPType = new BUCMS_VIPType();

            try
            {
                DataTable myDataTable = myBUCMS_VIPType.GetOrder(false, "ID", myVIPID, false);
                this.txtVIPName.Text       = myDataTable.Rows[0]["Name"].ToString();
                this.txtDiscount.EditValue = myDataTable.Rows[0]["Discount"];
                this.txtVIPCost.EditValue  = tempDataRow["VIPCost"];
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            }
        }
Beispiel #8
0
        /// <summary>
        /// 绑定数据到查询条件的控件
        /// </summary>
        private void BindingToSerach()
        {
            DataTable myDataTable = new DataTable();

            try
            {
                //会员卡要从VIPType表中获取
                BUCMS_VIPType myBUCMS_VIPType = new BUCMS_VIPType();
                myDataTable = myBUCMS_VIPType.GetOrder(false, string.Empty, string.Empty, false);
                this.lupVIPType.Properties.DataSource    = myDataTable;
                this.lupVIPType.ItemIndex                = 0;
                this.lupVIPType.Properties.DisplayMember = "Name";
                //创建人要到User表中获取
                BUT_User myBUT_User = new BUT_User();
                myDataTable = myBUT_User.GetAllUserInfo();
                this.lupCreatePerson.Properties.DataSource    = myDataTable;
                this.lupCreatePerson.ItemIndex                = 0;
                this.lupCreatePerson.Properties.DisplayMember = "USERNAME";
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message);
            }
        }