Ejemplo n.º 1
0
        //#region public DataTable GetAllColumns()  获得表中的所有字段
        ///// <summary>
        ///// 获得表中的所有字段
        ///// </summary>
        ///// <returns></returns>
        //private string[] GetAllColumns()
        //{
        //    DataTable tempDataTable = new DataTable();
        //    List<string> returnStringArrary = new List<string>();
        //    try
        //    {
        //        tempDataTable = dal.GetAllColumns();
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //    foreach (DataRow tempDataRow in tempDataTable.Rows)
        //    {
        //        returnStringArrary.Add(tempDataRow[0].ToString());
        //    }
        //    return returnStringArrary.ToArray();
        //}
        //#endregion

        //#region public DataTable GetOrderMemberInfo(string paramCondition) 超级模糊查询
        ///// <summary>
        ///// 超级模糊查询
        ///// </summary>
        ///// <param name="paramCondition">查询条件</param>
        ///// <returns></returns>
        //public DataTable GetOrder(string paramCondition)
        //{
        //    DataTable myDataTable = null;
        //    try
        //    {
        //        string[] TableColumnsText = GetAllColumns();
        //        myDataTable = dal.GetOrder(TableColumnsText, paramCondition);
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
        //    return myDataTable;
        //}
        //#endregion

        private void txtDishName_EditValueChanged(object sender, EventArgs e)
        {
            string paramDishName = this.txtDishName.Text.Trim();

            myDataTable = myBUCMS_DishServer.GetOrder(paramDishName);
            this.grdctrlDishInfo.DataSource = myDataTable;
        }
Ejemplo n.º 2
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;
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 初始化控件
 /// </summary>
 private void InitializeControls()
 {
     try
     {
         ChoosedDataTable = GetInitedData();
         DisplayBuffetInfo();
         BindingControls();
         DataTable tempDataTable = myBUDishServer.GetOrder(true, string.Empty, string.Empty, false);
         this.gridControlDish.DataSource = tempDataTable;
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message, "Inited");
     }
 }
Ejemplo n.º 4
0
 private void BindComBoxValue()
 {
     myDataTable = myBUCMS_Employee.GetOrder(false, string.Empty, string.Empty, false);
     for (int i = 0; i < myDataTable.Rows.Count; i++)
     {
         txtEmpID.Properties.Items.Add(myDataTable.Rows[i]["ID"].ToString());
         txtEmpName.Properties.Items.Add(myDataTable.Rows[i]["Name"].ToString());
     }
     myDataTable = myBUCMS_DishServer.GetOrder(false, string.Empty, string.Empty, false);
     for (int i = 0; i < myDataTable.Rows.Count; i++)
     {
         txtItemID.Properties.Items.Add(myDataTable.Rows[i]["ID"].ToString());
         txtName.Properties.Items.Add(myDataTable.Rows[i]["Name"].ToString());
     }
 }
Ejemplo n.º 5
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;
     }
 }