/// <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; } }
/// <summary> /// Handles the TextChanged event of the mruID control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// 创建人:桂书丛 /// 创建日期:2013-2-25 private void mruID_TextChanged(object sender, EventArgs e) { try { string tempCondition = this.mruIDOrSymbol.Text.Trim(); if (tempCondition.Length == 0) { return; } DataTable tempDataTable = new BUCMS_DishServer().GetOrder(tempCondition); this.gridControlDish.DataSource = tempDataTable; } catch (Exception ex) { XtraMessageBox.Show(ex.Message, "ODOrSymbol"); } }
/// <summary> /// Handles the EditValueChanged event of the lupType control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// 创建人:桂书丛 /// 创建日期:2013-2-25 private void lupType_EditValueChanged(object sender, EventArgs e) { try { string tempType = this.lupType.Text.Trim(); if (tempType.Length == 0) { return; } DataTable tempDataTable = new BUCMS_DishServer().GetOrder(true, "[类别]", tempType, false); this.gridControlDish.DataSource = tempDataTable; } catch (Exception ex) { XtraMessageBox.Show(ex.Message); } }