绑定药品页面查询药品时绑定厂家信息
This commit is contained in:
parent
5e9198cf59
commit
8f4faabf3f
|
@ -240,7 +240,7 @@ namespace DM_Weight.ViewModels
|
||||||
public void UpdateComboBoxItems(string text)
|
public void UpdateComboBoxItems(string text)
|
||||||
{
|
{
|
||||||
string str = @"SELECT d.drug_id,d.py_code,d.drug_barcode,d.drug_name,d.drug_brand_name,d.drug_spec,d.dosage,d.pack_unit,
|
string str = @"SELECT d.drug_id,d.py_code,d.drug_barcode,d.drug_name,d.drug_brand_name,d.drug_spec,d.dosage,d.pack_unit,
|
||||||
d.manufactory,d.max_stock,CONCAT(drug_name,' ',drug_spec)as drug_name_spec FROM `drug_info` d";
|
d.manufactory,d.max_stock,CONCAT(drug_name,' / ',drug_spec,' / ',manufactory) as drug_name_spec FROM `drug_info` d";
|
||||||
if (string.IsNullOrEmpty(text))
|
if (string.IsNullOrEmpty(text))
|
||||||
{
|
{
|
||||||
DrugInfos = SqlSugarHelper.Db.SqlQueryable<DrugInfo>(str).OrderBy(di => di.DrugName).OrderBy(di => di.DrugId).ToList();
|
DrugInfos = SqlSugarHelper.Db.SqlQueryable<DrugInfo>(str).OrderBy(di => di.DrugName).OrderBy(di => di.DrugId).ToList();
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace DM_Weight.Views
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void ComboBox_KeyUp(object sender, KeyEventArgs e)
|
private void ComboBox_KeyUp(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
ComboBox comboBox = sender as ComboBox;
|
ComboBox comboBox = sender as ComboBox;
|
||||||
vms.UpdateComboBoxItems(comboBox.Text);
|
vms.UpdateComboBoxItems(comboBox.Text);
|
||||||
if (this.vms.DrugInfos.Count > 0)
|
if (this.vms.DrugInfos.Count > 0)
|
||||||
|
|
Loading…
Reference in New Issue