private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            LoadCombobox(cbbLoaiNhomTextFontStyle, Data.SomeEnum.GetFontStyles());
            LoadCombobox(cbbNhomTextFontStyle, Data.SomeEnum.GetFontStyles());
            LoadCombobox(cbbMonTextFontStyle, Data.SomeEnum.GetFontStyles());

            LoadCombobox(cbbLoaiNhomTextFontWeights, Data.SomeEnum.GetFontWeights());
            LoadCombobox(cbbNhomTextFontWeights, Data.SomeEnum.GetFontWeights());
            LoadCombobox(cbbMonTextFontWeights, Data.SomeEnum.GetFontWeights());

            _Item = BOCaiDatThucDon.GetAll(mTransit);
            if (_Item != null)
            {
                txtLoaiNhomTextFontSize.Text = _Item.LoaiNhomTextFontSize.ToString();
                txtNhomTextFontSize.Text     = _Item.NhomTextFontSize.ToString();
                txtMonTextFontSize.Text      = _Item.MonTextFontSize.ToString();

                cbbLoaiNhomTextFontStyle.SelectedValue = (int)_Item.LoaiNhomTextFontStyle;
                cbbNhomTextFontStyle.SelectedValue     = (int)_Item.NhomTextFontStyle;
                cbbMonTextFontStyle.SelectedValue      = (int)_Item.MonTextFontStyle;


                cbbLoaiNhomTextFontWeights.SelectedValue = (int)_Item.LoaiNhomTextFontWeights;
                cbbNhomTextFontWeights.SelectedValue     = (int)_Item.NhomTextFontWeights;
                cbbMonTextFontWeights.SelectedValue      = (int)_Item.MonTextFontWeights;

                if (_Item.NhomImages != null && _Item.NhomImages.Length > 0)
                {
                    btnHinhNhom.Image = Utilities.ImageHandler.BitmapImageFromByteArray(_Item.NhomImages);
                }

                if (_Item.MonImages != null && _Item.MonImages.Length > 0)
                {
                    btnHinhMon.Image = Utilities.ImageHandler.BitmapImageFromByteArray(_Item.MonImages);
                }

                if (_Item.LoaiNhomThucTatCaImages != null && _Item.LoaiNhomThucTatCaImages.Length > 0)
                {
                    btnHinhLoaiNhomTatCa.Image = Utilities.ImageHandler.BitmapImageFromByteArray(_Item.LoaiNhomThucTatCaImages);
                }

                if (_Item.LoaiNhomThucAnImages != null && _Item.LoaiNhomThucAnImages.Length > 0)
                {
                    btnHinhLoaiNhomThucAn.Image = Utilities.ImageHandler.BitmapImageFromByteArray(_Item.LoaiNhomThucAnImages);
                }

                if (_Item.LoaiNhomNuocImages != null && _Item.LoaiNhomNuocImages.Length > 0)
                {
                    btnHinhLoaiNhomNuocUong.Image = Utilities.ImageHandler.BitmapImageFromByteArray(_Item.LoaiNhomNuocImages);
                }
            }
        }
Ejemplo n.º 2
0
 public void SetTransit(Data.Transit transit)
 {
     SetImageSizetItems();
     mTransit = transit;
     BOMenuMon = new Data.BOMenuMon(transit);
     BOMenuNhom = new Data.BOMenuNhom(transit);
     BOMenuKichThuocMon = new Data.BOMenuKichThuocMon(transit);
     BOMenuKhuyenMai = new Data.BOMenuKhuyenMai();
     mCaiDatThucDon = Data.BOCaiDatThucDon.GetQueryNoTracking(mTransit);
     SetButtonLoaiNhom();
     SetFontItem();
     SetFontGroup();
     LoadData();
 }
Ejemplo n.º 3
0
 public void SetTransit(Data.Transit transit)
 {
     SetImageSizetItems();
     mTransit           = transit;
     BOMenuMon          = new Data.BOMenuMon(transit);
     BOMenuNhom         = new Data.BOMenuNhom(transit);
     BOMenuKichThuocMon = new Data.BOMenuKichThuocMon(transit);
     BOMenuKhuyenMai    = new Data.BOMenuKhuyenMai();
     mCaiDatThucDon     = Data.BOCaiDatThucDon.GetQueryNoTracking(mTransit);
     SetButtonLoaiNhom();
     SetFontItem();
     SetFontGroup();
     LoadData();
 }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            LoadCombobox(cbbLoaiNhomTextFontStyle, Data.SomeEnum.GetFontStyles());
            LoadCombobox(cbbNhomTextFontStyle, Data.SomeEnum.GetFontStyles());
            LoadCombobox(cbbMonTextFontStyle, Data.SomeEnum.GetFontStyles());

            LoadCombobox(cbbLoaiNhomTextFontWeights, Data.SomeEnum.GetFontWeights());
            LoadCombobox(cbbNhomTextFontWeights, Data.SomeEnum.GetFontWeights());
            LoadCombobox(cbbMonTextFontWeights, Data.SomeEnum.GetFontWeights());

            _Item = BOCaiDatThucDon.GetAll(mTransit);
            if (_Item != null)
            {
                txtLoaiNhomTextFontSize.Text = _Item.LoaiNhomTextFontSize.ToString();
                txtNhomTextFontSize.Text = _Item.NhomTextFontSize.ToString();
                txtMonTextFontSize.Text = _Item.MonTextFontSize.ToString();

                cbbLoaiNhomTextFontStyle.SelectedValue = (int)_Item.LoaiNhomTextFontStyle;
                cbbNhomTextFontStyle.SelectedValue = (int)_Item.NhomTextFontStyle;
                cbbMonTextFontStyle.SelectedValue = (int)_Item.MonTextFontStyle;


                cbbLoaiNhomTextFontWeights.SelectedValue = (int)_Item.LoaiNhomTextFontWeights;
                cbbNhomTextFontWeights.SelectedValue = (int)_Item.NhomTextFontWeights;
                cbbMonTextFontWeights.SelectedValue = (int)_Item.MonTextFontWeights;

                if (_Item.NhomImages != null && _Item.NhomImages.Length > 0)
                {
                    btnHinhNhom.Image = Utilities.ImageHandler.BitmapImageFromByteArray(_Item.NhomImages);
                }

                if (_Item.MonImages != null && _Item.MonImages.Length > 0)
                {
                    btnHinhMon.Image = Utilities.ImageHandler.BitmapImageFromByteArray(_Item.MonImages);
                }

                if (_Item.LoaiNhomThucTatCaImages != null && _Item.LoaiNhomThucTatCaImages.Length > 0)
                {
                    btnHinhLoaiNhomTatCa.Image = Utilities.ImageHandler.BitmapImageFromByteArray(_Item.LoaiNhomThucTatCaImages);
                }

                if (_Item.LoaiNhomThucAnImages != null && _Item.LoaiNhomThucAnImages.Length > 0)
                {
                    btnHinhLoaiNhomThucAn.Image = Utilities.ImageHandler.BitmapImageFromByteArray(_Item.LoaiNhomThucAnImages);
                }

                if (_Item.LoaiNhomNuocImages != null && _Item.LoaiNhomNuocImages.Length > 0)
                {
                    btnHinhLoaiNhomNuocUong.Image = Utilities.ImageHandler.BitmapImageFromByteArray(_Item.LoaiNhomNuocImages);
                }
            }
        }