public void loadProduct()
 {
     try
     {
         var listDB = productBO.GetData(u => u.isDelete == false);
         txtProductName.Items.Clear();
         foreach (var item in listDB)
         {
             txtProductName.Items.Add(item.Name);
         }
         txtProductName.Text = listDB.First().Name;
         txtPrice.Text       = productBO.GetPriceByName(txtProductName.Text).ToString();
     }
     catch { }
 }
Exemple #2
0
 private void txtProductName_Leave(object sender, EventArgs e)
 {
     if (ProductManage.Input == true)
     {
         if (txtProductName.Text != "")
         {
             txtPrice.Text = productIpBO.GetPriceByName(txtProductName.Text).ToString();
         }
     }
     else
     {
         if (txtProductName.Text != "")
         {
             txtPrice.Text = productOBO.GetPriceByName(txtProductName.Text).ToString();
         }
     }
 }