private void dataGrid_CellClick(object sender, DataGridViewCellEventArgs e) { Food_Dish fdish = foodDishBindingSource.Current as Food_Dish; if (fdish.Id != 0) { int typeID = fdish.TypeId; int sizeID = fdish.SizeId; foodTypeBindingSource.DataSource = Food_TypeBUS.showType(typeID); foodSizeBindingSource.DataSource = Food_SizeBUS.showSize(sizeID); if (fdish.imaGeURL != null) { picBox.Image = Image.FromFile(fdish.imaGeURL); } else { picBox.Image = null; } } }
private void dataDishView_CellClick(object sender, DataGridViewCellEventArgs e) { txtChangeQuan.Enabled = false; btnChangeQuan.Enabled = false; txtNumberD.Enabled = true; btnOrder.Enabled = true; Food_Dish fdish = foodDishBindingSource.Current as Food_Dish; if (fdish.Id != 0) { int typeID = fdish.TypeId; int sizeID = fdish.SizeId; foodTypeBindingSource.DataSource = Food_TypeBUS.showType(typeID); foodSizeBindingSource.DataSource = Food_SizeBUS.showSize(sizeID); //picBox.Image = Image.FromFile(fdish.imaGeURL); txtNumberD.Clear(); } else { return; } }