예제 #1
0
        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;
                }
            }
        }
예제 #2
0
파일: Order.cs 프로젝트: thanhtai113/test
        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;
            }
        }