示例#1
0
文件: hylxedit.cs 项目: wryip/diyiban
        private void button1_Click(object sender, EventArgs e)
        {
            memberType user = new memberType();

            user.memberName      = hymctextBox.Text.Trim();
            user.memberTypechild = splxcomboBox.SelectedItem.ToString();
            user.memberCardMoney = bkjetextBox.Text.Trim();
            user.memberRebate    = spzktextBox.Text.Trim();
            user.memberTopUp     = czcstextBox.Text.Trim();
            user.memberSend      = Convert.ToDouble(Convert.ToDouble(bkjetextBox.Text.Trim()) / Convert.ToInt32(czcstextBox.Text.Trim()));
            memberTypeCURD memberType = new memberTypeCURD();
            bool           result     = memberType.EditMemberUp(user);

            if (result)
            {
                MessageBox.Show("修改成功!");
                editsuccess();
                this.Close();
            }
            else
            {
                MessageBox.Show("修改失败!");
                editsuccess();
                this.Close();
            }
        }
示例#2
0
        private void hyglform_Load(object sender, EventArgs e)
        {
            TreeNode       child;
            memberTypeCURD bll = new memberTypeCURD();
            //List<string> list = bll.selectNodes();
            List <string> list1  = bll.selectNodesAddCount();
            int           count  = infobll.selectAllCount();
            TreeNode      parent = treeView1.Nodes[0];

            //TreeNode parent=new TreeNode();
            //parent.Text = "全部";
            parent.Text += "[" + count + "]";
            //treeView1.Nodes.Add(parent);
            foreach (var i in list1)
            {
                child      = new TreeNode();
                child.Text = i;
                parent.Nodes.Add(child);
            }
        }
示例#3
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (hymctextBox.Text == "" || bkjetextBox.Text == "" || spzktextBox.Text == "" || czcstextBox.Text == "")
     {
         MessageBox.Show("信息不能为空!");
     }
     else
     {
         memberType user = new memberType();
         user.memberName      = hymctextBox.Text.Trim();
         user.memberTypechild = splxcomboBox.SelectedItem.ToString();
         user.memberCardMoney = bkjetextBox.Text.Trim();
         user.memberRebate    = spzktextBox.Text.Trim();
         user.memberTopUp     = czcstextBox.Text.Trim();
         user.memberSend      = Convert.ToDouble(Convert.ToDouble(czcstextBox.Text.Trim()) / Convert.ToDouble(bkjetextBox.Text.Trim()));
         memberTypeCURD memberType = new memberTypeCURD();
         bool           result     = memberType.AddMember(user);
         if (result)
         {
             MessageBox.Show("添加成功!");
             this.Close();
         }
     }
 }