Пример #1
0
        private void btnAddRoot_Click(object sender, EventArgs e)
        {
            UCServiceCategory frm = new UCServiceCategory(TransMode.NewRecord, myView);

            ISE.UILibrary.Utils.UIUtils.SetFrmTrans(frm, "طبقه بندی خدمات", FormBorderStyle.FixedDialog);
            foreach (var item in frm.InsertedList)
            {
                TreeNode node = new TreeNode();
                node.Text = item.Title;
                node.Tag  = item;
                treeServices.Nodes.Add(node);
            }
        }
Пример #2
0
        private void btnEditService_Click(object sender, EventArgs e)
        {
            var selected = (SdServiceCategoryDto)treeServices.SelectedNode.Tag;

            if (selected != null)
            {
                UCServiceCategory frm = new UCServiceCategory(TransMode.EditRecord, myView, selected);
                ISE.UILibrary.Utils.UIUtils.SetFrmTrans(frm, "طبقه بندی خدمات", FormBorderStyle.FixedDialog);
                if (frm.Result == DialogResult.OK)
                {
                    myView.UpdateServiceCategory(selected);
                }
            }
        }