Ejemplo n.º 1
0
        private void btnAddCategory_Click(object sender, EventArgs e)
        {
            try
            {
                string patentCategoryText = cmbParent.Text.Trim();
                string foodTypeText = cmbFoodType.Text.Trim();

                AddCategoryCtl objAddCat = new AddCategoryCtl(patentCategoryText, foodTypeText);
                objAddCat.Parent = this.ParentForm;
                UserControlManager.UserControls.Push(this);
                Panel pnl = (Panel)this.ParentForm.Controls["pnlContext"];

                string s = pnl.Name;

                objAddCat.ParentForm.Controls[s].Controls.Clear();
                objAddCat.ParentForm.Controls[s].Controls.Add(objAddCat);
            }
            catch (Exception exp)
            {
                throw exp;
            }
        }
Ejemplo n.º 2
0
        private void btnAddCategory_Click(object sender, EventArgs e)
        {
            try
            {
                string patentCategoryText = cmbParent.Text.Trim();
                string foodTypeText       = cmbFoodType.Text.Trim();

                AddCategoryCtl objAddCat = new AddCategoryCtl(patentCategoryText, foodTypeText);
                objAddCat.Parent = this.ParentForm;
                UserControlManager.UserControls.Push(this);
                Panel pnl = (Panel)this.ParentForm.Controls["pnlContext"];

                string s = pnl.Name;

                objAddCat.ParentForm.Controls[s].Controls.Clear();
                objAddCat.ParentForm.Controls[s].Controls.Add(objAddCat);
            }
            catch (Exception exp)
            {
                throw exp;
            }
        }