Beispiel #1
0
        private void 增加ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FomInput f = new FomInput();

            if (f.ShowDialog() == DialogResult.OK)
            {
                PSP_bdz_type p = new PSP_bdz_type();
                p.id   = Guid.NewGuid().ToString();
                p.Name = f.strName;
                p.col3 = typeid;
                Services.BaseService.Create <PSP_bdz_type>(p);
                TreeNode node = new TreeNode(p.Name);
                node.Tag = p.id;
                treeView1.SelectedNode.Nodes.Add(node);
                ctrlLineType1.Typeid = typeid;
                ctrlLineType1.RefreshData();
            }
        }
Beispiel #2
0
        private void 修改ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PSP_bdz_type p = new PSP_bdz_type();

            p.id = treeView1.SelectedNode.Tag.ToString();
            p    = (PSP_bdz_type)Services.BaseService.GetObject("SelectPSP_bdz_typeByKey", p);

            FomInput f = new FomInput();

            f.strName = p.Name;
            if (f.ShowDialog() == DialogResult.OK)
            {
                p.Name = f.strName;
                Services.BaseService.Update <PSP_bdz_type>(p);
                treeView1.SelectedNode.Text = p.Name;
                ctrlLineType1.Typeid        = typeid;
                ctrlLineType1.RefreshData();
            }
        }
Beispiel #3
0
        protected override void Add()
        {
            if (!AddRight)
            {
                MessageBox.Show("��û�д�Ȩ�ޡ�", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            FomInput f = new FomInput();
            if (f.ShowDialog() == DialogResult.OK)
            {
                PSP_bdz_type p = new PSP_bdz_type();
                p.id = Guid.NewGuid().ToString();
                p.Name = f.strName;
                p.col3 = typeid;
                Services.BaseService.Create<PSP_bdz_type>(p);
                TreeNode node = new TreeNode(p.Name);
                node.Tag = p.id;
                treeView1.SelectedNode.Nodes.Add(node);
                ctrlLineType1.Typeid = typeid;
                ctrlLineType1.RefreshData();
            }
        }
Beispiel #4
0
        protected override void Edit()
        {
            if (!EditRight)
            {
                MessageBox.Show("您没有此权限。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            PSP_bdz_type p = new PSP_bdz_type();

            p.id = treeView1.SelectedNode.Tag.ToString();
            p    = (PSP_bdz_type)Services.BaseService.GetObject("SelectPSP_bdz_typeByKey", p);

            FomInput f = new FomInput();

            f.strName = p.Name;
            if (f.ShowDialog() == DialogResult.OK)
            {
                p.Name = f.strName;
                Services.BaseService.Update("UpdatePSP_bdz_typeNM", p);
                treeView1.SelectedNode.Text = p.Name;
                ctrlLineType1.Typeid        = typeid;
                ctrlLineType1.RefreshData();
            }
        }
Beispiel #5
0
        protected override void Add()
        {
            if (!AddRight)
            {
                MessageBox.Show("您没有此权限。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            FomInput f = new FomInput();

            if (f.ShowDialog() == DialogResult.OK)
            {
                PSP_bdz_type p = new PSP_bdz_type();
                p.id   = Guid.NewGuid().ToString();
                p.Name = f.strName;
                p.col3 = typeid;
                Services.BaseService.Create <PSP_bdz_type>(p);
                TreeNode node = new TreeNode(p.Name);
                node.Tag = p.id;
                treeView1.SelectedNode.Nodes.Add(node);
                ctrlLineType1.Typeid = typeid;
                ctrlLineType1.RefreshData();
            }
        }
Beispiel #6
0
 private void ����ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FomInput f = new FomInput();
     if (f.ShowDialog() == DialogResult.OK)
     {
         PSP_bdz_type p = new PSP_bdz_type();
         p.id = Guid.NewGuid().ToString();
         p.Name = f.strName;
         p.col3 = typeid;
         Services.BaseService.Create<PSP_bdz_type>(p);
         TreeNode node = new TreeNode(p.Name);
         node.Tag = p.id;
         treeView1.SelectedNode.Nodes.Add(node);
         ctrlLineType1.Typeid = typeid;
         ctrlLineType1.RefreshData();
     }
 }
Beispiel #7
0
        private void �޸�ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PSP_bdz_type p = new PSP_bdz_type();
            p.id=treeView1.SelectedNode.Tag.ToString();
            p = (PSP_bdz_type)Services.BaseService.GetObject("SelectPSP_bdz_typeByKey", p);

            FomInput f = new FomInput();
            f.strName = p.Name;
            if (f.ShowDialog() == DialogResult.OK)
            {
                p.Name = f.strName;
                Services.BaseService.Update<PSP_bdz_type>(p);
                treeView1.SelectedNode.Text = p.Name;
                ctrlLineType1.Typeid = typeid;
                ctrlLineType1.RefreshData();
            }
        }
Beispiel #8
0
        protected override void Edit()
        {
            if (!EditRight)
            {
                MessageBox.Show("��û�д�Ȩ�ޡ�", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            PSP_bdz_type p = new PSP_bdz_type();
            p.id = treeView1.SelectedNode.Tag.ToString();
            p = (PSP_bdz_type)Services.BaseService.GetObject("SelectPSP_bdz_typeByKey", p);

            FomInput f = new FomInput();
            f.strName = p.Name;
            if (f.ShowDialog() == DialogResult.OK)
            {
                p.Name = f.strName;
                Services.BaseService.Update("UpdatePSP_bdz_typeNM", p);
                treeView1.SelectedNode.Text = p.Name;
                ctrlLineType1.Typeid = typeid;
                ctrlLineType1.RefreshData();
            }
        }