예제 #1
0
        /// <summary>
        /// Add new parent category
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddParentCategory_Click(object sender, EventArgs e)
        {
            try
            {
                AddParentCatCtl objAddCat = new AddParentCatCtl();
                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;
            }
        }
예제 #2
0
        /// <summary>
        /// Add new parent category
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddParentCategory_Click(object sender, EventArgs e)
        {
            try
            {
                AddParentCatCtl objAddCat = new AddParentCatCtl();
                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;
            }
        }