Ejemplo n.º 1
0
        protected override void OnLoad(System.EventArgs e)
        {
            base.OnLoad(e);

            LoadMenucategory();

            if (_id > 0)
            {
                var MenuItem = new Service.BLL.BllMenuItem().GetById(_id);

                FormLoader.SetControlValue(ControlList, MenuItem);

                CmbCategory.SelectedValue = MenuItem.MenuCategoryId;
            }
        }
        protected override void OnLoad(System.EventArgs e)
        {
            base.OnLoad(e);

            LoadMenucategory();

            if (_id > 0)
            {
                var MenuItem = new Service.BLL.BllMenuItem().GetById(_id);

                FormLoader.SetControlValue(ControlList, MenuItem);

                CmbCategory.SelectedValue = MenuItem.MenuCategoryId;
            }

            
        }
Ejemplo n.º 3
0
        private void cmbMenuItem_SelectedIndexChanged(object sender, EventArgs e)
        {
            int id = 0;

            try
            {
                id = Convert.ToInt32(cmbMenuItem.SelectedValue.ToString());
            }
            catch
            {
                id = new BllMenuItem().GetMinimumMenuItemId();
            }
            finally
            {
                var MenuItem = new Service.BLL.BllMenuItem().GetById(id);

                txtPrice.Text = MenuItem.Price.ToString();
            }
        }
        private void cmbMenuItem_SelectedIndexChanged(object sender, EventArgs e)
        {
            int id = 0;
            try
            {
                id = Convert.ToInt32(cmbMenuItem.SelectedValue.ToString());
            }
            catch
            {
                id = new BllMenuItem().GetMinimumMenuItemId();
            }
            finally
            {
                var MenuItem = new Service.BLL.BllMenuItem().GetById(id);

                txtPrice.Text = MenuItem.Price.ToString();
            }
        }